dominiontabs/card_db/translation.txt
Nick Vance 250a9e4b51 Card db refactoring (#105)
* Code refactoring for card db change (#86)
This assumes the following file structure:
```
card_db/
    cards_db.json
    sets_db.json
    <language>/
        cards_text.json
        sets_text.json
```
Files that are needed are:

- cards_db.json
- cards_text.json and sets_text.json for each supported language

**Other changes:**

Added option called `--edition` that can be "1", "2", "latest", or "all". Defaults to "all".
This allows for a quick filtering for those that don't want everything (i.e., "all").

- "1" is for all 1st editions of expansions. It also includes 2nd edition update packs.
- "2" is for all 2nd editions of expansions. So base, Dominion 2nd ed., and Intrigue 2nd ed. (no update packs, since already in 2nd edition)
- "latest" is for base, Dominion 2nd ed., and Intrigue 2nd ed., and all the remaining 1st editions.

Cards can be grouped 3 ways:

- No grouping (default)
- In expansion grouping invoked with `--special_card_groups`.
- Grouping across expansions with `--exclude_events` and `--exclude_landmarks`.  These groups are placed in a set called "Extras".   `--exclude_prizes` is not currently implemented.

Added an option called `--upgrade_with_expansion` which will put the upgraded cards into the corresponding earlier expansion.  So all 1st edition cards as well as the upgrade cards appear in the 1st edition set.  That way the cards are listed on the expansion dividers and any tab/ordering fit the expansion as a whole.  And because of the deleted cards in 2nd edition, this is a different list of cards than just using the 2nd edition.

* update set image mapping for 2nd edition icons
* add improved set icons from https://boardgamegeek.com/filepage/73273/dominion-card-icons-vector-images
* recompress all images
* new format for cards_db.json and translations
* Added short name to sets
* Updates to allow blank set images for base cards and fix blank set image for the "Extras" set.  Also removed base_set.png which is no longer needed (again!)
* scaled all set images to be exactly 300 x 300 pixels for consistency and better printing
* Updated __init__.py and cards.py to automatically find the "lowest cost" value from all the cards in a group.
* Update carddb_tests.py
  * Updated set information in testcases
  * Changed test of cardset to test cardset_tag instead.  Since that is what everything keys off of now.
  * Updated the language tests to pull in the language parts before making the check.
* Standardize on ISO8859-15 (#98)
* Remove Trash Card from 2nd edition, replace HTML line breaks & unicode
* Better Error Handling for Font Errors
* Added text formating codes
Added text formatting codes for "extra" and "description" fields.  This includes:
<tab> and <t> to add a tab (4 spaces)
<n> as an alternative to \n (hard new line)
<br> as an alternative to <br /> (soft new line)
<c> and <center> to center text in this paragraph until the next hard new line
<l> and <left> to left align text in this paragraph until the next hard new line
<r> and <right> to right align text in this paragraph until the next hard new line.
<line> to add a hard new line, a centered dividing line, and a trailing hard new line.
<line> to put a centered line
This goes with the <b>..</b> for bold, <i>..</i> for italics, and <u>..</u> for underline that was already existing (but probably not remembered.
* Update card count presentation (#116)
* wvoigt added automatic bonus highlighting (#119)
2016-12-10 21:05:34 -08:00

139 lines
7.9 KiB
Plaintext

# Translation Instructions
## File Format
/card_db/
xx/
bonuses_xx.json
cards_xx.json
sets_xx.json
types_xx.json
where xx is ISO 639-1 standard language code in lower case with under bar '_' replacing dash '-'
Please rename the directory and the files to match the language you are providing.
## Character encoding
The files:
bonuses_xx.json
cards_xx.json
sets_xx.json
types_xx.json
must be encoded in ISO 8859-15, also known as "Latin alphabet no. 9"
This character set is used throughout the Americas, Western Europe, Oceania, and much of Africa.
It is also commonly used in most standard romanizations of East-Asian languages.
If you have a language that is not supported by ISO 8859-15 please contact the developers.
## Anatomy of sets_xx.json
Entries in this file represent Dominion sets/expansions. A typical entry looks like:
"alchemy": {
"set_name": "Alchimia",
"text_icon": "Al"
},
The set key word (e.g., "alchemy" for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
The key word "set_name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the set in the target language.
The key word "text_icon" MUST NOT BE CHANGED, but the value after the : should be a one or two letter identifier to be used by the set if the set graphics are not displayed. This is usually the first letter of the set name in the target language.
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
## Anatomy of bonuses_xx.json
Entries in this file represent Dominion bonuses. The items in the "include" list are items that will be marked bold (i.e., <b>..</b>)
when found in the card text in the following format:
+# item_from_include_list
as long as this is not followed by a item from the "exclude" list.
For example in English:
"+2 Buys" will be made bold, but
"+1 Action token" will not, since the key word token follows.
Just replace the English terms with the terms used in the target language.
Generally you should include the singular as well as the plural version of the term.
English versions do not need to be duplicated, since they are used automatically.
The key words "exclude" and "include" MUST NOT BE CHANGED.
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
## Anatomy of types_xx.json
Entries in this file represent Dominion card types. A typical entry looks like:
"Action": "Action in new language",
The type key word (i.e., the "Action": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
## Anatomy of cards_xx.json
Entries in this file represent Dominion cards, and groups of cards. A typical entry looks like:
"Gold": {
"description": "Worth 3 Coins.",
"extra": "30 cards per game.",
"name": "Gold",
"untranslated" : "description, extra, name"
},
The card key word (e.g., "Gold": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
The key word "name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the card in the target language.
The key word "description" MUST NOT BE CHANGED, but the value after the : should be changed to the card text in the target language.
The key word "extra" MUST NOT BE CHANGED, but the value after the : should be changed to any extra rules or explanations for the card in the target language. If you purposely want no extra text, enter "".
The key word "untranslated" MUST NOT BE CHANGED, but the value after the : should be changed. Removed any key word for which you have provided a translation.
For example:
- if you provided the "name" of the card, and only the "name", then change to "description, extra"
- if you provided the "name" of the card and it's "description", but have not translated the "extra", then change to "extra"
- if you provided all 3 entries, then change to ""
The "untranslated" entry is used during maintanance of the language files to update any remaining default language entries that might have changed.
## Special Text
These character sequences have special meaning in the "description" and "extra" text:
'<b>' ... '</b>' for bold
'<i>' ... '</i>' for italics
'<u>' ... '</u>' for underline
'<tab>' and '<t>' and '\t' to add a tab (4 spaces)
'<n>' and '\n' for a "hard new line"
'<br>' and '<br/>' and '<br />' for a "soft new line"
'<c>' and '<center>' add hard new line and center text until the next hard new line
'<l>' and '<left>' add hard new line and left align text until the next hard new line
'<r>' and '<right>' add hard new line and right align text until the next hard new line
'<j>' and '<justify>' add hard new line and justify align text until the next hard new line
'<line>' to add a hard new line, a centered dividing line, and a trailing hard new line
Hard new lines ('\n' and '<n>'), will reset the paragraph formatting back to the default.
Soft new lines will insert a new line, but will continue the current formatting.
The "description" will be default to "center" text.
The "extra" will default to "justify" text.
## Special Images
Special character sequences are recognized by the program to substitute graphics in the text. These include:
'<VP>' and ' VP ' for a Victory Point graphic
'Potion' for a small Potion graphic
'# Coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
'# Coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
'# coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
'# coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
For example:
- the text '1 coin' would produce a graphic of a coin with the number 1 on top.
- the text 'empty coin' and '_ coin' would produce a graphic of only a coin.
'# <*COIN*>' where # is a number 0 - 13, will produce a large coin graphic with the # on top
'# <*VP*>' where # is a number, will produce a large Victory Point graphic with the # before it
'# <*POTION*>' where # is a number, will produce a large Potion graphic with the # before it
To keep the special images, please do not translate '<VP>', 'Potion', or the 'coin' variations into the target language.
## Style Guide
- If bonuses_xx.json for the target language is configured correctly, bonuses within the text will automatically be bolded.
It will not bold the text if it is followed by 'token' or 'Token'.
Example: "Choose one: +3 Cards; or +2 Actions." will bold '+3 Cards' and '+2 Actions'.
- Bonuses should be listed in the following order:
+Cards, +Actions, +Buys, +Coins, then +<VP>
- When possible, bonuses should be listed vertically and centered.
Examples: "+1 Card<br>+1 Action<br>+1 Buy<br>+1 Coin<br>+2 <VP><n>"
"+1 Card\n+1 Action\n+1 Buy\n+1 Coin\n+2 <VP>\n"
The "description" field by default is centered. '<br>', '<n>', and '\n' will all provide new lines.
- If a Dividers/Tab has more than one card explanation, if space permits, try to mimic a stand alone Dividers/Tab in the overall format.
Example from "Settlers - Bustling Village": "<left><u>Settlers</u>:<n>+1 Card<br>+1 Action<n>Look through your discard pile. You may reveal a Copper from it and put it into your hand.<n><left><u>Bustling Village</u>:<n><center>+1 Card<br>+3 Actions<n>Look through your discard pile. You may reveal a Settlers from it and put it into your hand."