def handle(self, *args, **options): langs = options['langs'] if not langs: langs = os.listdir(os.path.join(settings.ROOT, 'locale')) langs = [x for x in langs if x != 'templates'] langs = [x for x in langs if x[0] != '.'] merge_lang_files(langs)
def test_merge_lang_files(self, write_mock): """ `merge_lang_files()` should see all strings, not skip the untranslated. Bug 861168. """ merge_lang_files(["de"]) dest_file = path.join(ROOT, "locale", "de", "firefox", "fx.lang") write_mock.assert_called_once_with(dest_file, [[None, u"Find out if your device is " u"supported \xbb"]])
def handle(self, *args, **options): langs = options['langs'] if not langs: langs = os.listdir(str(settings.LOCALES_PATH)) langs = [x for x in langs if x != 'templates'] langs = [x for x in langs if x[0] != '.'] merge_lang_files(langs)
def handle(self, *args, **options): langs = options['langs'] if not langs: langs = os.listdir(os.path.join(settings.ROOT, 'locale')) langs = filter(lambda x: x != 'templates', langs) langs = filter(lambda x: x[0] != '.', langs) merge_lang_files(langs)
def handle(self, *args, **options): if args: langs = args else: langs = os.listdir(os.path.join(settings.ROOT, 'locale')) langs = filter(lambda x: x != 'templates', langs) langs = filter(lambda x: x[0] != '.', langs) merge_lang_files(langs)
def test_merge_lang_files(self, write_mock): """ `merge_lang_files()` should see all strings, not skip the untranslated. Bug 861168. """ merge_lang_files(['de']) dest_file = path.join(ROOT, 'locale', 'de', 'firefox', 'fx.lang') write_mock.assert_called_once_with(dest_file, [[None, u'Find out if your device is ' u'supported \xbb']])