English Turkish translation added.#89
English Turkish translation added.#89HyperZno wants to merge 1 commit intoHappyHackingSpace:mainfrom
Conversation
WalkthroughThe Philosophy page now includes comprehensive internationalization support with English and Turkish translations. The change introduces language state management with localStorage persistence, a language toggle UI, and replaces all hardcoded content strings with dynamic translation lookups throughout the page structure. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
pages/philosophy.js (2)
123-201: Line length exceeds 80 characters.Multiple lines in the translation object exceed the 80-character limit specified in the coding guidelines. Consider breaking long strings across multiple lines or extracting translations to a separate file.
🔎 Example refactor for readability
- metaDescription: - 'Read about Happy Hacking Space, a network of hackers. We want to make building apps and websites accessible to everyone.', + metaDescription: 'Read about Happy Hacking Space, a network of ' + + 'hackers. We want to make building apps and websites ' + + 'accessible to everyone.',Alternatively, consider moving translations to a separate
locales/directory for better maintainability as the translation set grows.
353-353: Variable shadowing:tshadows translation function.The Theme UI callback parameter
tshadows the translation helpert(key)defined on line 203. While this works because of scope, it reduces readability.🔎 Proposed rename for clarity
-backgroundImage: (t) => t.util.gx('orange', 'red'), +backgroundImage: (theme) => theme.util.gx('orange', 'red'),
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pages/philosophy.js
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (AGENT.md)
**/*.{js,jsx,ts,tsx}: Use relative imports (e.g., '../components/nav') for importing modules
Use Theme UI components (e.g., { Box, Text }) for UI elements
Use single quotes for strings
Do not use semicolons at the end of statements
Do not use trailing commas in arrays, objects, or function parameters
Use camelCase for variable and function names
Use PascalCase for component names
Use Theme UI for consistent styling with the Hack Club theme
Files:
pages/philosophy.js
**/*.{js,jsx,ts,tsx,md,mdx}
📄 CodeRabbit inference engine (AGENT.md)
Limit lines to 80 characters in width
Files:
pages/philosophy.js
pages/**/*.{js,jsx,ts,tsx,mdx}
📄 CodeRabbit inference engine (AGENT.md)
Use the pages/ directory structure for Next.js routing
Files:
pages/philosophy.js
🔇 Additional comments (3)
pages/philosophy.js (3)
3-7: LGTM!Imports are correctly structured using Theme UI components and React hooks as needed for the i18n implementation.
203-203: LGTM!The translation helper has a solid fallback chain: current language → English fallback → key itself. This ensures graceful degradation for missing translations.
369-377: LGTM!The CTA button correctly uses
target="_blank"withrel="noopener noreferrer"for security, and the translated button text is properly applied.
I couldn't do a test, sorry. This is my first time using GitHub and I still haven't gotten used to it :(
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.