From f65ee5015cd47812afdb87981ee14401c4683881 Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Wed, 4 Jul 2012 17:34:26 -0600 Subject: [PATCH] ignore en_US in i18n - GH-1905 & GH-1675 --- lib/i18n.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/i18n.js b/lib/i18n.js index 7b2d214d9..eafa7dba1 100644 --- a/lib/i18n.js +++ b/lib/i18n.js @@ -70,7 +70,9 @@ exports.abide = function (options) { json_exists: path.existsSync(json_file_path(l)), gt: null }; - if (l !== debug_locale) { + // english translations are broken and not maintained, hence the second part of + // this if statement - see issue #1912 + if (l !== debug_locale && l !== 'en_US') { if (! mo_cache[l] || ! mo_cache[l].mo_exists || ! mo_cache[l].json_exists) { var msg = util.format('Bad locale=[%s] file(s) do not exist [%s] or [%s]. See locale/README', l, mo_file_path(l), json_file_path(l)); @@ -112,7 +114,8 @@ exports.abide = function (options) { resp.local('format', format); req.format = format; - if (mo_cache[locale].mo_exists) { + // ignore translation files in en_US - see issue #1905 + if (mo_cache[locale].mo_exists && locale != 'en_US') { if (mo_cache[locale].gt === null) { mo_cache[locale].gt = new Gettext(); var mo_path = mo_file_path(locale); -- GitLab