Skip to content

add some translate and update Persian#13132

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

add some translate and update Persian#13132
kondori-reza1990 wants to merge 14 commits into
1Panel-dev:dev-v2from
kondori-reza1990:dev-v2

Conversation

@kondori-reza1990

Copy link
Copy Markdown
Contributor

What this PR does / why we need it?
This PR adds full Persian (Farsi) language support to 1Panel, including frontend UI, backend error messages, and the project README. It enables Persian‑speaking users to interact with the panel in their native language, improving accessibility and user experience.

Summary of your change
Frontend:

Added complete Persian translation file (frontend/src/lang/modules/fa.ts) with 5,573+ UI strings.

Registered the fa locale in LOCALE_LOADERS (frontend/src/lang/index.ts).

Added fa to the language selectors:

Panel settings page (frontend/src/views/setting/panel/index.vue)

Login dropdown (frontend/src/views/login/components/login-form.vue)

Added Element Plus Persian locale support (frontend/src/App.vue).

Extended the fu.ts helper with Persian translations for table and step components.

Backend (core & agent):

Added Persian translation files:

core/i18n/lang/fa.yaml (353+ backend error messages, task logs, system responses)

agent/i18n/lang/fa.yaml (613+ agent-related messages)

Registered fa in both core/i18n/i18n.go and agent/i18n/i18n.go.

Added Fa field to the Locale struct in agent/app/dto/app.go for app store localization.

Documentation:

Created docs/README.fa.md with the full Persian translation of the main README.

Added a Persian badge/link to all existing README files (ar, de, es, fr, id, ja, ko, ms, pt-br, ru, tr, zh-Hans, zh-Hant) and the root README.md.

Updated docs/TRANSLATION.md to include Persian (fa) in the language list.

All translations follow the existing structure and preserve placeholders (e.g., {{ .name }}, {{ .err }}, {{ .detail }}). No functional code changes; only localization data and configuration added.

Add fa to LOCALE_LOADERS
Add fa item
enable Persian (fa) in language selector
enable Persian (fa) in language selector
add fa backend translations
Add fa to langFiles variable
Add Persian (fa) README.fa.md to project
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

{ value: 'fa', label: 'فارسی' },

P1 Badge Allow fa before saving it as a panel language

When this option is chosen in Settings, SettingService stores Language=fa. On the next password login, the login form posts loginForm.language, but core/app/dto/auth.go still validates dto.Login.Language with a oneof list that does not include fa, so CheckBindAndValidate rejects /core/auth/login before authentication. Users who switch to Persian and log out can no longer password-login until the DB value is changed or the validation list is updated.


<el-dropdown-item command="fa">فارسی</el-dropdown-item>

P2 Badge Add Persian to the default login dropdown

This inserts fa only in the showPasskeyOnly branch. The normal password-login branch rendered by the following v-else has the same dropdown but still stops at Turkish, so most users on the default login screen cannot select Persian before signing in.

ℹ️ 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".

@kondori-reza1990

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 92d44afb18

ℹ️ 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".

Comment thread docs/README.fa.md Outdated
Comment on lines +72 to +73
```bash
bash -c "$(curl -sSL https://resource.1panel.pro/v2/quick_start.sh)" No newline at end of file

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 Complete the Persian README

The new Persian README stops immediately after opening the quick-start code block, so the command fence is never closed and the rest of the README sections (post-install instructions, screenshot, support/security, license) are missing. Anyone following the newly added Persian badge lands on an incomplete document with malformed Markdown instead of the full localized README.

Useful? React with 👍 / 👎.

@kondori-reza1990

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 68087da2e3

ℹ️ 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".

Comment thread docs/README.fa.md Outdated
@kondori-reza1990

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: dea63aca55

ℹ️ 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".

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