Skip to content

feat(i18n): Add Turkish translation#903

Merged
hatemhosny merged 2 commits intolive-codes:developfrom
ahmed-atiah:develop
Oct 18, 2025
Merged

feat(i18n): Add Turkish translation#903
hatemhosny merged 2 commits intolive-codes:developfrom
ahmed-atiah:develop

Conversation

@ahmed-atiah
Copy link
Copy Markdown
Contributor

@ahmed-atiah ahmed-atiah commented Oct 18, 2025

What type of PR is this? (check all applicable)

  • ✨ Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • ♻️ Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert
  • 🌐 Internationalization / Translation

Description

This PR adds support for the Turkish (tr) language to LiveCodes. It includes the creation of all necessary locale files inside i18n/locales/tr/ and registers the language in the application's configuration.

Related Tickets & Documents

I18n #902

Mobile & Desktop Screenshots/Recordings

image

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentations?

  • 📓 docs (./docs)
  • 📕 storybook (./storybook)
  • 📜 README.md
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

Summary by CodeRabbit

  • New Features
    • Added Turkish (Türkçe) as a selectable UI language.
    • Comprehensive Turkish translations added across the app UI, language/tool names, and language-selection lists so the interface and related labels are available in Turkish.

@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 18, 2025

Deploy Preview for livecodes ready!

Name Link
🔨 Latest commit 8aa00e8
🔍 Latest deploy log https://app.netlify.com/projects/livecodes/deploys/68f3ba6c1a81cc00087bf2e4
😎 Deploy Preview https://deploy-preview-903--livecodes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 18, 2025

Walkthrough

Added Turkish ("tr") to the AppLanguage union and appLanguages mapping, and introduced comprehensive Turkish localization files for UI strings and language/tool metadata (translations and Lokalise JSON data). No runtime logic changes.

Changes

Cohort / File(s) Summary
Language Type & Registration
src/sdk/models.ts, src/livecodes/i18n/app-languages.ts
AppLanguage union extended with 'tr' and appLanguages mapping updated to include tr: 'Türkçe'.
Turkish UI Translations
src/livecodes/i18n/locales/tr/translation.ts, src/livecodes/i18n/locales/tr/translation.lokalise.json
New Turkish UI translation module and corresponding Lokalise JSON containing comprehensive localized UI strings and messages.
Turkish Language Metadata
src/livecodes/i18n/locales/tr/language-info.ts, src/livecodes/i18n/locales/tr/language-info.lokalise.json
New Turkish language-info module and Lokalise JSON providing localized names, descriptions, links, and metadata for languages/tools.

Sequence Diagram(s)

(omitted — changes are data additions and a type/registration update; no control-flow changes to illustrate)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped in with a tiny "tr" in paw,
Türkçe whispers stitched into each UI law,
Keys and strings now sing in new delight,
A rabbit's cheer for code made bright. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "feat(i18n): Add Turkish translation" directly and accurately describes the primary change in the changeset. All modified and new files are related to adding Turkish language support: registering 'tr' in the AppLanguage type, creating Turkish locale files (translation.ts, language-info.ts), and adding Turkish to the language mapping. The title is clear, concise, and uses conventional commit prefixes (feat) to indicate a new feature. A teammate scanning the git history would immediately understand that this PR introduces Turkish translation support to the application.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hatemhosny
Copy link
Copy Markdown
Collaborator

That's great.
Thank you, @ahmed-atiah

Would you please run npm run fix to fix some formatting errors reported here, then commit and push again.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/livecodes/i18n/locales/tr/language-info.ts (1)

5-14: Consider comment language consistency across locale files.

The ATTENTION comment and template comments in this file are in Turkish, while the corresponding comments in translation.ts are in English.

If these are auto-generated files, verify whether the comment language should be consistent across all Turkish locale files or if this variation is intentional.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5130cde and 8aa00e8.

📒 Files selected for processing (4)
  • src/livecodes/i18n/locales/tr/language-info.lokalise.json (1 hunks)
  • src/livecodes/i18n/locales/tr/language-info.ts (1 hunks)
  • src/livecodes/i18n/locales/tr/translation.lokalise.json (1 hunks)
  • src/livecodes/i18n/locales/tr/translation.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/livecodes/i18n/locales/tr/language-info.lokalise.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/livecodes/i18n/locales/tr/translation.lokalise.json
🧰 Additional context used
🧬 Code graph analysis (2)
src/livecodes/i18n/locales/tr/translation.ts (1)
src/livecodes/i18n/locales/models.ts (1)
  • I18nTranslationTemplate (23-25)
src/livecodes/i18n/locales/tr/language-info.ts (2)
src/livecodes/html/index.ts (1)
  • languageInfo (125-125)
src/livecodes/i18n/locales/models.ts (1)
  • I18nTranslationTemplate (23-25)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: tests (18.x, 2)
  • GitHub Check: tests (18.x, 5)
  • GitHub Check: tests (18.x, 4)
  • GitHub Check: tests (18.x, 1)
  • GitHub Check: tests (18.x, 3)
  • GitHub Check: build (18.x)
  • GitHub Check: build
  • GitHub Check: Redirect rules - livecodes
  • GitHub Check: Header rules - livecodes
  • GitHub Check: Pages changed - livecodes
🔇 Additional comments (3)
src/livecodes/i18n/locales/tr/translation.ts (2)

1-14: LGTM! File structure and imports are correct.

The file header, type imports, and template comments follow the expected pattern for locale files in this codebase.


16-1136: Address formatting issues as requested by the reviewer.

The translation structure and type assertion are correct. However, as noted in the PR comments, please run npm run fix to resolve the formatting errors identified in the CI run.

Based on PR comments.

src/livecodes/i18n/locales/tr/language-info.ts (1)

16-447: LGTM! Structure is correct.

The language info object structure and type assertion are properly implemented. As with translation.ts, please ensure npm run fix is run to address any formatting issues.

Based on PR comments.

@hatemhosny
Copy link
Copy Markdown
Collaborator

Thank you @ahmed-atiah
I will merge this now.
It should be available on livecodes.io in the next release.

Please keep up the great contributions.

@hatemhosny hatemhosny merged commit 5759dd2 into live-codes:develop Oct 18, 2025
16 checks passed
@livecodes-ci
Copy link
Copy Markdown
Contributor

livecodes-ci Bot commented Oct 18, 2025

i18n Actions

Source PR has been merged into the default branch.

Maintainers can comment .i18n-update-push to trigger the i18n update workflow and push the changes to Lokalise.

@hatemhosny
Copy link
Copy Markdown
Collaborator

.i18n-update-push

@livecodes-ci
Copy link
Copy Markdown
Contributor

livecodes-ci Bot commented Oct 18, 2025

i18n Actions: .i18n-update-push

Localization updated and pushed to Lokalise.

Name Description
New Branch for i18n i18n/ahmed-atiah/develop
Last Commit SHA 5759dd2

Maintainers can comment .i18n-update-pull after translation is done to trigger the i18n pull workflow and pull the changes back to Github.

@hatemhosny
Copy link
Copy Markdown
Collaborator

.i18n-update-pull

@livecodes-ci
Copy link
Copy Markdown
Contributor

livecodes-ci Bot commented Oct 18, 2025

i18n Actions: .i18n-update-pull

Localization pulled from Lokalise.

Name Description
i18n Branch i18n/ahmed-atiah/develop
Last Commit SHA 10328d6
i18n PR #907

@hatemhosny hatemhosny mentioned this pull request Oct 18, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants