Skip to content

Commit

Permalink
remove subscribeLanguageChange from Measure.activity SugarL10n.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
UtkarshSiddhpura committed Aug 20, 2023
1 parent 41f07bb commit e69de4a
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions activities/Measure.activity/js/components/SugarL10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ Vue.component('sugar-localization', {
vm.l10n = i18next;
vm.code = i18next.language;
vm.dictionary = i18next.getResourceBundle(i18next.language, 'translation');
vm.subscribeLanguageChange();
}
);
}).catch((error) => {
Expand All @@ -87,17 +86,6 @@ Vue.component('sugar-localization', {
});
},

subscribeLanguageChange: function () {
const vm = this;
requirejs(['lib/i18next.min.js'], function (i18next) {
i18next.on('languageChanged', (lng) => {
vm.code = lng;
vm.dictionary = i18next.getResourceBundle(lng, 'translation'); // Update dictionary with new language
vm.$emit('localized');
});
});
},

// Get a string with parameter
get: function (str, params) {
let out = '';
Expand Down

0 comments on commit e69de4a

Please sign in to comment.