MCPcopy Create free account
hub / github.com/appium/appium / toCrowdinPath

Function toCrowdinPath

scripts/crowdin-update-docs-resources.mjs:35–43  ·  view source on GitHub ↗

* @param {string} fullPath * @returns {string}

(fullPath)

Source from the content-addressed store, hash-verified

33 * @returns {string}
34 */
35function toCrowdinPath(fullPath) {
36 const fileName = path.basename(fullPath);
37 const isMkDocsConfig = fileName === ORIGINAL_MKDOCS_CONFIG(DEFAULT_LANGUAGE);
38 let result = `/${path.relative(LANGUAGE_ROOT, fullPath)}`;
39 if (isMkDocsConfig || result.includes('..')) {
40 return `/${isMkDocsConfig ? CROWIN_MKDOCS_CONFIG : fileName}`;
41 }
42 return result;
43}
44
45/**
46 * @param {string} name

Callers 3

uploadDocumentsToStorageFunction · 0.85
ensureFileStructureFunction · 0.85
updateFilesFunction · 0.85

Calls 1

ORIGINAL_MKDOCS_CONFIGFunction · 0.90

Tested by

no test coverage detected