fix script

This commit is contained in:
Stephen Zhou 2025-12-29 13:47:44 +08:00
parent 92aa56a3b8
commit 539088902f
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ function parseTsContent(content: string): NestedTranslation {
*/
function getMainBranchFile(filePath: string): string | null {
try {
const relativePath = `i18n/${LOCALE}/${filePath}`
const relativePath = `./i18n/${LOCALE}/${filePath}`
// eslint-disable-next-line sonarjs/os-command
return execSync(`git show main:${relativePath}`, {
encoding: 'utf-8',
@ -147,7 +147,7 @@ function getTranslationFiles(): string[] {
*/
function getMainBranchNamespaces(): string[] {
try {
const relativePath = `i18n/${LOCALE}`
const relativePath = `./i18n/${LOCALE}`
// eslint-disable-next-line sonarjs/os-command
const output = execSync(`git ls-tree --name-only main ${relativePath}/`, {
encoding: 'utf-8',