def locale_resources(self): for lang in ["default"] + self.app.build_langs: path = './{lang}/app_strings.txt'.format(lang=lang) resource = LocaleResource( language=lang, id=self.id_strings.locale_resource(lang), version=self.app.version, local=path, remote=path, ) if self.app.build_version >= '2.9': unknown_lang_txt = u"Unknown Language (%s)" % lang resource.descriptor = u"Translations: %s" % languages_mapping().get(lang, [unknown_lang_txt])[0] yield resource
def locale_resources(self): for lang in ["default"] + self.app.build_langs: path = './{lang}/app_strings.txt'.format(lang=lang) resource = LocaleResource( language=lang, id=self.id_strings.locale_resource(lang), version=self.app.version, local=path, remote=path, ) if self.app.build_version >= '2.9': unknown_lang_txt = u"Unknown Language (%s)" % lang resource.descriptor = u"Translations: %s" % languages_mapping( ).get(lang, [unknown_lang_txt])[0] yield resource
def get_section_elements(self): langs = self.app.get_build_langs(self.build_profile_id) for lang in ["default"] + langs: path = './{lang}/app_strings.txt'.format(lang=lang) if self.build_profile_id: remote_path = '{path}?profile={profile}'.format(path=path, profile=self.build_profile_id) else: remote_path = path resource = LocaleResource( language=lang, id=id_strings.locale_resource(lang), version=self.app.version, local=path, remote=remote_path, ) if self.app.build_version >= '2.9': unknown_lang_txt = u"Unknown Language (%s)" % lang resource.descriptor = u"Translations: %s" % languages_mapping().get(lang, [unknown_lang_txt])[0] yield resource
def get_section_elements(self): langs = self.app.get_build_langs(self.build_profile_id) for lang in ["default"] + langs: path = "./{lang}/app_strings.txt".format(lang=lang) if self.build_profile_id: remote_path = "{path}?profile={profile}".format(path=path, profile=self.build_profile_id) else: remote_path = path resource = LocaleResource( language=lang, id=id_strings.locale_resource(lang), version=self.app.version, local=path, remote=remote_path, ) if self.app.build_version >= "2.9": unknown_lang_txt = u"Unknown Language (%s)" % lang resource.descriptor = u"Translations: %s" % languages_mapping().get(lang, [unknown_lang_txt])[0] yield resource