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

Function pullTranslations

scripts/transifex.mjs:262–270  ·  view source on GitHub ↗
(lang)

Source from the content-addressed store, hash-verified

260}
261
262async function pullTranslations(lang) {
263 const { local, remote, filePath } = await loadData(lang);
264 Object.entries(local)
265 .forEach(([key, value]) => {
266 const remoteMessage = remote[key] && remote[key].message;
267 if (remoteMessage) value.message = remoteMessage;
268 });
269 await writeFile(filePath, yaml.dump(local), 'utf8');
270}
271
272async function batchHandle(handle, allowedLangs) {
273 process.stdout.write('Loading languages...');

Callers

nothing calls this directly

Calls 2

loadDataFunction · 0.50
dumpMethod · 0.45

Tested by

no test coverage detected