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
15 changes: 11 additions & 4 deletions .github/workflows/i18n_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ jobs:

# Check for specific issues
MISSING=$(grep -E "^\s+\d+/\d+ translated, [1-9]\d* missing" translation-report.txt | wc -l || echo "0")
UNTRANSLATED=$(grep -E "^\s+\d+/\d+ translated, \d+ missing, [1-9]\d* untranslated" translation-report.txt | wc -l || echo "0")
UNTRANSLATED_LOCALES=$(grep -E "^\s+\d+/\d+ translated, \d+ missing, [1-9]\d* untranslated" translation-report.txt | wc -l || echo "0")
ZOMBIES=$(grep -E "^[a-z-]+: \d+ zombie key" translation-report.txt | wc -l || echo "0")

echo "missing_count=$MISSING" >> $GITHUB_OUTPUT
echo "untranslated_count=$UNTRANSLATED" >> $GITHUB_OUTPUT
echo "untranslated_count=$UNTRANSLATED_LOCALES" >> $GITHUB_OUTPUT
echo "zombie_count=$ZOMBIES" >> $GITHUB_OUTPUT

# Determine if there are issues
if [ "$AVG" -eq 100 ] && [ "$MISSING" -eq 0 ] && [ "$ZOMBIES" -eq 0 ]; then
if [ "$AVG" -eq 100 ] && [ "$MISSING" -eq 0 ] && [ "$UNTRANSLATED_LOCALES" -eq 0 ] && [ "$ZOMBIES" -eq 0 ]; then
echo "has_issues=false" >> $GITHUB_OUTPUT
else
echo "has_issues=true" >> $GITHUB_OUTPUT
Expand All @@ -79,6 +79,7 @@ jobs:
HAS_ISSUES="${{ steps.check_status.outputs.has_issues }}"
EN_CHANGES="${{ steps.check_changes.outputs.changes }}"
MISSING="${{ steps.check_status.outputs.missing_count }}"
UNTRANSLATED_LOCALES="${{ steps.check_status.outputs.untranslated_count }}"
ZOMBIES="${{ steps.check_status.outputs.zombie_count }}"

