MCPcopy Index your code
hub / github.com/github/docs / getRoot

Function getRoot

lib/languages.js:23–35  ·  view source on GitHub ↗
(languageCode)

Source from the content-addressed store, hash-verified

21}
22
23function getRoot(languageCode) {
24 if (languageCode === 'en') return ROOT
25 if (languageCode in possibleEnvVars) {
26 const possibleEnvVar = possibleEnvVars[languageCode]
27 if (possibleEnvVar) {
28 return possibleEnvVar
29 }
30 } else {
31 console.warn(`Not recognized languageCode '${languageCode}'`)
32 }
33 // Default
34 return path.join(TRANSLATIONS_ROOT, languageCode)
35}
36
37// Languages in order of accept-language header frequency
38// 92BD1212-61B8-4E7A: Remove `wip: Boolean` for the public ship of ko, fr, de, ru

Callers 1

languages.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected