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 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, [u'Find out if your device is ' u'supported \xbb'])
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, [u'Find out if your device is ' u'supported \xbb'])