-
Notifications
You must be signed in to change notification settings - Fork 42
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
rework localization Make targets for PR-level use #1317
Comments
As a side effect, no .mo files will be compiled at runtime, and the Client will fall back to the English source strings as if untranslated, regardless of locale, until a revised version of this translation worfklow is restored in #1317.
As a side effect, no .mo files will be compiled at runtime, and the Client will fall back to the English source strings as if untranslated, regardless of locale, until a revised version of this translation worfklow is restored in #1317.
@creviera and I met today to discuss proposals #1347 and #1348 and their background considerations. We affirmed our interest in these proposals over the previous #1282, because they:
Between the two options, we favor #1348, which:
Compared to #1347, (2) lets us minimize the noisiness of diffs in pull requests and eliminate some custom tooling. Compared to both #1347 and #1282, (3) lets us eliminate some custom tooling and its dependencies in My next steps:
|
Context
In #1282 we implemented:
update-translation-catalogs
to extract source strings fromsecuredrop_client/**/*.py
for Weblate to make available to translators; andl10n
to make this target nightly onmain
.In freedomofpress/infrastructure#3593 we have since concluded that this workflow requires that our @weblate-fpf bot push directly to
main
, which we are not willing to allow.Goal
After discussing a number of alternatives, we have decided to adapt #1282's Make targets to be used interactively by developers (and perhaps in a Git pre-commit hook) and then enforced linter-style in CI.
In addition to removing the requirement that @weblate-fpf be able to push directly to
main
, this approach has two new advantages:securedrop_client/locale/messages.pot
) will be recorded in the same commit, and reviewed in the same pull request, as the changes in the source strings from which they are extracted.Steps
l10n
GitHub Actions workflow.check-translation-catalogs
, which returns0
iffmake update-translation-catalogs
is a no-op (i.e.,git diff --quiet || exit 1
with a helpful warning).make check-translation-catalogs
to thelint
CircleCI job, making it a requirement for a pull request to pass CI.make {check,update}-translation-catalogs
.make help
.The text was updated successfully, but these errors were encountered: