Skip to content

Fix - Fall back to English for untranslated tabcmd strings - #479

Closed
jacalata wants to merge 1 commit into
developmentfrom
jac/english-locale-fallback
Closed

jacalata wants to merge 1 commit into
developmentfrom
jac/english-locale-fallback

Conversation

@jacalata

Copy link
Copy Markdown
Contributor

Untranslated keys currently show as the raw .properties key until the next bulk .mo regeneration touches that locale. Falls back to the English catalog instead so users see real text in the interim.

Also fixes a Windows-only cosmetic issue: doit localize's check_mo task prints ja/ko/zh sample text that cp1252 consoles can't encode, raising charmap errors during validation. Forces UTF-8 on the console streams doit actually writes to.

This branch will also carry the full multi-locale .mo regeneration once #446, #448, #449, #432, and #455 have landed.

🤖 Generated with Claude Code

…coding in doit localize

Untranslated keys currently show as the raw .properties key until the
next bulk .mo regeneration touches that locale. Fall back to the English
catalog instead so users see real text in the interim.

Also fixes a Windows-only cosmetic issue: doit localize's check_mo task
prints ja/ko/zh sample text that cp1252 consoles can't encode, raising
charmap errors during validation. Force UTF-8 on the console streams
doit actually writes to.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 04:07
@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
tabcmd
   __main__.py121212 0%
   _version.py111111 0%
   tabcmd.py151515 0%
   version.py1066 40%
tabcmd/commands
   commands.py101010 0%
   constants.py771818 77%
   server.py1351818 87%
tabcmd/commands/auth
   session.py3945050 87%
tabcmd/commands/datasources_and_workbooks
   datasources_and_workbooks_command.py1571818 89%
   datasources_workbooks_views_url_parser.py14255 96%
   delete_command.py702323 67%
   export_command.py1202525 79%
   get_url_command.py1274747 63%
   publish_command.py1252929 77%
   runschedule_command.py2177 67%
tabcmd/commands/extracts
   create_extracts_command.py4288 81%
   decrypt_extracts_command.py2722 93%
   delete_extracts_command.py3766 84%
   encrypt_extracts_command.py2722 93%
   extracts.py2022 90%
   reencrypt_extracts_command.py2722 93%
   refresh_extracts_command.py481010 79%
tabcmd/commands/group
   create_group_command.py2955 83%
   delete_group_command.py2722 93%
tabcmd/commands/project
   create_project_command.py4688 83%
   delete_project_command.py3544 89%
   publish_samples_command.py3044 87%
tabcmd/commands/site
   create_site_command.py3455 85%
   delete_site_command.py2722 93%
   edit_site_command.py661818 73%
   list_command.py771212 84%
   list_sites_command.py2922 93%
tabcmd/commands/user
   add_users_command.py2955 83%
   create_site_users.py581111 81%
   create_users_command.py5999 85%
   delete_site_users_command.py4355 88%
   user_data.py2223131 86%
tabcmd/execution
   _version.py222 0%
   global_options.py14788 95%
   localize.py711313 82%
   logger_config.py6066 90%
   tabcmd_controller.py4277 83%
TOTAL294148584% 

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are narrowly scoped, fallback behavior was verified, and no blocking issues were identified.

0 open findings

What changed in this PR

Adds English fallback text for untranslated tabcmd messages and fixes Windows encoding errors during localization validation.

Changes:

  • Adds the English catalog as a fallback for non-English locales.
  • Adds a regression test for untranslated messages.
  • Configures validation output streams to use UTF-8.
File Description
tests/​test_localize.py Tests fallback text and placeholder preservation.
tabcmd/​execution/​localize.py Adds English catalog fallback.
dodo.py Enables UTF-8 output during catalog validation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jacalata

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #440, which does the same English-fallback fix plus a check-mo-freshness CI workflow and the full locale .mo regeneration. Continuing there instead.

@jacalata jacalata closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants