You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why are these omissions so difficult to catch during manual testing in the string-freeze process? At that point in the localization cycle, strings not (or incorrectly) marked for translation are indistinguishable from strings not yet translated.
We could solve this problem at least for human eyes by turning on Weblate's "pseudolocale generation":
Pseudolocales are useful to find strings that are not prepared for localization. This is done by altering all translatable source strings to make it easy to spot unaltered strings when running the application in the pseudolocale language.
I've configured the "pseudolocale generation" add-on at weblate-sandbox.securedrop.org with these settings per Weblate and Microsoft recommendations:
Setting
Value
Source strings
English
Fixed string prefix
[
Variable string prefix
!
Fixed string suffix
]
Variable string suffix
!
Variable part multiplier
0.1
For the Target language setting, I tried both Weblate's recommendeden_XA and a custom "unknown" locale und_US. Even once added in securedrop/i18n.json, neither is usable by Babel because neither is present in the Unicode Common Locale Data Repository:
>>>importbabel>>>babel.Locale.parse('en_XA')
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/home/user/securedrop/.venv/lib/python3.9/site-packages/babel/core.py", line330, inparseraiseUnknownLocaleError(input_id)
babel.core.UnknownLocaleError: unknownlocale'en_XA'>>>babel.Locale.parse('und_US')
Locale('en', territory='US') # collides with real en_US
We ran into a version of this problem in #6406, where under test we cheekily defined:
#6380 (comment):
We could solve this problem at least for human eyes by turning on Weblate's "pseudolocale generation":
Originally posted by @cfm in #6380 (comment)
Testing
In
freedomofpress/securedrop-i18n-sandbox
fromweblate-sandbox.securedrop.org
:securedrop/i18n.json
make dev
, pseudolocale can be selected in Source and Journalist InterfacesProduction
In
freedomofpress/securedrop-i18n
fromweblate.securedrop.org
:The text was updated successfully, but these errors were encountered: