Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
 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'])
Пример #4
0
 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'])