1
0
mirror of synced 2025-12-23 03:44:00 -05:00

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:
Peter Bengtsson
2022-02-04 09:31:56 -05:00
committed by GitHub
parent 45cd56247a
commit 14ca55f670
5 changed files with 216 additions and 22 deletions

View File

@@ -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'))
}