# Start building comment
Expand Down Expand Up @@ -123,6 +124,9 @@ jobs:
if [ "$MISSING" -gt 0 ]; then
echo "- ⚠️ **$MISSING** missing translation(s)" >> comment.md
fi
if [ "$UNTRANSLATED_LOCALES" -gt 0 ]; then
echo "- ⚠️ **$UNTRANSLATED_LOCALES** locale(s) contain untranslated string(s)" >> comment.md
fi
if [ "$ZOMBIES" -gt 0 ]; then
echo "- 🧟 **$ZOMBIES** zombie key(s) found" >> comment.md
fi
Expand All @@ -142,9 +146,12 @@ jobs:
# Action items
echo "### 🔧 Action Items" >> comment.md
echo "" >> comment.md
if [ "$AVG" -lt 100 ]; then
if [ "$MISSING" -gt 0 ]; then
echo "- Complete missing translations for all locales" >> comment.md
fi
if [ "$UNTRANSLATED_LOCALES" -gt 0 ]; then
echo "- Translate untranslated strings (currently same as English) in all locales" >> comment.md
fi
if [ "$ZOMBIES" -gt 0 ]; then
echo "- Remove unused translation keys from locale files" >> comment.md
fi
Expand Down
10 changes: 6 additions & 4 deletions public/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,15 @@ <h1 class="hero-title"><span class="gradient-text" data-i18n="changelog.title">W
<div class="show-more-buttons">
<a href="https://github.com/MorpheApp/morphe-manager/releases"
target="_blank"
rel="noopener"
class="btn btn-secondary"
data-umami-event="Changelog Show More Manager">
<span data-i18n="changelog.view-manager">View Manager Releases</span>
<span class="material-symbols-rounded">open_in_new</span>
</a>
<a href="https://github.com/MorpheApp/morphe-patches/releases"
target="_blank"
rel="noopener"
class="btn btn-secondary"
data-umami-event="Changelog Show More Patches">
<span data-i18n="changelog.view-patches">View Patches Releases</span>
Expand Down Expand Up @@ -177,10 +179,10 @@ <h4 data-i18n="footer.product">Product</h4>
</div>
<div class="footer-column">
<h4 data-i18n="footer.community">Community</h4>
<a href="https://github.com/MorpheApp" target="_blank" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" data-umami-event="Footer Crowdin Click">Crowdin</a>
<a href="https://github.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" rel="noopener noreferrer" data-umami-event="Footer Crowdin Click">Crowdin</a>
</div>
<div class="footer-column language-selector-container">
<h4 data-i18n="footer.language">Language</h4>
Expand Down
8 changes: 4 additions & 4 deletions public/donate.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ <h4 data-i18n="footer.product">Product</h4>
</div>
<div class="footer-column">
<h4 data-i18n="footer.community">Community</h4>
<a href="https://github.com/MorpheApp" target="_blank" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" data-umami-event="Footer Crowdin Click">Crowdin</a>
<a href="https://github.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" rel="noopener noreferrer" data-umami-event="Footer Crowdin Click">Crowdin</a>
</div>
<div class="footer-column language-selector-container">
<h4 data-i18n="footer.language">Language</h4>
Expand Down
16 changes: 8 additions & 8 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -481,28 +481,28 @@ <h2 class="section-title" data-i18n="hero.social-label">Join the Community</h2>
<p class="section-subtitle" data-i18n="community.subtitle">Follow us, report issues, and help make Morphe better</p>
</div>
<div class="community-grid">
<a href="https://github.com/MorpheApp" target="_blank" class="community-card" data-umami-event="GitHub Link Click">
<a href="https://github.com/MorpheApp" target="_blank" rel="noopener" class="community-card" data-umami-event="GitHub Link Click">
<div class="feature-icon">
<img src="images/github.svg" alt="GitHub" class="community-icon-img">
</div>
<h3 class="feature-title">GitHub</h3>
<p class="feature-description" data-i18n="community.github-desc">Browse the source code, report bugs, and contribute to Morphe development.</p>
</a>
<a href="https://x.com/MorpheApp" target="_blank" class="community-card" data-umami-event="X Link Click">
<a href="https://x.com/MorpheApp" target="_blank" rel="noopener" class="community-card" data-umami-event="X Link Click">
<div class="feature-icon">
<img src="images/X.svg" alt="X" class="community-icon-img">
</div>
<h3 class="feature-title">X (Twitter)</h3>
<p class="feature-description" data-i18n="community.x-desc">Stay up to date with the latest news, releases, and announcements.</p>
</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" class="community-card" data-umami-event="Reddit Link Click">
<a href="https://reddit.com/r/MorpheApp" target="_blank" rel="noopener" class="community-card" data-umami-event="Reddit Link Click">
<div class="feature-icon">
<img src="images/reddit.svg" alt="Reddit" class="community-icon-img">
</div>
<h3 class="feature-title">Reddit</h3>
<p class="feature-description" data-i18n="community.reddit-desc">Join discussions, share tips, and connect with other Morphe users.</p>
</a>
<a href="https://crowdin.com/project/morphe" target="_blank" class="community-card" data-umami-event="Crowdin Link Click">
<a href="https://crowdin.com/project/morphe" target="_blank" rel="noopener noreferrer" class="community-card" data-umami-event="Crowdin Link Click">
<div class="feature-icon">
<img src="images/crowdin-small.svg" alt="Crowdin" class="community-icon-img">
</div>
Expand Down Expand Up @@ -555,10 +555,10 @@ <h4 data-i18n="footer.product">Product</h4>
</div>
<div class="footer-column">
<h4 data-i18n="footer.community">Community</h4>
<a href="https://github.com/MorpheApp" target="_blank" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" data-umami-event="Footer Crowdin Click">Crowdin</a>
<a href="https://github.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" rel="noopener noreferrer" data-umami-event="Footer Crowdin Click">Crowdin</a>
</div>
<div class="footer-column language-selector-container">
<h4 data-i18n="footer.language">Language</h4>
Expand Down
8 changes: 4 additions & 4 deletions public/microg.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ <h4 data-i18n="footer.product">Product</h4>
</div>
<div class="footer-column">
<h4 data-i18n="footer.community">Community</h4>
<a href="https://github.com/MorpheApp" target="_blank" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" data-umami-event="Footer Crowdin Click">Crowdin</a>
<a href="https://github.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" rel="noopener noreferrer" data-umami-event="Footer Crowdin Click">Crowdin</a>
</div>
<div class="footer-column language-selector-container">
<h4 data-i18n="footer.language">Language</h4>
Expand Down
8 changes: 4 additions & 4 deletions public/translate.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ <h4 data-i18n="footer.product">Product</h4>
</div>
<div class="footer-column">
<h4 data-i18n="footer.community">Community</h4>
<a href="https://github.com/MorpheApp" target="_blank" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" data-umami-event="Footer Crowdin Click">Crowdin</a>
<a href="https://github.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer GitHub Click">GitHub</a>
<a href="https://x.com/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer X Click">X (Twitter)</a>
<a href="https://reddit.com/r/MorpheApp" target="_blank" rel="noopener" data-umami-event="Footer Reddit Click">Reddit</a>
<a href="https://crowdin.com/project/morphe" target="_blank" rel="noopener noreferrer" data-umami-event="Footer Crowdin Click">Crowdin</a>
</div>
<div class="footer-column language-selector-container">
<h4 data-i18n="footer.language">Language</h4>
Expand Down
18 changes: 16 additions & 2 deletions scripts/check-translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ const SKIP_KEYS = new Set([
'hero.title-highlight-youtube',
'hero.title-highlight-ytmusic',
'hero.title-highlight-reddit',
'app-features.tab-youtube', // product name
'app-features.tab-ytmusic', // product name
'app-features.tab-reddit', // product name
'app-features.sponsorblock', // brand name
'nav.faq', // universal abbreviation
'changelog.filter-manager', // app name
'changelog.filter-patches', // technical term
]);

