Skip to content

Conversation

@jacalata
Copy link
Contributor

@jacalata jacalata commented May 6, 2024

The new string references do not have translations, but those are being done. When they are returned we will simply have to copy them into the existing files.

@github-actions
Copy link

github-actions bot commented May 6, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
tabcmd
   __main__.py101010 0%
   tabcmd.py141414 0%
   version.py633 50%
tabcmd/commands
   commands.py101010 0%
   constants.py771313 83%
   server.py1302020 85%
tabcmd/commands/auth
   session.py3704444 88%
tabcmd/commands/datasources_and_workbooks
   datasources_and_workbooks_command.py1521818 88%
   datasources_workbooks_views_url_parser.py1401010 93%
   delete_command.py601616 73%
   export_command.py1192525 79%
   get_url_command.py1274747 63%
   publish_command.py831919 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.py431010 77%
   list_sites_command.py2922 93%
tabcmd/commands/user
   create_site_users.py571010 82%
   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.py691111 84%
   logger_config.py4266 86%
   tabcmd_controller.py4277 83%
TOTAL272342285% 

@jacalata jacalata requested a review from Copilot July 31, 2025 09:12

This comment was marked as outdated.

@jacalata jacalata requested a review from Copilot July 31, 2025 22:11

This comment was marked as outdated.

@jacalata jacalata requested a review from Copilot July 31, 2025 22:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces hardcoded raw strings throughout the tabcmd codebase with translation calls to support internationalization. The changes prepare the codebase to use translated strings from properties files instead of embedded English text.

Key changes:

  • Replace raw strings in Python source files with translation function calls using _() syntax
  • Update properties files to include new translation keys for previously hardcoded strings
  • Remove unused string constants and replace them with localized references

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tabcmd/locales/en/tabcmd_messages_en.properties Adds new translation keys and updates existing ones with deprecation notes and platform-specific information
tabcmd/locales/en/shared_wg_en.properties Removes unused permission-related translation entries and retains only necessary role and format strings
tabcmd/execution/parent_parser.py Replaces hardcoded strings array with translation calls for parser configuration
tabcmd/execution/global_options.py Updates argument help text to use translation keys instead of raw strings
tabcmd/commands/user/create_users_command.py Fixes incorrect translation key usage in error handling
tabcmd/commands/site/list_command.py Replaces local string dictionary with translation calls
tabcmd/commands/site/delete_site_command.py Removes hardcoded strings array and uses translation keys
tabcmd/commands/datasources_and_workbooks/publish_command.py Updates command description to use correct translation key
tabcmd/commands/datasources_and_workbooks/get_url_command.py Updates function call to use renamed translation-based function
tabcmd/commands/datasources_and_workbooks/export_command.py Adds import for updated function name
tabcmd/commands/datasources_and_workbooks/delete_command.py Replaces hardcoded strings with translation keys

@jacalata jacalata requested review from bcantoni and renoyjohnm July 31, 2025 22:53
Copy link
Contributor

@bcantoni bcantoni left a comment

Choose a reason for hiding this comment

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

@jacalata overall this looks good. I added a script (thank you Cursor) to check message ids between source and properties files. It found 23 that are missing so let's add these in this PR. (Just run python bin/i18n/check-strings.py to see the list.)

- 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
@jacalata jacalata merged commit 81c5085 into development Aug 5, 2025
19 checks passed
jacalata added a commit that referenced this pull request Aug 8, 2025
* All strings are fetched from *.properties files
* clean out unused strings
* clarify comment
* more global_options settings


Co-authored-by: Copilot <[email protected]>

* Update tabcmd/locales/en/tabcmd_messages_en.properties

Co-authored-by: Copilot <[email protected]>

* Update tabcmd/commands/datasources_and_workbooks/delete_command.py

Co-authored-by: Copilot <[email protected]>

* Update tabcmd/execution/global_options.py

Co-authored-by: Copilot <[email protected]>

* Update tabcmd_messages_en.properties

Add or edit some changed messages

* Update global_options.py

* Update tabcmd/execution/parent_parser.py

Co-authored-by: Copilot <[email protected]>

* Update tabcmd/execution/parent_parser.py

Co-authored-by: Copilot <[email protected]>

* Update tabcmd/locales/en/tabcmd_messages_en.properties

Co-authored-by: Copilot <[email protected]>

* format w black

* Add script for double-checking messages found in source code vs properties files

* Add a "launching" message which was referenced everywhere

* document loc process, fix misreferenced string ids

- 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

* format

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Brian Cantoni <[email protected]>
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