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

eo locale is overloaded between tests and pseudolocale generation #6873

Closed
cfm opened this issue Jun 22, 2023 · 1 comment · Fixed by #6919
Closed

eo locale is overloaded between tests and pseudolocale generation #6873

cfm opened this issue Jun 22, 2023 · 1 comment · Fixed by #6919
Assignees
Labels
bug i18n Anything related to translation or internationalization of SecureDrop

Comments

@cfm
Copy link
Member

cfm commented Jun 22, 2023

Description

After #6406, we expect NEVER_LOCALE = "eo" to be, well, never available. It's how we test worst-case scenarios for the locale resolver, such as if an instance's default or even only configured locale loses support. This has been enforced in CI, including on freedomofpress/securedrop@develop, since May 2022.

After #6690, however, eo is available as the "pseudolocale" used to catch unmarked (untranslatable) source strings and test variable string widths. This has been available from Weblate on freedomofpress/securedrop-i18n@i18n since January 2023.

In effect, we've been operating in a partition between tooling and tests: the one violates the other's assumptions, but they only come into contact during the release/QA/localization cycle.

Steps to Reproduce

$ git checkout b0704e4c11a0c8f9de1db2fa64696230ad2d9ea4
$ TESTFILES=tests/test_i18n.py make test

Expected Behavior

Tests pass.

Actual Behavior

Failures:

tests/test_i18n.py::test_no_usable_fallback_locale FAILED                                        [ 25%]
tests/test_i18n.py::test_unusable_default_but_usable_fallback_locale FAILED                      [ 33%]

Comments

There are a few moving parts here:

  1. The general solution to UnknownLocalError on for Occitan (oc) #6869 will let us address the confusion I raised in enable automatically-generated "pseudolocale" #6690 (comment) but never addressed: The values of NEVER_LOCALE and the pseudolocale should each (independently) be able to be whatever we want.
  2. i18n branches and/or repository should run full CI workflow #6876
@cfm cfm added bug i18n Anything related to translation or internationalization of SecureDrop labels Jun 22, 2023
@cfm cfm added this to the SecureDrop 2.7.0 milestone Jun 22, 2023
@cfm cfm self-assigned this Jun 22, 2023
cfm added a commit that referenced this issue Jun 22, 2023
cfm added a commit that referenced this issue Jun 22, 2023
cfm added a commit that referenced this issue Jun 22, 2023
Pending #6873, xfail (expect failures) in:

- test_no_usable_fallback_locale
- test_unusable_default_but_usable_fallback_locale

(cherry picked from commit cdead89)
zenmonkeykstop pushed a commit that referenced this issue Jun 23, 2023
Full report to follow in #6873.

(cherry picked from commit cdead89)
@cfm
Copy link
Member Author

cfm commented Aug 16, 2023

#6873 (comment):

The general solution to UnknownLocalError on for Occitan (oc) #6869 will let us address the confusion I raised in enable automatically-generated "pseudolocale" #6690 (comment) but never addressed: The values of NEVER_LOCALE and the pseudolocale should each (independently) be able to be whatever we want.

freedomofpress/securedrop-dev-docs#85 proves this to be wishful thinking. But the fix here turns out to be simple enough in #6919.

@cfm cfm closed this as completed in #6919 Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug i18n Anything related to translation or internationalization of SecureDrop
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant