More fixes

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
Josh-Cena 2021-06-17 17:47:03 +08:00
parent 6d3d416f58
commit c7c833fe77
No known key found for this signature in database
GPG key ID: C37145B818BDB68F
16 changed files with 59 additions and 32 deletions

View file

@ -10,6 +10,8 @@ const path = require('path');
const fs = require('fs-extra');
const globby = require('globby');
const {mapValues, pickBy, difference, orderBy} = require('lodash');
// Unsafe import, should we create a package for the translationsExtractor ?
const translationsExtractor = require('@docusaurus/core/lib/server/translations/translationsExtractor');
const CodeDirPaths = [
path.join(__dirname, 'lib-next'),
@ -49,11 +51,10 @@ function logKeys(keys) {
}
async function extractThemeCodeMessages() {
// Unsafe import, should we create a package for the translationsExtractor ?
const {
globSourceCodeFilePaths,
extractAllSourceCodeFileTranslations,
} = require('@docusaurus/core/lib/server/translations/translationsExtractor');
} = translationsExtractor;
const filePaths = (
await globSourceCodeFilePaths(CodeDirPaths)