MCPcopy Create free account
hub / github.com/comaps/comaps / lang_from_filename

Method lang_from_filename

tools/python/po_parser.py:52–57  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

50
51
52 def lang_from_filename(self, filename):
53 # file names are in this format: strings_ru_RU.po
54 lang = filename[len("strings_"):-len(".po")]
55 if lang in TRANSFORMATION_TABLE:
56 return TRANSFORMATION_TABLE[lang]
57 return lang[:2]
58
59
60 def _parse_one_file(self, filepath, lang):

Callers 1

parse_filesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected