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

Czech translation #499

Merged
merged 31 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b35699f
CZ translation: Base, Intrigue, Dark Ages, Seaside
smrky1 Jan 28, 2024
b5301ad
Update fonts README.md
smrky1 Jan 28, 2024
09ed6a9
Update README.md
smrky1 Jan 28, 2024
042bc9e
Changed "cz" language to "cs"
smrky1 Jan 28, 2024
e4fcf42
CardSorter locale based sorting
smrky1 Jan 28, 2024
9cf756f
- Removed custom "Martin" Promo set from sets_cs.json
smrky1 Feb 10, 2024
c0bc9bb
Rebuilt the cs language DBs
smrky1 Feb 10, 2024
aae45bb
Merge remote-tracking branch 'upstream/master'
smrky1 Feb 11, 2024
e8d494e
Fixed Workflows to support necessary locale
smrky1 Feb 11, 2024
79c2feb
Error handling when Locale cannot be set.
smrky1 Feb 11, 2024
32cd6b1
Adding sudo to YAML workflow actions
smrky1 Feb 12, 2024
ec14b34
Update README.md
smrky1 Feb 15, 2024
e882ad4
Added UTF-8 to setlocale()
smrky1 Feb 20, 2024
2e30341
Merge branch 'master' of https://github.com/smrky1/dominiontabs
smrky1 Feb 20, 2024
6e92d21
Fixed setlocale() related crash on macOS
smrky1 Feb 20, 2024
5b60803
Merge remote-tracking branch 'upstream/master'
smrky1 Feb 21, 2024
23cfe18
Added UTF-8 to test workflows
smrky1 Feb 21, 2024
2087f55
Updated workflow Actions
smrky1 Feb 21, 2024
b4fae48
Merge branch 'master' into master
smrky1 Feb 21, 2024
872ad15
Revert "Fixed setlocale() related crash on macOS"
smrky1 Feb 21, 2024
6eecbde
Merge branch 'master' into master
nickv2002 Feb 23, 2024
bf3f666
Fixed Czech sets translation
smrky1 Feb 23, 2024
98bf19a
Added PyICU support (+ removed locale)
smrky1 Feb 23, 2024
ceb6f6a
Removed install locales from workflows
smrky1 Feb 23, 2024
be29a76
Added PyICU install to workflows (Ubuntu only)
smrky1 Feb 23, 2024
19c69c5
Removed local files from .gitignore
smrky1 Feb 23, 2024
f6c5dff
Added pyCharm project to gitignore
smrky1 Feb 23, 2024
20ce3b4
Added Czech translation for Alchemy, Cornucopia, Hinterlands, Prosperity
smrky1 Feb 24, 2024
8412bca
Merge branch 'master' into master
sumpfork Mar 20, 2024
03aa707
Rerun linting + removed sys.modules call
smrky1 Mar 31, 2024
48b01e7
Merge branch 'master' into master
smrky1 Mar 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/compile_card_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
run: doit update_languages
- run: |
pip install .
- name: Install PyICU
if: ${{ matrix.os == 'ubuntu-latest'}}
run: |
sudo apt update
sudo apt install python3-icu
- name: test generation with compiled Languages
run: pytest -k "test_languages"
- uses: dorny/paths-filter@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
- run: |
pip install -r requirements.txt
pip install .
- name: Install PyICU
if: ${{ matrix.os == 'ubuntu-latest'}}
run: |
sudo apt update
sudo apt install python3-icu
- name: Lint
run: pre-commit run --all-files --show-diff-on-failure -v
- name: Test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dist
.python-version

.vscode
.idea

