mozilla / remote-newtab

Remotely-hosted New Tab Page
https://mozilla.github.io/remote-newtab/src/
Mozilla Public License 2.0
15 stars 7 forks source link

Implement localization + automation #126

Closed oyiptong closed 8 years ago

oyiptong commented 8 years ago
marcoscaceres commented 8 years ago

I've added support for verifying the l10n data. There are significant gaps, which I'm plugging with en-US content.

Unfortunately, it won't be possible to do "lookup" to fill the gaps, because only like 2 locales provide such an ability. That's ok tho. We can just file bugs for everything and see if the localizers can find people to fill the gaps for us.

marcoscaceres commented 8 years ago

The following files are 404:

oyiptong commented 8 years ago

boo. we could also procure the raw .lang files. it would be just a tiny bit more work than parsing the xml

edit: I spoke to l10n'ers and it looks like they have localizations coming from various sources. the source of truth should be those xml+dtd files

oyiptong commented 8 years ago

actually instead of trying to obtain them from mxr why not obtain them from hg?

oyiptong commented 8 years ago

spoke to Aryx and Pike on irc.

Here's where we should get the localizations: http://hg.mozilla.org/releases/l10n/mozilla-aurora

Apparently, localizers prefer to work on Aurora. Presumably because nightly code changes too much.

oyiptong commented 8 years ago

To be more precise, the list of shipping localizations is here: https://hg.mozilla.org/releases/mozilla-aurora/raw-file/tip/browser/locales/shipped-locales

Based on those localizations, we can construct HTTP fetches based on this URL structure:

For en-US:

https://hg.mozilla.org/mozilla-central/raw-file/tip/browser/locales/en-US/chrome/browser/newTab.dtd https://hg.mozilla.org/mozilla-central/raw-file/tip/browser/locales/en-US/chrome/browser/newTab.properties

For the rest: https://hg.mozilla.org/releases/l10n/mozilla-aurora/en-GB/raw-file/tip/browser/chrome/browser/newTab.dtd https://hg.mozilla.org/releases/l10n/mozilla-aurora/en-GB/raw-file/tip/browser/chrome/browser/newTab.properties

This should be a small addition + modification for code in #136

oyiptong commented 8 years ago

checking it out a couple of cases:

locale "st" is missing from https://hg.mozilla.org/releases/mozilla-aurora/raw-file/tip/browser/locales/shipped-locales, therefore shouldn't have a corresponding l10n.

from https://gist.github.com/marcoscaceres/4c0e4a360cb8a44ea900#file-l10n_gaps-log-L10-L69, which was missing from mxr:

$ curl https://hg.mozilla.org/releases/l10n/mozilla-aurora/be/raw-file/tip/browser/chrome/browser/newTab.properties
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

newtab.pin = Прышпіліць пляцоўку на цяперашняе месца
newtab.unpin = Адшпіліць пляцоўку
newtab.block = Прыняць гэтую пляцоўку
newtab.show = Паказаць старонку новай устаўкі
newtab.hide = Схаваць старонку новай устаўкі
newtab.sponsored = Паказваць звесткі ў праплачаных чарапічынах
oyiptong@quanta:~/temp$ curl https://hg.mozilla.org/releases/l10n/mozilla-aurora/be/raw-file/tip/browser/chrome/browser/newTab.dtd
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<!ENTITY newtab.pageTitle "Новая ўстаўка">
<!ENTITY newtab.undo.removedLabel "Накід выдалены.">
<!ENTITY newtab.undo.undoButton "Адмяніць.">
<!ENTITY newtab.undo.restoreButton "Вярнуць усё.">
<!ENTITY newtab.undo.closeTooltip "Схаваць">
<!ENTITY newtab.sponsored.release.message "Прапаноўваецца гэтая праплачаная пляцоўка, бо мы спадзяваемся, што яна цікавая вам, і таму, што праплатчык падтрымлівае місію Mozilla.">
<!ENTITY newtab.sponsored.trial.message "Прапаноўваецца гэтая спробная праплачаная пляцоўка, бо мы спадзяваемся, што яна цікавая вам, і таму, што праплатчык падтрымлівае місію Mozilla.">
<!ENTITY newtab.panel.link.text "Падрабязней…">
k88hudson commented 8 years ago

Moving to new ticket