-
Notifications
You must be signed in to change notification settings - Fork 687
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
SecureDrop i18n #753
Conversation
@@ -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") |
There was a problem hiding this comment.
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.
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. |
I have updated the PR. Fixed unit test failures and also addressed @garrettr concerns. For strings in python code, I have changed to use |
@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. |
f5ef1a6
to
65e1e5a
Compare
@runasand the files generated with Transifex are simple and the code is very easy to review... |
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. |
It has been a month since the PR is posted. Any problem with this changeset? |
What is the current situation? I would be glad to translate securedrop to Turkish. |
- 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
It has been 4 month since this pull request is posted? Now What? What's current situation? |
I'm currently working on a German translation which is nearly finished. Is there already a standard for how to contribute translations? |
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. |
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. |
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. |
@alexandervlpl Three PR's, actually. |
So who makes the decisions here? Is it possible to get some progress on this? |
@alexandervlpl: Some combination of @garrettr, @conorsch, and @fowlslegs. Maybe some others. |
We're postponing internationalization because we're currently focusing on research into:
When we do internationalization, we want to do it right. That why we think it's important we:
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. |
That's reasonable. Thanks for all your hard work, and please keep us posted! |
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. |
@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. |
@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 :-) |
@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 |
@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 ? |
@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. |
@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. |
@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 :-) |
Yes, I can take this. |
by query parameter
Todo: