MCPcopy Index your code
hub / github.com/MagicMirrorOrg/MagicMirror / loadCoreTranslations

Function loadCoreTranslations

js/translator.js:104–113  ·  view source on GitHub ↗

* Load the core translations. * @param {string} lang The language identifier of the core language.

(lang)

Source from the content-addressed store, hash-verified

102 * @param {string} lang The language identifier of the core language.
103 */
104 async loadCoreTranslations (lang) {
105 if (lang in translations) {
106 Log.log(`[translator] Loading core translation file: ${translations[lang]}`);
107 this.coreTranslations = await loadJSON(translations[lang]);
108 } else {
109 Log.log("[translator] Configured language not found in core translations.");
110 }
111
112 await this.loadCoreTranslationsFallback();
113 },
114
115 /**
116 * Load the core translations' fallback.

Callers

nothing calls this directly

Calls 1

loadJSONFunction · 0.85

Tested by

no test coverage detected