@rimori/client 2.5.34-next.0 → 2.5.34-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -75,7 +75,7 @@ export class Translator {
|
|
|
75
75
|
}
|
|
76
76
|
getTranslationUrl(language) {
|
|
77
77
|
const baseUrl = (this.translationUrl || window.location.origin).replace(/\/+$/, '');
|
|
78
|
-
return `${baseUrl}locales/${language}.json`;
|
|
78
|
+
return `${baseUrl}/locales/${language}.json`;
|
|
79
79
|
}
|
|
80
80
|
usePlugin(plugin) {
|
|
81
81
|
if (!this.i18n) {
|
|
@@ -114,7 +114,8 @@ export class Translator {
|
|
|
114
114
|
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
115
115
|
return this.fetchTranslations(language, 1);
|
|
116
116
|
}
|
|
117
|
-
console.warn(`
|
|
117
|
+
console.warn(`Fetching of ${language} translation not possible. Falling back to english. Error details: ` +
|
|
118
|
+
error.message);
|
|
118
119
|
if (language === 'en')
|
|
119
120
|
return {};
|
|
120
121
|
// Fallback to English
|