-
Notifications
You must be signed in to change notification settings - Fork 37
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 list of supported languages; disable unsupported languages #1438
Comments
(.venv) user@sd-dev:~/securedrop-client$ git diff
diff --git a/Makefile b/Makefile
index e7a7a9c..f5ea434 100644
--- a/Makefile
+++ b/Makefile
@@ -236,6 +236,6 @@ supported-languages:
--format json \
--url ${WEBLATE_API} \
list-translations \
- | jq -r 'map(select(.component.slug == "${WEBLATE_COMPONENT}" and .translated_percent == 100)) | map("* \(.language.name|tostring) (``\(.translated_percent|tostring)``)") | join("\n")' \
+ | jq -r 'map(select(.component.slug == "${WEBLATE_COMPONENT}" and .translated_percent == 100)) | map("* \(.language.name|tostring) (``\(.language.code|tostring)``)") | join("\n")' \
> ${SUPPORTED_LOCALES_LIST}
@git add ${SUPPORTED_LOCALES_LIST}
(.venv) user@sd-dev:~/securedrop-client$ make supported-languages
(.venv) user@sd-dev:~/securedrop-client$ git diff --cached
diff --git a/l10n.txt b/l10n.txt
new file mode 100644
index 0000000..f7d72ee
--- /dev/null
+++ b/l10n.txt
@@ -0,0 +1,7 @@
+* English (``en``)
+* German (``de``)
+* Spanish (``es``)
+* Icelandic (``is``)
+* Turkish (``tr``)
+* Chinese (Simplified) (``zh_Hans``)
+* Russian (``ru``) I added this target for parity with Whether or not we want to keep this human-readable
The caveat to both of these approaches is that they ask what languages are 100% translated in Weblate, not in (1) the package from which the Client is being run or (2) the ref from which a package is being built. To do that, we'd have to:
I'm leaning towards (3), because it (a) adds no new dependencies or calls and (b) has the least risk of surprise to packagers or users. What do you think among these options, @eloquence? |
So, I'm not sure we'll immediately want to "unsupport" a language if it drops below 100% - there's probably a threshold where we give translators some time to catch up in case they miss a few strings between releases. Otherwise we run the risk that the software as a whole falls back to English just because a couple of strings didn't make it. Similarly, 100% translation doesn't necessarily mean that a language actually works as well, as the RTL example illustrates. I'm not sure how that influences the choice between different technical approaches, but it's one reason I might want to lean towards the decision of what languages to be enabled to be made by humans looking at statistics and considering other factors. So a simple list of language codes in setup.py or elsewhere (which possibly could be overridden via an env var if you want to preview an incomplete language) might be the way to go. Does that make sense? |
@eloquence in #1438 (comment):
freedomofpress/securedrop#6156 has convinced me of this approach, which I've recorded there in freedomofpress/securedrop#6387. Specifically, for each project:
|
Per #1438, language support will be a maintainers' decision, rather than an automated check based on translation coverage in Weblate.
Per #1438, language support will be a maintainers' decision, rather than an automated check based on translation coverage in Weblate.
Per #1438, language support will be a maintainers' decision, rather than an automated check based on translation coverage in Weblate.
Per #1438, language support will be a maintainers' decision, rather than an automated check based on translation coverage in Weblate.
Per #1438, language support will be a maintainers' decision, rather than an automated check based on translation coverage in Weblate.
SecureDrop Client translation is currently unofficially supported via Weblate (it has not been announced/publicized yet); as a consequence, some volunteers have started translating the client into other languages. We do even have some 100% completions already:
https://weblate.securedrop.org/projects/securedrop/securedrop-client/
The way it works right now, however, you can run the app in a partially translated language. For example, as of this writing, Catalan is at 69%, and you'll see a partially translated UI if you launch it with
LANG=ca
.Ideally, we should only enable languages in the app once they've reached full completion, and only disable them once they fall below a certain threshold (e.g., 80%). To do so, we need to be able to specify a list of languages that are supported, vs. ones that are currently unsupported. This should not prevent translation in Weblate, it should only prevent the language from being made available in the app.
If we're unable to initially support certain languages for technical reasons (e.g., RTL languages, see #1406), we can also use that capability to delay enabling those languages until technical foundations are in place.
The text was updated successfully, but these errors were encountered: