Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a large number of new localized strings #302

Merged
merged 21 commits into from
Jul 24, 2024

Conversation

jacalata
Copy link
Contributor

The majority of files changed here are

  1. .properties files with new strings
  2. .mo files which are the binary strings files for packaging
  3. .po files which I decided we shouldn't keep in the repo because they are simply steps in the conversion from .properties to .mo
  4. about a dozen src code files with changes to the string keys being used

However the interesting changes are

  • prop2po.py: more robust handling for the properties->po conversion
  • dodo.py: many new automation scripts for going through the entire process of properties -> po -> mo. Added a step that filters out strings that are in .properties but not used in code, which reduces the size of .mo files by 80%
  • tabcmd-*.spec: change an unreliable method of collecting .mo files to manually list all of them
  • localize.py: change from a 'see if this works' to 'check for existence of this folder' method to identify what kind of app is running

I've tested the windows package manually on my machine but will be using github runners to test the mac/linux packages.

jacalata added 12 commits July 17, 2024 00:24
A lot of changes to the dodo code, but it's mostly
a) handling file paths better
b) moving the 'merge files' step before the 'generate po' step
c) automating some processing I did manually in the past to remove lines that caused problems
There is a group of strings I appear to have added manually that was deleted with the new loc file dump, and another group of string keys that are used in code and don't appear in properties.
Adding here to not lose them, but hope to find they are not necessary.
Add copyright, fix handling of strings with '=' in them
these should make the process of updating strings straightforward in the future, and create intermediate outputs to help with debugging if it is not.

Validated with the windows package only so far.
Removed a duplicate string from extras.properties
Adding the newly generated .mo files
Copy link

github-actions bot commented Jul 19, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
tabcmd
   __main__.py101010 0%
   tabcmd.py141414 0%
   version.py633 50%
tabcmd/commands
   commands.py101010 0%
   constants.py771515 81%
   server.py1262626 79%
tabcmd/commands/auth
   session.py3604242 88%
tabcmd/commands/datasources_and_workbooks
   datasources_and_workbooks_command.py1171313 89%
   delete_command.py601616 73%
   export_command.py1282828 78%
   get_url_command.py1896161 68%
   publish_command.py822424 71%
   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.py481313 73%
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.py2822 93%
   edit_site_command.py3822 95%
   list_command.py441010 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.py1452323 84%
   localize.py691111 84%
   logger_config.py4266 86%
   tabcmd_controller.py3855 87%
TOTAL262245183% 

jacalata added 3 commits July 19, 2024 13:34
and remove test on a string that no longer exists
- replace double quotes with single
- cleaner file globs
- remove no-op encoding
- fix copyright
jacalata added 4 commits July 22, 2024 21:13
Also add to automation a step where I replaced two-single-quote chars with one.
@jacalata jacalata merged commit f3337f2 into development Jul 24, 2024
15 checks passed
@jacalata jacalata deleted the jac/string-localization branch January 3, 2025 04:32
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