Skip to content

Commit 651887e

Browse files
authored
Release 2.0.19 (#380)
2 parents a8b3e70 + 8c7f9d1 commit 651887e

46 files changed

Lines changed: 2722 additions & 1272 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919

2020
steps:
21-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@v6
2222

2323
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
2424
uses: actions/setup-python@v6

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v5
41+
uses: actions/checkout@v6
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL

.github/workflows/generate-metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v5
14+
- uses: actions/checkout@v6
1515

1616
- name: Set up Python
1717
uses: actions/setup-python@v6

.github/workflows/package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
UPLOAD_FILE_NAME: tabcmd
6161

6262
steps:
63-
- uses: actions/checkout@v5
63+
- uses: actions/checkout@v6
6464

6565
- uses: actions/setup-python@v6
6666
with:

.github/workflows/publish-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Build dist files for PyPi
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
1919
with:
2020
fetch-depth: 0
2121
- uses: actions/setup-python@v6

.github/workflows/run-e2-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ${{ matrix.os }}
2424

2525
steps:
26-
- uses: actions/checkout@v5
26+
- uses: actions/checkout@v6
2727

2828
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
2929
uses: actions/setup-python@v6

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ${{ matrix.os }}
2121

2222
steps:
23-
- uses: actions/checkout@v5
23+
- uses: actions/checkout@v6
2424

2525
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
2626
uses: actions/setup-python@v6

WorldIndicators.tdsx

62.3 KB
Binary file not shown.

bin/i18n/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
### Strings and localization
3+
4+
New text should not be hardcoded into the python, but added to tabcmd/locales/en/extra.properties. This file can be given to the translation team and they will return a copy for each other language. Until then, the english string will be used as a fallback.
5+
6+
To handle localizing text we used the python standard library tool [gettext](https://docs.python.org/3/library/gettext.html). This expects .mo files. I couldn't find a tool that transformed .properties -> .mo directly so we go through .po format.
7+
(FYI: to read mo files for debugging use https://poedit.net/download)
8+
9+
10+
These steps are separated for easier troubleshooting: each step is idempotent and will overwrite the existing output. More details about implementation are in the script code at dodo.py
11+
12+
1. convert strings from .properties files to .mo for bundling
13+
This step combines the .properties files into a single file, discarding any strings that are not present in code and normalizing curly quotes and unrecognized characters in the strings it keeps. (These files are separate because they are pulled from separate translation sources internally.)
14+
> python -m doit properties
15+
16+
2. Convert the combined .properties file into a .po file (these are human readable)
17+
> python -m doit po
18+
19+
3. Convert the .po files into .mo files (these are not human readable)
20+
This also checks the .mo files for validity by loading them with gettext
21+
> python -m doit mo

bin/i18n/__init__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""
2+
i18n utilities for tabcmd localization.
3+
4+
This package contains tools for checking and processing localization strings.
5+
"""
6+
7+
from .check_strings import (
8+
find_python_files,
9+
extract_string_keys_from_file,
10+
load_properties_files,
11+
load_properties_file,
12+
find_missing_strings,
13+
check_build_mode,
14+
check_dev_mode
15+
)
16+
17+
__all__ = [
18+
'find_python_files',
19+
'extract_string_keys_from_file',
20+
'load_properties_files',
21+
'load_properties_file',
22+
'find_missing_strings',
23+
'check_build_mode',
24+
'check_dev_mode'
25+
]

0 commit comments

Comments
 (0)