cope with possible translation drift (#24842)
* cope with possible translation drift * fix test * don't shallow clone * fix unit tests * update code comments * more code comment corrections * more code comment * feedbacked
This commit is contained in:
@@ -8,7 +8,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
const _basePaths = new Map()
|
||||
// Return a full directory based on __dirname from a specific language directory.
|
||||
// This function is memoized with a simple global cache object.
|
||||
function getBasePath(directory) {
|
||||
export function getBasePath(directory) {
|
||||
if (!_basePaths.has(directory)) {
|
||||
_basePaths.set(directory, path.posix.join(__dirname, '..', directory, 'content'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user