Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/localization-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: npm install [email protected] [email protected] [email protected]

- name: Run localization check
run: node .github/scripts/localization-check.js
run: node build/scripts/localization-check.js

- name: Commit changes
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

## Translation Status

![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen) ![de__DE](https://img.shields.io/badge/de__DE-98.95%25-yellow) ![fr__FR](https://img.shields.io/badge/fr__FR-90.36%25-yellow) ![pt__BR](https://img.shields.io/badge/pt__BR-93.52%25-yellow) ![ru__RU](https://img.shields.io/badge/ru__RU-98.80%25-yellow) ![zh__CN](https://img.shields.io/badge/zh__CN-99.10%25-yellow) ![zh__TW](https://img.shields.io/badge/zh__TW-99.70%25-yellow)
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-98.95%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-90.36%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-93.52%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-98.80%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-99.10%25-yellow)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-99.70%25-yellow)](TRANSLATION.md)

## How to Use

Expand Down
2 changes: 1 addition & 1 deletion TRANSLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@
- Text.Preference.AI.AnalyzeDiffPrompt
- Text.Preference.AI.GenerateSubjectPrompt

</details>
</details>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function calculateTranslationRate() {
const files = (await fs.readdir(localesDir)).filter(file => file !== 'en_US.axaml' && file.endsWith('.axaml'));

// Add en_US badge first
badges.push(`![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)`);
badges.push(`[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md)`);

for (const file of files) {
const filePath = path.join(localesDir, file);
Expand All @@ -41,12 +41,12 @@ async function calculateTranslationRate() {
// Add badges
const locale = file.replace('.axaml', '').replace('_', '__');
const badgeColor = translationRate === 100 ? 'brightgreen' : translationRate >= 75 ? 'yellow' : 'red';
badges.push(`![${locale}](https://img.shields.io/badge/${locale}-${translationRate.toFixed(2)}%25-${badgeColor})`);
badges.push(`[![${locale}](https://img.shields.io/badge/${locale}-${translationRate.toFixed(2)}%25-${badgeColor})](TRANSLATION.md)`);
}

console.log(translationRates.join('\n\n'));

await fs.writeFile(outputFile, translationRates.join('\n\n'), 'utf8');
await fs.writeFile(outputFile, translationRates.join('\n\n') + '\n', 'utf8');

// Update README.md
let readmeContent = await fs.readFile(readmeFile, 'utf8');
Expand Down