MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / getLocaleMap

Function getLocaleMap

scripts/i18n-manager.mjs:81–89  ·  view source on GitHub ↗

Loads and flattens a locale file.

(locale)

Source from the content-addressed store, hash-verified

79
80/** Loads and flattens a locale file. */
81async function getLocaleMap(locale) {
82 try {
83 const module = await loadLocaleModule(locale);
84 return flatten(module);
85 } catch (error) {
86 console.error(`Error loading locale "${locale}":`, error.message);
87 return {};
88 }
89}
90
91/** Safely reads a JSON file. */
92function loadJson(filePath) {

Callers 2

syncFunction · 0.70
generateTemplateFunction · 0.70

Calls 3

errorMethod · 0.80
loadLocaleModuleFunction · 0.70
flattenFunction · 0.70

Tested by

no test coverage detected