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

Add Arabic as a supported language #6609

Merged
merged 1 commit into from
Oct 11, 2022
Merged

Add Arabic as a supported language #6609

merged 1 commit into from
Oct 11, 2022

Conversation

zenmonkeykstop
Copy link
Contributor

Status

Ready for review

Description of Changes

Fixes #6605

Adds Arabic to securedrop/i18n.json, making it available as a supported language

Testing

  • on this branch, run ./securedrop-admin sdconfig in an admin workstation and verify the ar locale is valid
  • complete an install with ar as a supported language and verify that it's available in the locale dropdown and can be selected.

@zenmonkeykstop zenmonkeykstop requested a review from a team as a code owner October 11, 2022 14:30
@zenmonkeykstop zenmonkeykstop changed the title added Arabic as a supported language Add Arabic as a supported language Oct 11, 2022
@cfm
Copy link
Member

cfm commented Oct 11, 2022

I agree that this is an oversight; I should have added a check for this in #6557's test plan. I'll test this as part of QA today.

@cfm cfm self-assigned this Oct 11, 2022
Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

Looks good:

  • on this branch, run ./securedrop-admin sdconfig in an admin workstation and verify the ar locale is valid
  • complete an install with ar as a supported language and verify that it's available in the locale dropdown and can be selected.

Yes, though for some reason it took two securedrop-admin --force installs to apply the change in—

TASK [app : Update SUPPORTED_LOCALES in config.py] *****************************
changed: [app]

—and then a manual ssh app sudo systemctl restart apache2 to pick it up.

  • All languages previously defined in I18NTool.supported_languages are now defined in i18n.json:
user@sd-dev:~/securedrop$ git checkout 2.4.2
user@sd-dev:~/securedrop$ securedrop/bin/dev-shell ./i18n_tool.py list-locales
ar ca cs de_DE el en_US es_ES fr_FR hi is it_IT nb_NO nl pt_BR pt_PT ro ru sk sv tr zh_Hans zh_Hant
user@sd-dev:~/securedrop$ git checkout develop securedrop/i18n.json
Updated 1 path from 4f697cd4e
user@sd-dev:~/securedrop$ for lang in $(securedrop/bin/dev-shell ./i18n_tool.py list-locales); do jq ".supported_locales | has(\"$(echo $lang | sed 's/\r$//')\") // \"$lang\"" securedrop/i18n.json | grep -v "true"; done
"ar"
"en_US"
user@sd-dev:~/securedrop$ git checkout 6605-add-ar securedrop/i18n.json
Updated 1 path from 733d8d79a
user@sd-dev:~/securedrop$ for lang in $(securedrop/bin/dev-shell ./i18n_tool.py list-locales); do jq ".supported_locales | has(\"$(echo $lang | sed 's/\r$//')\") // \"$lang\"" securedrop/i18n.json | grep -v "true"; done
"en_US"

(en_US is expected to be omitted, because it's the unenumerated default locale.)

@cfm cfm merged commit cc3ed8a into develop Oct 11, 2022
@zenmonkeykstop zenmonkeykstop deleted the 6605-add-ar branch January 16, 2023 23:58
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.

Arabic not included in i18n.json
2 participants