Beispiel #1
0
 def get_languages(self):
     """
     Get installed language translations from docutils.languages and from
     docutils.parsers.rst.languages.
     """
     languages = {}
     for mod in (os.listdir(docutils.languages.__path__[0])
                 + os.listdir(docutils.parsers.rst.languages.__path__[0])):
         match = self.language_module_pattern.match(mod)
         if match:
             languages[match.group(1)] = 1
     self.languages = languages.keys()
Beispiel #2
0
 def get_languages(self):
     """
     Get installed language translations from docutils.languages and from
     docutils.parsers.rst.languages.
     """
     languages = {}
     for mod in (os.listdir(docutils.languages.__path__[0])
                 + os.listdir(docutils.parsers.rst.languages.__path__[0])):
         match = self.language_module_pattern.match(mod)
         if match:
             languages[match.group(1)] = 1
     self.languages = languages.keys()
Beispiel #3
0
 def get_languages(self):
     """
     Get installed language translations from docutils.languages and from
     docutils.parsers.rst.languages.
     """
     languages = {}
     for mod in (os.listdir(docutils.languages.__path__[0])
                 + os.listdir(docutils.parsers.rst.languages.__path__[0])):
         match = self.language_module_pattern.match(mod)
         if match:
             languages[match.group(1)] = 1
     self.languages = languages.keys()
     # test language tag normalization:
     self.languages += ['en_gb', 'en_US', 'en-CA', 'de-DE', 'de-AT-1901',
                        'pt-BR', 'pt-foo-BR']
Beispiel #4
0
 def get_languages(self):
     """
     Get installed language translations from docutils.languages and from
     docutils.parsers.rst.languages.
     """
     languages = {}
     for mod in (os.listdir(docutils.languages.__path__[0]) +
                 os.listdir(docutils.parsers.rst.languages.__path__[0])):
         match = self.language_module_pattern.match(mod)
         if match:
             languages[match.group(1)] = 1
     self.languages = languages.keys()
     # test language tag normalization:
     self.languages += [
         'en_gb', 'en_US', 'en-CA', 'de-DE', 'de-AT-1901', 'pt-BR',
         'pt-foo-BR'
     ]
 def get_languages(self):
     """
     Get installed language translations from docutils.languages and from
     docutils.parsers.rst.languages.
     """
     languages = {}
     for mod in (os.listdir(docutils.languages.__path__[0])
                 + os.listdir(docutils.parsers.rst.languages.__path__[0])):
         match = self.language_module_pattern.match(mod)
         if match:
             languages[match.group(1)] = 1
     self.languages = list(languages.keys())
     # test language tag normalization:
     self.languages += ['en_gb', 'en_US', 'en-CA', 'de-DE', 'de-AT-1901',
                        'pt-BR', 'pt-foo-BR']
     # test that locally created language files are also loaded.
     # requires local_dummy_lang.py in test directory (testroot)
     # The local_dummy_lang.py contains all the fields from both
     # the docutils language tags and the parser.rst language tags
     self.languages += ['local_dummy_lang']
 def get_languages(self):
     """
     Get installed language translations from docutils.languages and from
     docutils.parsers.rst.languages.
     """
     languages = {}
     for mod in (os.listdir(docutils.languages.__path__[0]) +
                 os.listdir(docutils.parsers.rst.languages.__path__[0])):
         match = self.language_module_pattern.match(mod)
         if match:
             languages[match.group(1)] = 1
     self.languages = list(languages.keys())
     # test language tag normalization:
     self.languages += [
         'en_gb', 'en_US', 'en-CA', 'de-DE', 'de-AT-1901', 'pt-BR',
         'pt-foo-BR'
     ]
     # test that locally created language files are also loaded.
     # requires local_dummy_lang.py in test directory (testroot)
     # The local_dummy_lang.py contains all the fields from both
     # the docutils language tags and the parser.rst language tags
     self.languages += ['local_dummy_lang']