/**
Expand Down Expand Up @@ -99,16 +106,18 @@ function checkCompleteness(locales) {

const localeKeys = getAllKeys(locales[locale]).filter(key => !key.startsWith('testimonials.'));
const missing = baseKeys.filter(key => !localeKeys.includes(key));
const missingKeys = new Set(missing);
const untranslated = baseKeys.filter(key => {
if (missingKeys.has(key)) return false;
if (SKIP_KEYS.has(key)) return false;
const baseValue = getValue(locales[BASE_LOCALE], key);
const localeValue = getValue(locales[locale], key);
return localeValue === baseValue;
});

const total = baseKeys.length;
const translated = total - missing.length;
const percentage = Math.round((translated / total) * 100);
const translated = total - missing.length - untranslated.length;
const percentage = total > 0 ? Math.round((translated / total) * 100) : 100;

results[locale] = {
total,
Expand Down Expand Up @@ -178,6 +187,11 @@ function generateReport(locales) {
} else if (data.missingKeys.length > 10) {
console.log(` Missing: ${data.missingKeys.slice(0, 5).join(', ')} ... and ${data.missingKeys.length - 5} more`);
}
if (data.untranslatedKeys.length > 0 && data.untranslatedKeys.length <= 10) {
console.log(` Untranslated: ${data.untranslatedKeys.join(', ')}`);
} else if (data.untranslatedKeys.length > 10) {
console.log(` Untranslated: ${data.untranslatedKeys.slice(0, 5).join(', ')} ... and ${data.untranslatedKeys.length - 5} more`);
}
console.log();
});

Expand Down