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

feat: enable pt_PT and zh_Hans as supported languages #1531

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

cfm
Copy link
Member

@cfm cfm commented Jul 6, 2022

Description

As of #1527, 2 languages are 100% translated and approved (listed in Weblate sort order)

  1. zh_Hans: Chinese (Simplified)
  2. pt_PT: Portuguese (Portugal)

Another 5 are 100% translated but only partially approved (listed in Weblate sort order):

  1. de: German
  2. ca: Catalan
  3. is: Icelandic
  4. sv: Swedish
  5. tr: Turkish

To err on the side of conservatism for now, here we enable only pt_PT and zh_Hans as 100% translated and approved.

Test Plan

  • Both pt_PT and zh_Hans are packaged:
    (.venv) user@sd-dev:~/securedrop-client$ python setup.py sdist 2> /dev/null | grep -E "(pt_PT|zh_Hans)"
    creating securedrop-client-0.7.0/securedrop_client/locale/pt_PT
    creating securedrop-client-0.7.0/securedrop_client/locale/pt_PT/LC_MESSAGES
    creating securedrop-client-0.7.0/securedrop_client/locale/zh_Hans
    creating securedrop-client-0.7.0/securedrop_client/locale/zh_Hans/LC_MESSAGES
    copying securedrop_client/locale/pt_PT/LC_MESSAGES/messages.mo -> securedrop-client-0.7.0/securedrop_client/locale/pt_PT/LC_MESSAGES
    copying securedrop_client/locale/pt_PT/LC_MESSAGES/messages.po -> securedrop-client-0.7.0/securedrop_client/locale/pt_PT/LC_MESSAGES
    copying securedrop_client/locale/zh_Hans/LC_MESSAGES/messages.mo -> securedrop-client-0.7.0/securedrop_client/locale/zh_Hans/LC_MESSAGES
    copying securedrop_client/locale/zh_Hans/LC_MESSAGES/messages.po -> securedrop-client-0.7.0/securedrop_client/locale/zh_Hans/LC_MESSAGES
  • Install this package into your venv:
    (.venv) user@sd-dev:~/securedrop-client$ pip install dist/securedrop-client-0.7.0.tar.gz
  • The Client loads in Portuguese (Portugal):
    (.venv) user@sd-dev:~/securedrop-client$ LANG=pt_PT .venv/bin/sd-client
  • The Client loads in Chinese (Simplified):
    (.venv) user@sd-dev:~/securedrop-client$ LANG=zh_Hans .venv/bin/sd-client

Checklist

If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:

  • I have tested these changes in the appropriate Qubes environment
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:

  • I have updated the AppArmor profile
  • No update to the AppArmor profile is required for these changes
  • I don't know and would appreciate guidance

If these changes modify the database schema, you should include a database migration. Please check as applicable:

  • I have written a migration and upgraded a test database based on main and confirmed that the migration is self-contained and applies cleanly
  • I have written a migration but have not upgraded a test database based on main and would like the reviewer to do so
  • I need help writing a database migration
  • No database schema changes are needed

@cfm cfm added the i18n label Jul 6, 2022
@cfm cfm changed the title chore: enable pt_PT and zh_Hans as supported languages feat: enable pt_PT and zh_Hans as supported languages Jul 6, 2022
@cfm cfm force-pushed the supported-languages branch from 3e92e7e to 053de76 Compare July 6, 2022 02:17
@cfm cfm marked this pull request as ready for review July 6, 2022 02:18
@cfm cfm requested a review from a team as a code owner July 6, 2022 02:18
@cfm
Copy link
Member Author

cfm commented Jul 7, 2022

This pull request did not make it into v0.8.0, so we'll need to reassess translation coverage for supported languages for the next release.

@cfm cfm closed this Jul 7, 2022
@cfm cfm mentioned this pull request Jul 7, 2022
10 tasks
@eloquence eloquence reopened this Jul 12, 2022
@eloquence
Copy link
Member

As discussed, taking this for a spin; if all looks good, we should be able to turn those languages on for 0.9.0.

cfm added 2 commits July 12, 2022 17:01
100% translated and approved as of #1527.
100% translated and approved as of #1527.
@eloquence eloquence force-pushed the supported-languages branch from 053de76 to 42aaf10 Compare July 13, 2022 00:01
@eloquence
Copy link
Member

(Rebased to main.)

@eloquence
Copy link
Member

  • Both pt_PT and zh_Hans are packaged:

I built a full package from the branch and installed in sd-small-bullseye-template rather than the venv method, and verified that I was able to switch languages to Portuguese (Portugal) and Simplified Chinese. There are a couple of issues with translation support that I'll file separately, but I don't think that needs to hold up merging initial support for languages that have complete coverage.

  • The Client loads in Portuguese (Portugal):
  • The Client loads in Chinese (Simplified):

pt-spacing
zh-offline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants