Translate to Hindi and Arabic#591
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends Ascender’s UI internationalization by adding Arabic and Hindi support, removing the Zulu placeholder locale, and introducing RTL behavior for Arabic via <html dir> updates during locale activation.
Changes:
- Added Arabic (
ar) and Hindi (hi) locales and updated the backend allowed UI locale list. - Implemented RTL handling for Arabic by setting
<html lang>and<html dir>afterdynamicActivate(). - Dropped Zulu (
zu) locale assets and removed it from locale configuration.
Reviewed changes
Copilot reviewed 3 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| awx/ui/src/locales/zu/messages.js | Removes the Zulu locale catalog. |
| awx/ui/src/locales/ar/messages.js | Adds the Arabic locale catalog. |
| awx/ui/src/i18nLoader.js | Registers new locales and applies RTL/LTR direction and lang on activation. |
| awx/ui/lingui.config.js | Updates Lingui locale list and PO formatter configuration. |
| awx/api/serializers.py | Updates the API-side supported UI locale codes (adds ar/hi, removes zu). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 25 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
awx/ui/lingui.config.js:15
- Duplicate
formatkeys are defined in this object (format: "po"andformat: formatter(...)). In JavaScript object literals the latter overwrites the former, which is confusing and may be flagged by linters (no-dupe-keys). Remove the unusedformat: "po"entry.
fallbackLocales: { default: 'en' },
locales: ['en', 'es', 'fr', 'hi', 'ko', 'nl', 'zh', 'ja', 'ar'],
orderBy: 'messageId',
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 25 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
awx/ui/lingui.config.js:21
- Two typos in the new formatter options comments: the note for lineNumbers is misleading (wrapping is controlled by foldLength), and "Dont" should be "Don't".
lineNumbers: true, // Prevents line breaks at 80 characters
foldLength: 0 // Dont wrap long lines
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 29 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
awx/ui/lingui.config.js:22
- The comments for the PO formatter options are misleading/incorrect:
lineNumberscontrols whether source references are included in the generated PO, while line wrapping is controlled byfoldLength. Also, the "Dont" typo should be corrected to avoid confusing future edits.
format: formatter({
lineNumbers: true, // Prevents line breaks at 80 characters
foldLength: 0 // Dont wrap long lines
}),
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 30 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
awx/ui/lingui.config.js:22
- The formatter option comments are inaccurate:
lineNumberscontrols whether PO reference comments include:lineinfo, whilefoldLengthcontrols wrapping. The current comments (and the “Dont” typo) could mislead future edits; consider updating them and adding commas for consistency.
format: formatter({
lineNumbers: true, // Prevents line breaks at 80 characters
foldLength: 0 // Dont wrap long lines
}),
…require.context, so Mock it.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 39 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
awx/ui/src/screens/Host/HostGroups/HostGroupsList.js:214
modalNotehas a double space between sentences ("children. This list…"), which will render as extra whitespace in the UI and gets baked into translation catalogs. Consider using single spacing between sentences.
modalNote={t`Note that you may still see the group in the list after disassociating if the host is also a member of that group’s children. This list shows all groups the host is associated with directly and indirectly.`}
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 26 out of 47 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
awx/ui/src/screens/Organization/OrganizationDetail/OrganizationDetail.js:101
- This help text has a grammatical error: "This will be used a fallback" should be "This will be used as a fallback".
awx/ui/src/screens/Project/shared/Project.helptext.js:80 - This string uses "Github" instead of the correct product name "GitHub".
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 57 out of 79 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
awx/ui/src/screens/Organization/OrganizationDetail/OrganizationDetail.js:101
- Grammar in this help text is off (“used a fallback” → “used as a fallback”). Since this is user-facing text and will be translated, it’s best to correct it now.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 63 out of 85 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
awx/ui/src/screens/Organization/OrganizationDetail/OrganizationDetail.js:101
- The help text string has a grammatical error: "This will be used a fallback" should be "This will be used as a fallback".
awx/ui/src/screens/Project/shared/Project.helptext.js:80 - The message text uses the incorrect capitalization "Github"; it should be "GitHub".
… not be translated
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 64 out of 86 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
awx/ui/src/components/Schedule/ScheduleDetail/FrequencyDetails.js:195
EndDetailbuilds the phraseAfter N occurrence(s)by concatenating a hard-coded English word ('occurrence'/'occurrences') inside a translated template. This prevents translators from translating the noun (and may break word order in RTL languages).
} else if (options.end === 'after') {
const numOccurrences = options.occurrences;
value = t`After ${numOccurrences} ${numOccurrences === 1 ? 'occurrence' : 'occurrences'}`;
awx/ui/src/screens/Project/shared/Project.helptext.js:80
- Spelling: "Github" should be "GitHub".
In this, we add both Hindi and Arabic translations and enable RTL support for Arabic.
We also update all the strings, clean up the obsolete ones, and then translate any strings there were untranslated for the other languages (mostly new features). We had to update a lot of files that were scoped incorrectly for lingui, so the strings weren't be extracted.
Drop Zulu language, as it was originally for detecting untranslated strings, but we had removed portions of that code earlier.
Later we may covert to using JSON files instead of PO. They are such a pain.