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

i18n: display localizer credits for inclusion in the release blog #3184

Closed
wants to merge 21 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 21, 2018

Status

🔴 Work in progress 🔴

Description of Changes

Display localizer credits for inclusion in the release blog

Testing

  • ./i18n_tool.py --verbose update-from-weblate # will create two commits with updates from weblate
  • ./i18n_tool.py --verbose credits --username admin --password adminpassword # requires a weblate admin account (@redshiftzero you have admin permissions)
  • verify the output matches the content of the commites created by update-from-weblate

Deployment

N/A

Checklist

If you made changes to documentation:

  • Doc linting (make docs-lint) passed locally

Loic Dachary added 21 commits March 20, 2018 12:00
So it is properly aligned as class methods. Only whitespace
modification and the class I81NTool(object) added to look
consistent.
Because there is no way to override the defaults otherwise.
The logic of tests remains the same but use command line options via
the main() method such as:

        i18n_tool.I18NTool().main([
            '--verbose',
            'translate-desktop',
            '--translations-dir', str(tmpdir),
            '--sources', in_files['source'],
            '--extract-update',

instead of exposing i18n_tool internal details to the tests:

        kwargs = {
            'translations_dir': str(tmpdir),
            'sources': in_files['source'],
            'extract_update': True,
            'compile': False,
            'verbose': logging.DEBUG,
            'version': version.__version__,
        }
        args = argparse.Namespace(**kwargs)
        tool = i18n_tool.I18NTool()
        tool.setup_verbosity(args)

the major drawback of the Namespace mockup is that it must contain all
arguments used by the function, even if the argument has a default
because the arguments are not parsed. It is an unecessary burden
during the test maintenance.
The parser and implementation functions for
translate_{desktop,messages} are grouped together instead of being
separated by the more generic get_args function. This will help
clustering new functions.
To update the list of supported languages in the documentation and
commit the change so the associated commit message is always the same.
A side effect of running pip-compile is the upgrade to

  cryptography==2.2

which was manually overriden to keep

  cryptography==2.0.3

so there is no upgrade, just new modules being added.
@ghost ghost added feature i18n Anything related to translation or internationalization of SecureDrop labels Mar 21, 2018
@ghost ghost requested review from heartsucker and redshiftzero as code owners March 21, 2018 22:31
@ghost ghost force-pushed the wip-dachary-i18n-tool branch from 7bd124a to ad81086 Compare March 21, 2018 23:09
@ghost ghost changed the title Wip dachary i18n credits i18n: display localizer credits for inclusion in the release blog Mar 21, 2018
@ghost ghost force-pushed the wip-dachary-i18n-tool branch 2 times, most recently from a51cc22 to af0186f Compare March 26, 2018 22:05
@ghost ghost force-pushed the wip-dachary-i18n-tool branch 3 times, most recently from c059c03 to 2691ed8 Compare March 26, 2018 22:50
@ghost ghost closed this May 2, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature i18n Anything related to translation or internationalization of SecureDrop PR: Pending additional work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants