From cb8349cbcf916430672145a5fb185fea925ff01e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Robles?= Date: Sun, 12 Nov 2023 08:49:11 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix=20translations=20(#364)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parent issue: https://github.com/sequentech/meta/issues/320 --- avUi/change-lang-directive/change-lang-directive.js | 5 ++--- dist/appCommon-vmaster.js | 7 +++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/avUi/change-lang-directive/change-lang-directive.js b/avUi/change-lang-directive/change-lang-directive.js index 44ab6a01..9998516b 100644 --- a/avUi/change-lang-directive/change-lang-directive.js +++ b/avUi/change-lang-directive/change-lang-directive.js @@ -80,13 +80,12 @@ angular.module('avUi') angular.element('#ng-app').attr('lang', scope.deflang); // async load moment i18n - /*angularLoad + angularLoad .loadScript(ConfigService.base + '/locales/moment/' + lang + '.js') .then(function () { amMoment.changeLocale(lang); - });*/ + }); }; - $i18next.options.useLocalStorage = true; } diff --git a/dist/appCommon-vmaster.js b/dist/appCommon-vmaster.js index 48342159..ae774aa6 100644 --- a/dist/appCommon-vmaster.js +++ b/dist/appCommon-vmaster.js @@ -1132,8 +1132,11 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist ipCookie("lang", lang, _.extend({ expires: 360, path: "/" - }, ConfigService.i18nextCookieOptions)), scope.deflang = lang, angular.element("#ng-app").attr("lang", scope.deflang); - }, $i18next.options.useLocalStorage = !0; + }, ConfigService.i18nextCookieOptions)), scope.deflang = lang, angular.element("#ng-app").attr("lang", scope.deflang), + angularLoad.loadScript(ConfigService.base + "/locales/moment/" + lang + ".js").then(function() { + amMoment.changeLocale(lang); + }); + }; }, templateUrl: "avUi/change-lang-directive/change-lang-directive.html" };