diff --git a/.tx/config b/.tx/config deleted file mode 100644 index 7d389e0..0000000 --- a/.tx/config +++ /dev/null @@ -1,8 +0,0 @@ -[main] -host = https://www.transifex.com - -[o:open-edx:p:xblocks:r:recommender] -file_filter = recommender/translations//LC_MESSAGES/text.po -source_file = recommender/translations/en/LC_MESSAGES/text.po -source_lang = en -type = PO diff --git a/recommender/recommender.py b/recommender/recommender.py index b9eefce..48821f8 100644 --- a/recommender/recommender.py +++ b/recommender/recommender.py @@ -952,31 +952,12 @@ def _construct_view_resource(self, resource): return result - @staticmethod - def _get_deprecated_i18n_js_url(): # pragma: no cover - """ - Returns the deprecated Javascript translation file for the currently selected language, if any found by - `pkg_resources` - """ - lang_code = translation.get_language() - if not lang_code: - return None - text_js = 'public/js/translations/{lang_code}/text.js' - country_code = lang_code.split('-')[0] - for code in (translation.to_locale(lang_code), lang_code, country_code): - if pkg_resources.resource_exists(resource_loader.module_name, text_js.format(lang_code=code)): - return text_js.format(lang_code=code) - return None - def _get_statici18n_js_url(self): """Return the JavaScript translation file provided by the XBlockI18NService.""" if url_getter_func := getattr(self.i18n_service, 'get_javascript_i18n_catalog_url', None): if javascript_url := url_getter_func(self): return javascript_url - if deprecated_url := self._get_deprecated_i18n_js_url(): - return self.resource_string(deprecated_url) - return None @property