diff --git a/addons/web/controllers/webclient.py b/addons/web/controllers/webclient.py index 6a88cc9a122..e6d8783393f 100644 --- a/addons/web/controllers/webclient.py +++ b/addons/web/controllers/webclient.py @@ -29,10 +29,17 @@ def CONTENT_MAXAGE(): return http.STATIC_CACHE_LONG +MOMENTJS_LANG_CODES_MAP = { + "sr_RS": "sr_cyrl", + "sr@latin": "sr" +} + + class WebClient(http.Controller): @http.route('/web/webclient/locale/', type='http', auth="none") def load_locale(self, lang): + lang = MOMENTJS_LANG_CODES_MAP.get(lang, lang) magic_file_finding = [lang.replace("_", '-').lower(), lang.split('_')[0]] for code in magic_file_finding: try: