Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persian Translation #7775

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Persian Translation #7775

wants to merge 2 commits into from

Conversation

Jokar-xen
Copy link

Description

I added Persian translation for XO Lite.

@julien-f julien-f requested a review from OlivierFL June 26, 2024 13:52
Copy link
Collaborator

@OlivierFL OlivierFL left a comment

Choose a reason for hiding this comment

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

Hello @Jokar-xen, thank you for your contribution! It is greatly appreciated.

I’ve added some comments on each file to ensure that the translations work correctly. Please feel free to comment and notify me if you have any questions or if something is unclear.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Recently, there have been changes to the file structure for translations in XO Lite. As a result, it is necessary to make some changes to ensure that it continues to function properly.

The required steps are:

  1. I would suggest reading the guidelines at @xen-orchestra/web-core/docs/guidelines/i18n.md and taking a look at the up to date @xen-orchestra/lite/src/locales/en.json in order to get an idea of what needs to be done.

    It mainly consists in removing the nested messages and replacing them with a dot notation, like this:

      "alarm-type.cpu_usage": "CPU usage exceeds {n}%",
      "alarm-type.disk_usage": "Disk usage exceeds {n}%",

    ⚠️ Please note that some translations should be moved into @xen-orchestra/web-core/lib/locales/en.json.

  2. You will need to update the file @xen-orchestra/web-core/lib/i18n.ts and add configuration for Persian, following the same pattern as the other languages. This would allow users to configure the language directly in the settings of XO Lite and have the correct format for dates and times, for example.

Copy link
Collaborator

Choose a reason for hiding this comment

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

To fully implement the translations in XO 5, you will need to include the language selector <option> in packages/xo-web/src/xo-app/user/index.js.

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.

None yet

2 participants