fix: generate-i18n scripti

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-09-22 11:59:30 +08:00
parent 1e212effad
commit fd361e8886
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
3 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,5 @@
// This file is auto-generated by scripts/generate-i18n-locale.ts
// DONT EDIT THIS FILE MANUALLY
export const currentSupportedLanguages = [
"en",
"ja",

View File

@ -1,3 +1,5 @@
// This file is auto-generated by scripts/generate-i18n-locale.ts
// DONT EDIT THIS FILE MANUALLY
import en from "../../../../locales/app/en.json"
import common_ardz from "../../../../locales/common/ar-DZ.json"
import common_ariq from "../../../../locales/common/ar-IQ.json"

View File

@ -328,7 +328,7 @@ function updateConstantsFile(sourceFile: ts.SourceFile, locale: string): string
(context) => (rootNode) => {
function visit(node: ts.Node): ts.Node {
if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name)) {
if (node.name.text === "langs") {
if (node.name.text === "currentSupportedLanguages") {
return updateLangsArray(node, locale)
}
if (node.name.text === "dayjsLocaleImportMap") {