@joystick.js/node-canary 0.0.0-canary.93 → 0.0.0-canary.94
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.
|
@@ -48,10 +48,6 @@ var getTranslations_default = async (paths = {}, req = {}) => {
|
|
|
48
48
|
const browserLanguages = parseBrowserLanguages(req?.headers["accept-language"]);
|
|
49
49
|
const languagePreferences = getLanguagePreferenceRegexes(req?.context?.user?.language, browserLanguages);
|
|
50
50
|
let matchingFile = null;
|
|
51
|
-
console.log({
|
|
52
|
-
languageFiles,
|
|
53
|
-
languagePreferences
|
|
54
|
-
});
|
|
55
51
|
for (let i = 0; i < languagePreferences.length; i += 1) {
|
|
56
52
|
const languageRegex = languagePreferences[i];
|
|
57
53
|
const match = languageFiles.find((languageFile) => !!languageFile.match(languageRegex));
|
|
@@ -61,6 +57,10 @@ var getTranslations_default = async (paths = {}, req = {}) => {
|
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
59
|
const translationsFile = await getTranslationsFile(matchingFile, paths);
|
|
60
|
+
console.log({
|
|
61
|
+
matchingFile,
|
|
62
|
+
translationsFile
|
|
63
|
+
});
|
|
64
64
|
return translationsFile;
|
|
65
65
|
};
|
|
66
66
|
export {
|