[FIX] fix translations URL in translation.js

The URL given to load the translations had an extra '/'.
(/website//translations/xxx)

This caused a http redirection that failed for "Mixed Content" on https environments.
This commit is contained in:
Aurélien Warnon
2019-09-20 13:34:53 +00:00
parent 869a5b83a5
commit 08108486d5
+5 -1
View File
@@ -65,7 +65,11 @@ var TranslationDataBase = Class.extend(/** @lends instance.TranslationDataBase#
var self = this;
var cacheId = session.cache_hashes && session.cache_hashes.translations;
url = url || '/web/webclient/translations';
url += '/' + (cacheId ? cacheId : Date.now());
if (!url.endsWith('/')) {
url += '/';
}
url += cacheId ? cacheId : Date.now();
return $.get(url, {
mods: modules ? modules.join(',') : null,
lang: lang || null,