MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / load

Method load

scripts/i18n.js:89–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87 }
88
89 async load() {
90 const langs = await fs.readdir(this.base);
91 this.langs = langs;
92 await Promise.all(langs.map(async lang => {
93 const locale = new Locale(lang, this.base);
94 await locale.load();
95 this.locales[lang] = locale;
96 }));
97 const defaultData = this.locales[this.defaultLang];
98 Object.keys(defaultData.desc).forEach(key => {
99 this.data[key] = {
100 ...defaultData.data[key],
101 touched: this.options.markUntouched ? false : defaultData.get(key).touched !== false,
102 };
103 });
104 }
105
106 getData(lang, options) {
107 options = options || {};

Callers

nothing calls this directly

Calls 3

loadMethod · 0.95
mapMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected