Skip to content

Fix localized solfege labels#7519

Merged
walterbender merged 2 commits into
sugarlabs:masterfrom
Noaman-Akhtar:fix/solfege-localized-labels
Jun 21, 2026
Merged

Fix localized solfege labels#7519
walterbender merged 2 commits into
sugarlabs:masterfrom
Noaman-Akhtar:fix/solfege-localized-labels

Conversation

@Noaman-Akhtar

Copy link
Copy Markdown
Contributor

PR Category :

  • Bug fix

Summary

Fix localized solfege pitch labels so note names such as sol, fa, mi, re, and do display in the selected language when a valid translation exists.

Changes

  • Added validation for the special solfege translation key:
    • ti la sol fa mi re do
  • Updated i18nSolfege() to:
    • use localized solfege labels only when the locale provides all seven note names
    • fall back safely when the translation is missing or malformed
    • map localized solfege labels back to canonical note names when needed
  • Hardened convert_po_to_json.py so malformed solfege translations do not produce broken locale JSON.
  • Corrected bad or missing solfege translations in affected PO files and regenerated matching locale JSON files.

Affected Locales

Updated solfege entries for:

am, ar, bg, bn, de, dz, el, fa, he, hy, ibo, ka, kn, ko, ml, mn, ru, si, ta, th, ur, zh_CN, zh_TW

Before :

image

After :

Screenshot 2026-06-14 045410

@github-actions github-actions Bot added bug fix Fixes a bug or incorrect behavior size/M Medium: 50-249 lines changed area/javascript Changes to JS source files area/tests Changes to test files area/i18n Changes to localization files labels Jun 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🧪 Jest Test Results

✅ All Jest tests passed! This PR is ready to merge.

Coverage: Statements: 49.14% | Branches: 40.57% | Functions: 53.37% | Lines: 49.55%
Master Coverage: Statements: 49.11% | Branches: 40.49% | Functions: 53.32% | Lines: 49.52%

@Ashutoshx7 Ashutoshx7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Noaman-Akhtar nice work

@Noaman-Akhtar

Copy link
Copy Markdown
Contributor Author

Hey @walterbender can you please review this .

Comment thread convert_po_to_json.py
@walterbender

Copy link
Copy Markdown
Member

I worry a bit that some of these strings are pretty long. They might look funny in the pie menus. Have you check any of them?

@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.54%. Comparing base (6bb5d56) to head (909fbe6).

Files with missing lines Patch % Lines
js/utils/musicutils.js 92.85% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7519      +/-   ##
==========================================
+ Coverage   50.52%   50.54%   +0.01%     
==========================================
  Files         163      163              
  Lines       56586    56605      +19     
==========================================
+ Hits        28591    28611      +20     
+ Misses      27995    27994       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Noaman-Akhtar Noaman-Akhtar force-pushed the fix/solfege-localized-labels branch from 36c3a6c to 8e4e68e Compare June 21, 2026 11:33
@Noaman-Akhtar Noaman-Akhtar force-pushed the fix/solfege-localized-labels branch from 8e4e68e to 909fbe6 Compare June 21, 2026 12:02
@walterbender walterbender merged commit 4f61505 into sugarlabs:master Jun 21, 2026
14 checks passed
unmeshgb pushed a commit to unmeshgb/musicblocks that referenced this pull request Jul 3, 2026
* fix(i18n): localize solfege labels

* fix(i18n): warn on missing solfege translations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/i18n Changes to localization files area/javascript Changes to JS source files area/tests Changes to test files bug fix Fixes a bug or incorrect behavior size/M Medium: 50-249 lines changed

Projects

Development

Successfully merging this pull request may close these issues.

3 participants