Merge pull request #4504 from timvandermeij/importl10n

Import l10n files from mozilla-aurora
This commit is contained in:
Yury Delendik 2014-03-26 17:52:45 -05:00
commit 5fc806823e
207 changed files with 13656 additions and 1641 deletions

21
make.js
View file

@ -202,7 +202,7 @@ target.locale = function() {
if (!test('-d', path)) {
continue;
}
if (!/^[a-z][a-z](-[A-Z][A-Z])?$/.test(locale)) {
if (!/^[a-z][a-z]([a-z])?(-[A-Z][A-Z])?$/.test(locale)) {
echo('Skipping invalid locale: ' + locale);
continue;
}
@ -1311,3 +1311,22 @@ target.makefile = function() {
makefileContent += '.PHONY: ' + targetsNames.join(' ') + '\n';
makefileContent.to('Makefile');
};
//
//make importl10n
//
target.importl10n = function() {
var locales = require('./external/importL10n/locales.js');
var LOCAL_L10N_DIR = 'l10n';
cd(ROOT_DIR);
echo();
echo('### Importing translations from mozilla-aurora');
if (!test('-d', LOCAL_L10N_DIR)) {
mkdir(LOCAL_L10N_DIR);
}
cd(LOCAL_L10N_DIR);
locales.downloadL10n();
};