Skip to content

Move hardcoded strings to localized files#368

Merged
jacalata merged 22 commits into
developmentfrom
jac/collect-strings
Jul 8, 2026
Merged

Move hardcoded strings to localized files#368
jacalata merged 22 commits into
developmentfrom
jac/collect-strings

Conversation

@jacalata

@jacalata jacalata commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Addresses #307
This changelist removes any remaining hardcoded strings and replaces them with calls to the localized strings. The strings are not necessarily localized yet.

@jacalata jacalata force-pushed the jac/collect-strings branch from 08de77b to bbcb1e6 Compare June 30, 2026 01:55
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
tabcmd
   __main__.py101010 0%
   _version.py111111 0%
   tabcmd.py151515 0%
   version.py955 44%
tabcmd/commands
   commands.py101010 0%
   constants.py771818 77%
   server.py1351818 87%
tabcmd/commands/auth
   session.py3814646 88%
tabcmd/commands/datasources_and_workbooks
   datasources_and_workbooks_command.py1571818 89%
   datasources_workbooks_views_url_parser.py14255 96%
   delete_command.py601616 73%
   export_command.py1202525 79%
   get_url_command.py1274747 63%
   publish_command.py1232828 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.py3822 95%
   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.py601010 83%
   delete_site_users_command.py4355 88%
   user_data.py2213131 86%
tabcmd/execution
   _version.py222 0%
   global_options.py12588 94%
   localize.py661111 83%
   logger_config.py5266 88%
   tabcmd_controller.py4277 83%
TOTAL285045384% 

jacalata and others added 21 commits July 8, 2026 13:57
Add or edit some changed messages
- cleaned up string ids that either added "tabcmd" as a prefix or took it off as a prefix incorrectly
- add back some deleted strings
- incorporate check_strings into the localization build and pushed some output into a log file
- added docs in Contributing.md and i18n/README
This edits the *.properties files in place, leaving them ready to check in.
When translations are being brought in, we can just paste in the whole file and let it delete the ones we don't need.
Drop the filtering step in our .mo generation
alphabetize *just* this block of tabcmd.x
Remaining non-localized strings are used at times when the loc module may not be loaded (e.g throwing an error stack).
Line 245 was calling print() directly, bypassing the file output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
print_and_write now accepts an optional full_list parameter. When the
list exceeds 10 items the console gets the truncated summary and the
file additionally gets the complete sorted list. Removes four copies
of the same truncation pattern from check_build_mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The variable was overwritten for every locale with no missing keys,
so the "repeated for visibility" block at the end could print a
non-English locale's OK message. Rebuild the English summary directly
from english_missing_keys at the end instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes mypy no-redef errors for set_resource_url_arg and set_destination_filename_arg.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jacalata jacalata force-pushed the jac/collect-strings branch from 68ddb03 to 155db57 Compare July 8, 2026 20:58
- Add tabcmd.options.users_file, tabcmd.options.workbook,
  tabcmd.publish.options.append.detailed, tabcmdparser.help.link,
  tabcmdparser.help.specific to tabcmd_messages_en.properties
- Update datasources_workbooks_views_url_parser.py and
  delete_group_command.py to use existing tabcmd.* prefixed keys
  instead of old unprefixed keys that no longer exist

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jacalata jacalata merged commit 3cdbba0 into development Jul 8, 2026
20 checks passed
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.

3 participants