From aab146b04b7723bb38fb91fed832705a89312b5c Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sat, 29 Aug 2015 22:35:37 +0200 Subject: [PATCH] Don't include the en-US description twice That has started to crash Firefox for me. Strange. --- gulpfile.coffee | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 390f8ff..dc054aa 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -40,6 +40,8 @@ XPI = 'VimFx.xpi' LOCALE = 'extension/locale' TEST = 'extension/test' +BASE_LOCALE = 'en-US' + test = '--test' in process.argv or '-t' in process.argv ifTest = (value) -> if test then [value] else [] @@ -91,6 +93,7 @@ gulp.task('install.rdf', -> getDescription = (locale) -> read(join(LOCALE, locale, 'description')).trim() descriptions = fs.readdirSync(LOCALE) + .filter((locale) -> locale != BASE_LOCALE) .map((locale) -> { locale: locale description: getDescription(locale) @@ -102,7 +105,7 @@ gulp.task('install.rdf', -> minVersion: pkg.firefoxVersions.min maxVersion: pkg.firefoxVersions.max creator, developers, contributors, translators - defaultDescription: getDescription('en-US') + defaultDescription: getDescription(BASE_LOCALE) descriptions })) .pipe(gulp.dest(DEST)) @@ -192,13 +195,13 @@ gulp.task('faster', -> ) gulp.task('sync-locales', -> - baseLocale = 'en-US' + baseLocale = BASE_LOCALE for arg in process.argv when arg[...2] == '--' baseLocale = arg[2..] results = fs.readdirSync(join(LOCALE, baseLocale)) .filter((file) -> path.extname(file) == '.properties') .map(syncLocale.bind(null, baseLocale)) - if baseLocale == 'en-US' + if baseLocale == BASE_LOCALE report = [] for {fileName, translatedCount, total} in results report.push("#{ fileName }:") -- 2.39.3