Skip to content

Commit

Permalink
Czech translation (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
smrky1 authored Mar 31, 2024
1 parent 3640866 commit 7c164af
Show file tree
Hide file tree
Showing 39 changed files with 3,008 additions and 513 deletions.
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

0 comments on commit 7c164af

Please sign in to comment.