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

SecureDrop i18n #753

Closed
wants to merge 4 commits into from
Closed

SecureDrop i18n #753

wants to merge 4 commits into from

Conversation

kcchu
Copy link

@kcchu kcchu commented Nov 16, 2014

screen shot 2014-11-16 at 1 53 23 pm

  • Integrates with Flask-Babel to add i18n and l10n support
  • Languages are selected by Accept-Languages header or manual override
    by query parameter
  • Adds a language selection menu in page footer
  • Tags strings in source and journalist interface for translation
  • Integrates with Transifex to collaborate on translation (https://www.transifex.com/projects/p/securedrop-app-code/)
  • Fully translates into Italian and Traditional Chinese
  • Setup vagrant to compiles translation files while running provision
  • Unit tests
  • resolve Transifex #127

Todo:

  • build_deb_packages.sh does not compile translation files
  • Relative time format is not localized

@@ -452,7 +483,7 @@ def generate_code():
doc.filename = store.rename_submission(g.sid, doc.filename, g.source.journalist_filename())
db_session.commit()

flash("The source '%s' has been renamed to '%s'" % (original_journalist_designation, g.source.journalist_designation), "notification")
flash(_("The source '%(original_journalist_designation)s' has been renamed to '%(new_journalist_designation)s'", original_journalist_designation=original_journalist_designation, new_journalist_designation=g.source.journalist_designation), "notification")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than continue with the deprecated % format string syntax, can we switch this (and any other similar uses of %) over to .format? I've recently been trying to replace every instance of % with .format whenever I come across them, but clearly there are still some stragglers.

@runasand
Copy link
Contributor

If we want to integrate translations, we need to make sure that we review the strings before they are included in the update or release that we put out. Transifex does not do any validation and so we cannot blindly trust the data we get.

@kcchu
Copy link
Author

kcchu commented Nov 17, 2014

I have updated the PR. Fixed unit test failures and also addressed @garrettr concerns. For strings in python code, I have changed to use .format instead of %. For template files, I changed it to use the jinja2's format filter, which should be the preferred way to format strings in template.

@kcchu
Copy link
Author

kcchu commented Nov 17, 2014

@runasand We can talk about how to manage the translations in the long run. Transifex is a useful tool to allow volunteers to contribute translations. I have used it in other open source projects and it works quite well. Transifex supports a review workflow. You set up CI tasks such that only strings reviewed by trusted reviewers are integrated to the codebase.

@kcchu kcchu force-pushed the i18n branch 3 times, most recently from f5ef1a6 to 65e1e5a Compare November 17, 2014 05:31
@gdamdam
Copy link

gdamdam commented Nov 17, 2014

@runasand the files generated with Transifex are simple and the code is very easy to review...
If you think that Transifex is not a good solution we can discuss alternatives to allow trusted volunteers to contribute translations. One possible solution could be install Pootle on a trusted server (https://github.com/translate/pootle).

@runasand
Copy link
Contributor

I used Transifex extensively while working with/for the Tor Project and agree it's very useful when you want to allow volunteers to contribute translations. My point was simply that we need to include a review of all strings into our workflow as the platform does not do any validation or sanitization.

@kcchu
Copy link
Author

kcchu commented Dec 23, 2014

It has been a month since the PR is posted. Any problem with this changeset?

@yozel
Copy link

yozel commented Dec 24, 2014

What is the current situation? I would be glad to translate securedrop to Turkish.

kcchu and others added 4 commits December 26, 2014 11:40
- Integrates with Flask-Babel to add i18n and l10n support
- Languages are selected by Accept-Languages header or manual override
  by query parameter
- Integrates with Transifex to collaborate on translation
- Unit tests

Todo:
- build_deb_packages.sh does not compile translation files
- Relative time format is not localized
- Tags strings in source and journalist interface for translation
- Adds a language selection menu in page footer
- 100% translation of source and journalist interface
- 100% translation of source and journalist interface
@yozel
Copy link

yozel commented Mar 10, 2015

It has been 4 month since this pull request is posted? Now What? What's current situation?

@joweiser
Copy link

I'm currently working on a German translation which is nearly finished. Is there already a standard for how to contribute translations?

@semente
Copy link
Contributor

semente commented Nov 8, 2015

About what @runasand pointed out about the reviewing process of Transifex translations, I suggest that only pull requests from the coordinator(s) of a language could be accepted.

@kcchu
Copy link
Author

kcchu commented Nov 8, 2015

I guess some of you are from Aaron Swartz Hackathon today. You may already notice that this pull request was created exactly one year ago, began at Aaron Swartz Hackathon last year (with @gdamdam who is a great guy now working for Internet Archive). I really appreciate to all your work to continue this effort. i18n is crucial in bring SecureDrop to many parts of the world where people literally die for whistleblowing. However, you can see that this pull request was sitting here for a year and the project members didn't follow it up. They seems to be uninterested in this effort. So, if you are in the Hackathon and seeing @garrettr around, please talk to him and see what he is thinking about it.

@alexandervlpl
Copy link

Mentioning @RaedsLab, @jdunck, @flamsmark, @toholdaquill, @heartsucker, and @yuvadm who discussed this in related issues (#127, #1168).

Ladies and gents, is there any good reason why after years of discussion (and at least one decent PR) this much-needed software is still only for English speakers? I'd like to contribute a Russian translation, and can work on integrating the localization functionality.

About reviewing translations contributed by volunteers: isn't it enough that they'll be verified by the community like the rest of the code base? Once it's clear to interested people around the world that this project is for them and their countries too, I think there will be enough volunteers to ensure that translations are correct.

@heartsucker
Copy link
Contributor

@alexandervlpl Three PR's, actually.

#1103
#1192

@alexandervlpl
Copy link

So who makes the decisions here? Is it possible to get some progress on this?

@heartsucker
Copy link
Contributor

@alexandervlpl: Some combination of @garrettr, @conorsch, and @fowlslegs. Maybe some others.

@psivesely
Copy link
Contributor

psivesely commented Sep 24, 2016

We're postponing internationalization because we're currently focusing on research into:

  1. Tor website fingerprinting attacks (see https://github.com/freedomofpress/FingerprintSecureDrop, a work-in-progress).
  2. A rearchitecture of the SecureDrop system with the fundamental motivation of making it easier to use, deploy, and maintain.
  3. A number of other projects I won't all name here.

When we do internationalization, we want to do it right. That why we think it's important we:

  1. Wait until we've wrapped up (or gotten to "maintenance mode") other projects.
  2. Test out internationalization on a smaller project since we don't have organizational experience with the process yet.
  3. (Most importantly) wait until the next major version of SecureDrop is released, which will include a rewrite (and reduction in size) of at least half of our over 100 pages (printed) of documentation.

We don't think it would be wise to invest our time and our contributors time translating scores of pages that will need to be rewrittten a year later, and we don't have the time or resources to handle what we'd need to in order to feel comfortable merging this PR right now.

The contribution is really appreciated, and I believe there is probably a solid amount of work here than can eventually contribute to the internationalization of Securedrop 1.0.

@alexandervlpl
Copy link

That's reasonable. Thanks for all your hard work, and please keep us posted!

@redshiftzero
Copy link
Contributor

I know that there is a lot of demand for internationalization of SecureDrop and we appreciate this is incredibly important. We really want to translate and localize SecureDrop, but given some of the other improvements we're working on and that we're a small team, we don't currently have the bandwidth to add this feature and begin managing translations. We really appreciate this contribution, but given that we can't add this right now and that this PR has been pending merge for several years, I am going to close this PR for now.

@alexandervlpl
Copy link

@redshiftzero : With all due respect, you're making it sound like every member of your team will need to personally learn 10 languages by next week and get translating, instead of working on critical issues and features.

The way I see it, "we either localise or we fix bugs" is just a false dichotomy. Plenty of important open source projects leave localisation to the community while core developers work on the actual code-base. It's one of the big reasons for making a project open source in the first place. My two cents.

@ghost
Copy link

ghost commented Jul 16, 2017

@alexandervlpl the i18n/l10n effort has resumed as a community driven project which is going to be gradually merged into SecureDrop. As of this week end it is complete (both source & journalist interfaces) and the i18n commits are at https://github.com/dachary/securedrop/commits/wip-i18n-base . The l10n effort is complete for French and 50% of the work done for German by @heartsucker is still valid and was resurrected. It is happening at http://weblate.securedrop.club/

The discussions about translation happen in the translation category of the SecureDrop forum. It would be great to hear what you think about all this :-)

@ghost
Copy link

ghost commented Jul 16, 2017

@kcchu years later the italian translation is still 30% good ! It was imported in http://weblate.securedrop.club/projects/securedrop/securedrop/ . I'm however having trouble with zh_Hant . It would be great if you could take a quick look. I'm hoping this is something simple and me just being ignorant :-) https://forum.securedrop.club/t/zh-hant-does-not-render-as-expected

@ghost
Copy link

ghost commented Jul 29, 2017

@kcchu traditional chinese was imported https://weblate.securedrop.club/projects/securedrop/securedrop/zh_Hant/ and is still 34% good. Would you know someone willing to complete the translation ?

@kcchu
Copy link
Author

kcchu commented Jul 30, 2017

@dachary I can certainly help completing the translation to both Traditional Chinese (for Taiwan and Hong Kong) and Simplified Chinese (for PRC). However, because of the expierence I got from my initial i18n efforts, I will wait until most of the patches are merged into mainline or the i18n project get a clear roadmap.

@ghost
Copy link

ghost commented Jul 30, 2017

@kcchu it's great to know you're still interested :-) FWIW, my work is done as an external contributor and I am fully aware of the past troubles. I believe SecureDrop should be a community driven project to avoid that kind of problems. It is good that FPF is a driving force for SecureDrop but divergence of opinions on large features such as i18n need to be resolved with a compromise, not with an unilateral decision.

This discussion is beyond the scope of this issue, of course :-) I started a thread in the forum and it would be great to hear what you have to say about it, if you have the time.

@ghost
Copy link

ghost commented Dec 4, 2017

@kcchu would you be interested in reviewing the Chinese translation ? I'm happy to report the i18n work you initiated years ago is finally complete and has been merged a few weeks ago. The 0.5 release to be published tomorrow will have official support for seven new languages. I'm hoping the next release (late january 2018) can also feature Chinese :-)

@kcchu
Copy link
Author

kcchu commented Dec 4, 2017

Yes, I can take this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transifex