/sumpfork_dividers/
/src/domdiv/fonts/*.otf
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Again, to generate tabs go to the **[Online Generator](http://domdiv.bgtools.net

If you do need to install the package locally (the script provides a lot more options than the web-based generator), a simple `pip install domdiv` should suffice, providing a command by the name of `dominion_dividers`. However, see the note under Prerequisites->Fonts below as the default install will fall back on a font that doesn't match the cards (though most people don't notice). Run `dominion_dividers <outfile>` to get a pdf of all dividers with the default options, or run `dominion_dividers --help` to see the (extensive) list of options.

Additionally, to ensure the card dividers are generated sorted by correct alphabetical order (especially for languages with many accented characters (e.g. Czech)), you are advised to install the optional `PyICU` [library](https://gitlab.pyicu.org/main/pyicu). If `PyICU` is installed ([instructions](https://github.com/sumpfork/dominiontabs/wiki/PyICU-Installation-Instructions)), the script will sort the card dividers based on selected language alphabet (e.g. in Czech `z < ž`). Otherwise, default sorting will be used (the cards beginning with accented characters will be at the end of the sorted set).

## Documentation

The script has an extensive set of options that are relatively well documented via `dominion_dividers --help`. Some are hard to describe unless you see output samples, so we recommend running the script with various options to see which configuration you like. The help output is replicated [here](https://github.com/sumpfork/dominiontabs/wiki/Documentation-%28Script-Options%29) for reference.
Expand All @@ -28,6 +30,8 @@ There are a number of fonts used in Dominion and many of them we cannot distribu

Sadly, many of these fonts use features that are not support by the reportlab package. Thus, they need to first be converted to ttf (TrueType) format. I used the open source package fontforge to do the conversion. Included as 'tools/convert_font.ff' is a script for fontforge to do the conversion, on Mac OS X with fontforge installed through macports or homebrew you can just run commands like `./tools/convert_font.ff MinionPro-Regular.otf`.

If you select language in `domdiv` options which is not supported in [ISO/IEC 8859-1:1998 (Latin1)](https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Modern_languages_with_complete_coverage) (e.g. Czech), you will have to obtain Times Roman TTF fonts as well (see `./src/domdiv/fonts/README.md` for details).

To supply fonts locally, put them in a directory and supply the relative path to it to the script via the `--font-dir` option. Alternatively you can copy the converted `.ttf` files to the `fonts` directory in the `domdiv` package/directory, then perform the package install below.

## Using as a library
Expand Down Expand Up @@ -69,6 +73,8 @@ So now we have

`docker run -v $PWD/output:/app/output --rm dominiontabs --font-dir /fonts --expansions cornucopia --outfile ./output/dominion_dividers_docker.pdf`

(Replace `$PWD` with `%cd%` on Windows OS)

Once that runs you should have under your current directory:

`./output/dominion_dividers_docker.pdf`
Expand Down
26 changes: 26 additions & 0 deletions card_db_src/cs/bonuses_cs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"exclude": [
"Žeton",
"Žetony",
"Žetonů"
],
"include": [
"Coin",
"Coins",
"Mince",
"Mincí",
"Karty",
"Karta",
"Kartu",
"Karet",
"Nákup",
"Nákupy",
"Akce",
"Akci",
"Coffer",
"Coffers",
"Villager",
"Villagers",
"<VP>"
]
}
2,672 changes: 2,672 additions & 0 deletions card_db_src/cs/cards_cs.json

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions card_db_src/cs/sets_cs.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions card_db_src/cz/types_cz.json → card_db_src/cs/types_cs.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"Action": "Action",
"Action": "Akce",
"Artifact": "Artifact",
"Attack": "Attack",
"Attack": "Útok",
"Blank": "Blank",
"Boon": "Boon",
"Castle": "Castle",
"Curse": "Curse",
"Curse": "Kletba",
"Doom": "Doom",
"Duration": "Duration",
"Duration": "Trvání",
"Event": "Event",
"Events": "Events",
"Expansion": "Expansion",
"Expansion": "Rozšíření",
"Fate": "Fate",
"Gathering": "Gathering",
"Heirloom": "Heirloom",
"Hex": "Hex",
"Landmark": "Landmark",
"Landmarks": "Landmarks",
"Looter": "Looter",
"Looter": "Plenitel",
"Night": "Night",
"Prize": "Prize",
"Prizes": "Prizes",
"Prize": "Odměna",
"Prizes": "Odměny",
"Project": "Project",
"Reaction": "Reaction",
"Reaction": "Reakce",
"Reserve": "Reserve",
"Ruins": "Ruins",
"Shelter": "Shelter",
"Shelters": "Shelters",
"Ruins": "Ruiny",
"Shelter": "Útočiště",
"Shelters": "Útočiště",
"Spirit": "Spirit",
"Start Deck": "Start Deck",
"State": "State",
"Trash": "Trash",
"Trash": "Smětiště",
"Traveller": "Traveller",
"Treasure": "Treasure",
"Victory": "Victory",
"Treasure": "Peníze",
"Victory": "Vítězné body",
"Zombie": "Zombie"
}
16 changes: 0 additions & 16 deletions card_db_src/cz/bonuses_cz.json

This file was deleted.

Loading
Loading