MCPcopy Index your code
hub / github.com/darkreader/darkreader / getSupportedLocales

Function getSupportedLocales

tasks/translate.js:158–172  ·  view source on GitHub ↗

* @returns {Promise }

()

Source from the content-addressed store, hash-verified

156 * @returns {Promise<string[]>}
157 */
158async function getSupportedLocales() {
159 const fileList = await fs.readdir(LOCALES_ROOT);
160
161 /** @type {string[]} */
162 const locales = [];
163
164 for (const file of fileList) {
165 if (file.endsWith('.config')) {
166 const locale = file.substring(0, file.lastIndexOf('.config'));
167 locales.push(locale);
168 }
169 }
170
171 return locales;
172}
173
174/**
175 * @returns {Promise<string[]>}

Callers 2

translateEnMessageFunction · 0.85
translateNewEnMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…