Skip to content

Add Persian (fa) translations#13100

Open
kondori-reza1990 wants to merge 5 commits into
1Panel-dev:dev-v2from
kondori-reza1990:dev-v2
Open

Add Persian (fa) translations#13100
kondori-reza1990 wants to merge 5 commits into
1Panel-dev:dev-v2from
kondori-reza1990:dev-v2

Conversation

@kondori-reza1990

Copy link
Copy Markdown

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

  • Added a new fa locale key by extending getFuLocaleMessage('fa') and merging the entire message object with Persian translations.
  • Translated all UI strings including:
    • Common UI components (buttons, labels, statuses, tables, search, rules, login)
    • Menu items (overview, app store, websites, databases, containers, cron jobs, system, etc.)
    • All modules: database management, container, cronjob, monitor, terminal, toolbox, logs, file, SSH, settings, license, clean, app, website, PHP, Nginx, SSL, firewall, runtime, process, supervisor, disk, AI tools (agents, models, proxy, skills hub, benchmark, MCP, TensorRT), and Xpack features (ops report, user, app, WAF, monitor, tamper, setting, helper, node, customApp, alert, theme, sync, cluster).
  • Ensured the translation structure matches the existing English template exactly, preserving all keys and nested objects.
  • No functional code changes; only localization data added.

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

Note: The commit message used is: Add Persian (fa) translations (conforms to Conventional Commits).
Documentation impact: Users need to know that Persian is now available; a mention in the release notes or user guide would be helpful, but a separate docs PR may not be required if the language selector already auto-detects. I've left the docs checkbox unchecked in case the team prefers to handle it separately.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@kondori-reza1990 kondori-reza1990 Jun 23, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@codex review

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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
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.

1 participant