Add Persian (fa) translations#13100
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3fbeace35
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| website404Helper: 'صفحه خطای ۴۰۴ وبسایت فقط برای وبسایتهای محیط اجرای PHP و وبسایتهای استاتیک پشتیبانی میشود', | ||
| sni: 'SNI مبدا', | ||
| sniHelper: | ||
| "زمانی که بکاند پراکسی معکوس HTTPS باشد، ممکن است نیاز به تنظیم SNI مبدا داشته باشید. برای جزئیات به مستندات ارائهدهنده سرویس CDN |
There was a problem hiding this comment.
Register the Persian locale before adding its bundle
This fa bundle is currently unreachable: frontend/src/lang/index.ts:9-20 does not add a fa entry to LOCALE_LOADERS, and loadLocaleMessages falls back unknown locales to DEFAULT_LOCALE at frontend/src/lang/index.ts:31-32. The visible selectors also omit fa (for example frontend/src/views/setting/panel/index.vue:277-288 and the login dropdown at frontend/src/views/login/components/login-form.vue:55-65), so users cannot select Persian and any stored/server-provided fa value will render English instead of this new translation file.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@codex
Thank you for the thorough review. The requested fixes have been applied:
Locale registration in LOCALE_LOADERS:
Added fa entry to LOCALE_LOADERS in frontend/src/lang/index.ts so the translation bundle is now properly loaded.
Language selector updates:
Added fa to the language options in both:
Panel settings (frontend/src/views/setting/panel/index.vue)
Login page dropdown (frontend/src/views/login/components/login-form.vue)
Now Persian is selectable by users, and any stored/server-provided fa locale will correctly render the new translations instead of falling back to English.
All changes have been squashed into a single commit with the message:
feat(i18n): register Persian locale and add to language selectors
Please let me know if any further adjustments are needed.
There was a problem hiding this comment.
Codex Review: Didn't find any major issues. 🎉
Reviewed commit: 691b98de4b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add fa to LOCALE_LOADERS
Add fa item
enable Persian (fa) in language selector
enable Persian (fa) in language selector
What this PR does / why we need it?
This PR adds complete Persian (Farsi) translations for the entire 1Panel UI. It enables Farsi-speaking users to interact with the panel in their native language, improving accessibility and user experience for a wider audience.
Summary of your change
falocale key by extendinggetFuLocaleMessage('fa')and merging the entire message object with Persian translations.Please indicate you've done the following: