-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Import l10n files from mozilla-aurora [WIP] #3766
Conversation
|
||
// Defines all languages that have a translation at mozilla-aurora. | ||
// This is used in make.js for the importl10n command. | ||
function getlangcodes() { |
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.
Nit: use lowerCamelCase, i.e. getLangCodes
.
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.
Don't know what I was thinking there. Fixed in new commit :)
Can this be merged? |
@timvandermeij Okay, let's do this:
Last two can be done in the separate commit. |
I have a question in connection with this: Does this mean that, going forward, all PRs that update locales (except for en-US of course) will be rejected? The reason that I think we should make a decision about this is the following case: I believe that it would be a good idea make a decision about this, and then preferably adding this information to the Wiki and CONTRIBUTING.md. |
Good question. But can we afford to do micro-merging? How about we will still accept the pull request, but we will override the patches/changes will new sync.
Yes, we shall mention that there |
That's exactly what I've been thinking too! |
@yurydelendik Sounds like a good plan. One question though: where would I put the README.md file? |
https://github.com/mozilla/pdf.js/tree/master/l10n is a good place for it |
@@ -0,0 +1 @@ | |||
Most of the files in this folder (except for the `en-US` folder and the `metadata.inc` files) have been imported from the Firefox Aurora branch, which is located at https://mxr.mozilla.org/l10n-mozilla-aurora/source. Those files are licensed under the MPL license. You can obtain a copy of the license at http://mozilla.org/MPL/2.0. |
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.
Some of the files license under apache2. We can reword "Those files are licensed under the MPL license. " -> "Some of the files are licensed under the MPL license."
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.
Could you split/format text at 80 chars margin?
move import_locales.js to the external/importL10n/ folder |
If you are developing a custom solution, first check examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare short well-documented example that demonstrate the problem and make it accessible online on your website, jsbin, github, etc. before opening a new issue or contacting us on the IRC channel -- keep in mind that just code snippets won't help us troubleshoot the problem. The issues that do not provide enough details will be closed as invalid/incomplete. | ||
If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us on the IRC channel -- keep in mind that just code snippets won't help us troubleshoot the problem. | ||
|
||
Note that the translations for PDF.js in the `l10n` folder are synchronized with the Aurora branch of Mozilla Firefox. This means that we will still accept pull requests that update translations (because it can take a few weeks before the most recent translations are in the Aurora branch), but keep in mind that the changes will be overwritten when we synchronize again. |
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.
Shouldn't this more explicitly state that we only will accept PRs that add strings currently missing in Aurora, i.e. no PRs which changes existing strings (since they are pointless)?
Also, since PDF.js spends one cycle (= six weeks) on Nightly before being uplifted to Aurora, I suggest changing "because it can take a few weeks" to "because it will take at least six weeks".
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.
Good point! I will definitely change that.
…ed with the proper language codes
Superseded by #4504. |
This PR fixes #3242 and supersedes #3762. It adds a Makefile utility called
importl10n
(call:node make importl10n
) that fetches the latest l10n files from mozilla-aurora. This implies that translations should now only be done at the central Mozilla repository and not here anymore. This avoids users translating strings here that are already translated by the Firefox team and makes sure that translations are always synchronized between Firefox and PDF.js.Note that this tool keeps our
metadata.inc
files because the Firefox team does not translate those.The PR changes the regex used in
node make firefox
a bit to allow the new languages codes from mozilla-aurora, in particular three-letter codes.external/importL10n
(saylocales.js
) in a functiondownloadLanguageFiles(lang, dest)
.CONTRIBUTING.md
.CONTRIBUTING.md