diff --git a/data/json/mapgen/lab/README.md b/data/json/mapgen/lab/README.md deleted file mode 100644 index 8df692ee5804..000000000000 --- a/data/json/mapgen/lab/README.md +++ /dev/null @@ -1,125 +0,0 @@ -# Lab JSON Quick Guide - -Labs are heavily randomized but have very few actual overmap terrain tiles, meaning that variety in the maps gets almost entirely using JSON. In particular, labs use place_nested extensively to randomly select submaps, such as new lab rooms. - - -## Quick Guide for new lab areas: - -In lab_floorplans.json add a new mapgen json with om_terrain of lab_4side. - -Keep the middle 2 spaces of each border clear, because that's where doors open out to. Some or all of the border spaces will be turned into 1-width walls between lab sections, so make sure the map 'works' whether or not the outermost spaces are created or not (by keeping them clear, or having 'disposable' furniture like counters, lockers, broken consoles, etc). Allow rotation. - -To add a lab finale instead, use the om_terrain of lab_finale_1level and put your JSON in lab_floorplans_finale1level.json instead. - - -## Quick Guide for new lab dead-ends: - -In lab_floorplans_1side.json add a new mapgen json with om_terrain of lab_1side. - -Make the area facing north, keeping the 2 middle spaces of the northern border clear because that's where doors open out to. If you want to have a locked area, set the floor to 't_strconc_floor' and stairs won't appear there (this floor is ',' in the lab_palette). Use place_nested to place 'lab_1side_border_doors' at coords [0,0]. Do not allow rotation. - - -## Quick Guide for new lab rooms: - -In lab_rooms.json add a new mapgen json with a nested_mapgen_id of lab_room_7x7 or lab_room_9x9 with a mapgensize of [7,7] or [9,9]. - -In some rare cases the first row or column of terrain may be replaced with a border wall, so prefer layouts that look intact even if that occurs. - -If your layout needs to know where the doors of the room will open up into, instead use a nested_mapgen_id of lab_room_7x7_crossdoors and lab_room_9x9_crossdoors which will ensure that doors only appear in the exact middle of a wall. - - -# Lab JSON Full Guide - -## How area mapgen json works - -A lab is mostly made out of overmap tiles of type 'lab', 'lab_stairs', and typically one 'lab_finale'. - -Lab terrain needs special treatment: stairs, border walls, dead-ends, and more, so JSON instead uses three 'fake' overmap tile types. Create a JSON mapgen object with om_terrain set to one of these, and the code will convert it and place it correctly on the map. - -* lab_1side - placed when exactly one lab is adjacent, maps should assume a north-facing entrance. Do not allow rotation. -* lab_finale_1level - placed at the bottom of a lab on terrain types. Rotation optional. -* lab_4side - all the other maps. Rotation optional. - - -## Border walls - -Labs have unusual borders: 1-width walls between lab areas, laid out on the south and east side of those tiles, potentially with metal doors in the middle of them, like so: - -``` - " |", - " |", - " |", - " |", - " |", - " |", - " |", - " |", - " |", - " |", - " |", - " M", - " M", - " |", - " |", - " |", - " |", - " |", - " |", - " |", - " |", - " |", - " |", - "-----------MM----------|" -``` - -If a north or west neighbor isn't a lab, the entire side gets needs to be overwritten with a wall, replacing whatever was normally there. If the east or south neighbor isn't a lab, that door needs to be overwritten with a wall. - -Some JSON maps can start from the above layout, disable rotation, and call place_nested with the 'lab_border_walls' chunk in JSON. In this case, borders will be perfect and no additional code will fire. - -But if borders have not been managed (determined by checking for the presence of an east-facing door/wall), then the code will create the lab border walls and doors on all four directions. - -'lab_border_walls' does not work on rotated maps, so rotated maps need to rely on hardcoded border wall generation. This is preferable because it creates more variety. So if a map layout is amenable to not knowing if the final 1x1 border around it will be placed or not, it is preferable to allow rotation and not place 'lab_border_walls'. - -One middle-ground: If just part of the map needs to cares about where the border wall is to look correct, put a wall on the east-side of the map and only allow rotation of [0,1]. That will ensure the wall gets placed on the east or south side of the map in the final rotation. See the "electricity room" floorplan for an example of this. - - -## Other hardcoded map generation - -Labs will have a small chance of randomly getting lights, the central & tower labs will always get them. Stairs will be placed on any empty thconc_floor space if the overmap indicated stairs. There's also a 10% chance of special effects like flooding, portals, radiation accidents, etc. Ant-infested labs will get bashed in. - -None of these require json changes to enact, but JSON-ideas for lab special effects in rooms can be added to the spawn tables in lab_maybe_effects_7x7 and lab_maybe_effects_9x9. Currently this just adds spider-infestations. - - -## Room generation - -The most common source of randomness *within* a map is to create a 7x7 or 9x9 room and give it random contents by using place_nested. Don't place rooms directly, instead we use an intermediate map chunk called a 'spawn' which encodes more information and randomizes between all the kinds of rooms that would satisify those requirements. - -* lab_spawn_7x7 - a 7x7 room with no guarantees on where the doors are. -* lab_spawn_7x7_crossdoors - a 7x7 room with doors only in the middle of each border wall. -* lab_spawn_9x9 - a 9x9 room with no guarantees on where the doors are. -* lab_spawn_9x9_crossdoors - a 9x9 room with doors only in the middle of each borders wall. - -Selecting a spawn will randomize between: lab_room_[size] plus the _rare variants, and the _crossdoors variants if applicable. - -If your room is also amenable to having two of its walls redefined, you can also use these spawns to add in more randomized rooms that might modify the walls by adding windows, replacing walls with chainlink, or creating multiple doors and interior walls. These templates assume that there are no doors on the two walls which are not part of this submap. Note these submaps are sized 8x8 and 10x10 because they include the walls to be modified. - -* lab_spawn_7x7_wall_nw -* lab_spawn_7x7_wall_sw -* lab_spawn_9x9_wall_nw -* lab_spawn_9x9_wall_sw - -Use the most specific spawn possible. - - -## Directory - -* lab_central.json - hardcoded maps for the top of central lab. -* lab_common.json - terrain palette, loot palettes, common json objects. -* lab_escape.json - maps specifically for lab challenge escape, these are special placed on lvl 4 of a lab. -* lab_floorplan_cross.json - cross floorplans are unusual for having rock infill when bordering the edge of the lab, with rare vaults. -* lab_floorplans.json - the main source of lab layouts. -* lab_floorplans_1side.json - dead-end floor plans. -* lab_floorplans_finale1level.json - finale floorplans. -* lab_rooms.json - randomized rooms. -* lab_rooms_wall.json - randomized rooms which rewrite the wall borders. -* lab_trains.json - tiles for the lab science train which rarely happens on levels 2 & 4. \ No newline at end of file diff --git a/data/json/mapgen/lab/README.md b/data/json/mapgen/lab/README.md new file mode 120000 index 000000000000..9fd0f753b651 --- /dev/null +++ b/data/json/mapgen/lab/README.md @@ -0,0 +1 @@ +doc/src/content/docs/en/mod/json/guides/map/lab.md \ No newline at end of file diff --git a/doc/astro.config.ts b/doc/astro.config.ts index 714747ad255a..3400f666f775 100644 --- a/doc/astro.config.ts +++ b/doc/astro.config.ts @@ -1,8 +1,8 @@ import { join } from "node:path" import { fileURLToPath } from "node:url" -import { defineConfig } from "astro/config" import starlight from "@astrojs/starlight" +import { defineConfig } from "astro/config" import starlightLinksValidator from "starlight-links-validator" import { loadEnv } from "vite" @@ -40,7 +40,9 @@ export default defineConfig({ defaultLocale: "en", locales: { en: { label: "English" }, + de: { label: "Deutsch", lang: "de-DE" }, ko: { label: "한국어", lang: "ko-KR" }, + ru: { label: "Русский", lang: "ru-RU" }, }, logo: { src: "./src/assets/icon-round.svg" }, social: { github, discord }, diff --git a/doc/src/content/docs/de/i18n/explanation/style.md b/doc/src/content/docs/de/i18n/explanation/style.md new file mode 100644 index 000000000000..7349ee2084de --- /dev/null +++ b/doc/src/content/docs/de/i18n/explanation/style.md @@ -0,0 +1,127 @@ +--- +title: German Style Guide +--- + +Diese Datei enthält Anmerkungen für alle, die das Spiel ins Deutsche übersetzen wollen. + +--- + +## Sprache + +Deutsch wie in Deutschland üblich (de_DE). Wir verwenden die neue deutsche Rechtschreibung. + +## Zusammenfassung + +- Anführungszeichen: »Beispieltext« +- Innere Anführungszeichen: ›Beispieltext‹ +- Anrede: Grundsätzlich mit »du«, mit Ausnahmen (s.u.) +- Strings wie »the %s« oder »a %s« werden besonders übersetzt (s.u.) + +## Anrede + +Grundsätzlich duzen sich alle. Auch der Spieler wird geduzt. + +Die Idee ist, dass nach der Apokalypse das »Sie« einfach aus der Mode kommt. Sind ja nicht mehr +viele übrig. ;-) + +Die förmliche Anrede mit »Sie« wird nur in seltenen Ausnahmefällen benutzt. Diese Ausnahmefälle +sind: + +- Alte Dokumente aus der Zeit vor der Apokalypse, wo die förmliche Anrede Sinn ergibt, z.B. alte + Behördenprotokolle +- Computer, Terminals und die meisten anderen Bedienelemente +- Wenn es sinnvoll erscheint, auch bestimmte NPC-Dialoge, aber das dann bitte unbedingt im Spiel + testen! + +Auf keinen Fall darf völlig grundlos zwischen »du« und »Sie« hin- und hergesprungen werden. + +## Blöde Sonderregel für Artikel + +Es kommen sehr viele Strings vor, bei dem ein Artikel gefolgt von einem Platzhalter auftaucht. Das +ist problematisch für uns, da deutsche Substantive ein Geschlecht haben. + +Zusammenfassung ############### + +Steht ein Artikel vor einem Platzhalter, wird er wie folgt übersetzt (naja): + +- »the %s« → »%s« +- »a %s« → »1 %s« + +Beispiele: + +- »You hit the %s!« → »Du triffst %s!« +- »You see a %s.« → »Du siehst 1 %s.« + +Ausnahmen sind natürlich erlaubt. + +Bestimmter Artikel »the« ######################## + +Beispiel: »You hit the %s!«. + +Problematische Übersetzung: + +- »Du triffst das %s!«. + +So einfach ist das leider nicht, denn wir wissen ja nicht, welches Geschlecht das Wort für %s hat. + +Das funktioniert, wenn %s für »Monster« steht (»das Monster«). Aber wenn %s zu »Spinne« wird, dann +kriegen wir »das Spinne«. Das ist blöd. :-( + +Wir haben uns daher angewöhnt, den Artikel einfach ganz wegzulassen. Also als ob %s ein Name wäre. + +Also: + +- »Du triffst %s!« + +Das ist zwar immer noch nicht schön, aber besser als »das Spinne«. + +Alternativ hat sich auch der Doppelpunkt bewährt. Also: + +- »Du triffst: %s« + +Bei kurzen Strings kann das sinnvoll sein, bei langen Strings eher nicht. + +Unbestimmter Artikel »a«/»an« ############################# + +Beispiel: »On the ground you see a %s.« + +Problematische Übersetzung: »Auf dem Boden siehst du ein %s.« + +Wenn wieder die Spinne kommt, haben wir »ein Spinne«. Das ist doof. :-( + +Notlösung: Wir ersetzen einfach den unbestimmten Artikel mit »1«. Also: + +- »Auf dem Boden siehst du 1 %s.« + +Zugegeben, etwas gefudelt ist das schon. Aber es funktioniert! Irgendwie. :D + +Auch hier wäre der Ansatz mit dem Doppelpunkt denkbar, aber nur, wenn es sein muss. + +Anmerkung ######### + +Beachte: All diese Ansätze sind nur Notlösungen! + +Eine echte Lösung des Problems kann es eigentlich nur geben, wenn die Art, wie C:DDA diese Strings +aufbaut, grundsätzlich ändert. :-( + +## Problemwort: »bionics« + +C:DDA verwendet »bionic« als Wort für eine Art Implantat, nicht für ein Konzept wie in Wikipedia +beschrieben (s.u.). + +So übersetzen wir es: + +- »the bionic« → »das Bionik« +- »the bionics« → »die Bioniken« + +»bionic« wird auch manchmal als Adjektiv eingesetzt: + +- »bionic« → »bionics« + +Aus der englischsprachigen Wikipedia: Bionics (also known as biomimicry, biomimetics, +bio-inspiration, biognosis, and close to bionical creativity engineering) is the application of +biological methods and systems found in nature to the study and design of engineering systems and +modern technology + +Aus der deutschsprachigen Wikipedia: Die Bionik (auch Biomimikry, Biomimetik oder Biomimese) +beschäftigt sich mit dem Übertragen von Phänomenen der Natur auf die Technik. diff --git a/doc/src/content/docs/en/i18n/explanation/file_format.md b/doc/src/content/docs/en/i18n/explanation/file_format.md new file mode 100644 index 000000000000..4f337b9696e5 --- /dev/null +++ b/doc/src/content/docs/en/i18n/explanation/file_format.md @@ -0,0 +1,188 @@ +--- +title: Translation file format (.po) +--- + +Translations are stored in [`".po"` files (Portable Object)][po], named with a language code +specific to each language and country. So for example the translations for the Spanish spoken in +Spain would be found in `es_ES.po` and for Spanish spoken in Mexico would be found in `es_MX.po`. + +[po]: https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html + +It is a plain-text filetype, so you can edit it however you choose, but translators often prefer to +use purpose-built translation editors (such as [Poedit](https://poedit.net)), or web-based +translation tools (such as ). + +The format of `".po"` files is a list of entries, with the english phrase to be translated, followed +by the local translation. The english phrase is on the line or lines beginning with `msgid`, and the +translated phrase goes on the line or lines beginning with `msgstr`. + +Before the `msgid` line there will be a comment line indicating where in the source code the word or +phrase came from. This can often help when the meaning of the english is not obvious. There may also +be comments left by the developers to make translation easier. + +Most entries will look something like this: + +``` +#: action.cpp:421 +msgid "Construct Terrain" +msgstr "niarreT tcurtsnoC" +``` + +The english phrase here is "Construct Terrain", and it comes from line 421 of the file "action.cpp". +The example translation is just a reversal of the english letters. With this, in stead of "Construct +Terrain", the game will display "niarreT tcurtsnoC". + +Another exmple is: + +``` +#: action.cpp:425 defense.cpp:635 defense.cpp:701 npcmove.cpp:2049 +msgid "Sleep" +msgstr "pleeS" +``` + +This is similar to the last example, except it is a more common phrase. It is used in the files +action.cpp, defense.cpp (twice) and npcmove.cpp. The translation will replace every usage. + +## File Header + +The header at the top of the `".po"` file is the only part that differs from the +comment/msgid/msgstr format. + +If you are working on an already established translation you will not have to modify it. + +For a new translation, it should be mostly set up for you, either by the editor you are using or by +the `msginit` program which is the recommended way of initializing a translation (see +TRANSLATING.md). + +If you are starting from another translation file however, you might need to change a few things. +Just fill it in as best you are able. + +The header will look something like: + +``` +# French translations for Cataclysm-DDA package. +# Copyright (C) 2013 CleverRaven and Cataclysm-DDA contributors. +# This file is distributed under the same license as the Cataclysm-DDA package. +# Administrator , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: 0.7-git\n" +"Report-Msgid-Bugs-To: http://github.com/CleverRaven/Cataclysm-DDA\n" +"POT-Creation-Date: 2013-08-01 13:44+0800\n" +"PO-Revision-Date: 2013-08-01 14:02+0800\n" +"Last-Translator: YOUR NAME \n" +"Language-Team: French\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +``` + +If you are starting a new translation, or you are in charge of the existing translation, it is +helpful if you include your name and e-mail address so that you can be contacted with any questions +or issues regarding the translation. + +The only important part that cannot be easily filled out manually is the `Plural-Forms` section. It +determines how different numbers of things are handled in your language. More on that later. + +## Format strings and newlines + +Some strings will have special terms such as `%s`, `%2$d` and `\n`. + +`\n` represents a linebreak. Mostly these are unnecessary as the code wraps lines where it can, but +sometimes these are used for placing things on different lines. Just use `\n` in your translation +wherever a new line should go. + +`%s` and other similar terms are replaced with something else when the game is running. You might +need to move them around, depending on the translation. It is important that every term beginning +with `%` is kept in the translation. + +Here is an example which replaces a `%d` with a number: + +``` +#: addiction.cpp:224 +#, c-format +msgid "" +"Strength - %d; Perception - 1; Dexterity - 1;\n" +"Depression and physical pain to some degree. Frequent cravings. Vomiting." +msgstr "" +";1 - ytiretxeD ;1 - noitpecreP ;%d - htgnertS\n" +".gnitimoV .sgnivarc tneuqerF .eerged emos ot niap lacisyhp dna noisserpeD" +``` + +Here it is important that the `%d` was not reversed, and that the `\n` remained at the end of the +line. In this case, `%d` will be replaced with the character's strength modifier when the message is +displayed. + +In some cases it might be necessary to change the order of terms. This can confuse the game. If the +order of the `%` terms changes, you must add numbers to all of them, so that the game knows which +was which. Some strings will already have these numbers, but some might not. + +As an example, if there is a string with `%s shoots %s!`, it might change in translation. Perhaps it +will become something like `%s is shot by %s!`. But now it is the wrong way around, the shooter has +swapped with the shootee. + +In this case, each `%s` should be numbered with a digit (1-9) then a dollar sign ($) between the `%` +and the `s`. For example `%1$s shoots %2$s!` would be equivalent to `%s shoots %s!`. So the example +translation above could be `%2$s is shot by %1$s!`, and this would work correctly. + +The game can figure out these `%1$s` `%2$s` parameters automatically, but you must make sure that +(A): all of the `%` terms in the translation are numbered; and (B): the numbers are correct in terms +of the original ordering in the english text. + +For example: + +``` +#: map.cpp:680 +#, c-format +msgid "%s loses control of the %s." +msgstr "%2$s eht fo lortnoc sesol %1$s" +``` + +would be displayed in-game as `kcurt eht fo lortnoc sesol liagibA`, assuming `Abigail` was driving a +`truck`. + +## Special tags in strings + +Some strings in the translation may have special tags in front of or inside them. These tags should +be left as-is, and only the rest of the string translated. + +For example, the NPC and city names from "data/raw/names.json" are prefixed with `` so as to +avoid conflicts with words (such as `Wood` the material, and `Wood` the last name). For these, the +`` part should be left in. + +For example: + +``` +#. ~ proper name; gender=female; usage=given +#: lang/json/json_names.py:6 +msgid "Abigail" +msgstr "liagibA" +``` + +Names also have a comment above them, indicating what the name is used for in-game. In this case, +`Abigail` is a possible first name for a female NPC. + +## Plural forms + +Many languages use different terms for things depending on how many of them there are. These are +supported using plural forms, defined by the `Plural-Form` line in the `".po"` file header. + +For these, there will be multiple `msgstr` lines, intended for the different forms depending on +number. The game will automatically choose the correct form depending on the number of things. + +For example: + +``` +#: melee.cpp:913 +#, c-format +msgid "%d enemy hit!" +msgid_plural "%d enemies hit!" +msgstr[0] "!tih ymene %d" +msgstr[1] "!tih seimene %d" +``` + +Here the first entry is for when there is only one `enemy`, the second is for when there are more +than one `enemies`. The rules differ wildly between languages. diff --git a/doc/src/content/docs/en/i18n/explanation/style.md b/doc/src/content/docs/en/i18n/explanation/style.md new file mode 100644 index 000000000000..82366da9e211 --- /dev/null +++ b/doc/src/content/docs/en/i18n/explanation/style.md @@ -0,0 +1,46 @@ +--- +title: Language Specific Style Guide +--- + +:::note{title="This section is a template."} + +As this page is for language-specific notes, it shouldn't be translated. Instead, it's used as a +template. [Check here for examples.](#writing-style-guide-for-your-language) + +::: + +## How to write one for your language + +1. [Find your language code.](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) +2. Create `doc/src/content/docs/{your-language-code}/i18n/explanation/style.md`. +3. If it doesn't, add your language to `doc/astro.config.ts` file, for example: + +```diff +diff --git a/doc/astro.config.ts b/doc/astro.config.ts +index da91c2e0014..3dafa248a06 100644 +--- a/doc/astro.config.ts ++++ b/doc/astro.config.ts +@@ -41,6 +41,7 @@ export default defineConfig({ + locales: { + en: { label: "English" }, + ko: { label: "한국어", lang: "ko-KR" }, ++ ru: { label: "Русский", lang: "ru-RU" }, + }, + logo: { src: "./src/assets/icon-round.svg" }, + social: { github, discord }, +``` + +In this example, it will allow russian language to be availble in language selector. Check +[starlight](https://starlight.astro.build/guides/i18n/) for details. + +## Writing style guide for your language + +There's no restrictions on how or what to write in this file. For example, you could: + +- write language specific notes for other translaotrs to read +- link to external resources or tools + +You could check out existing style guides for reference: + +- [Deutsch](../../../de/i18n/explanation/style.md) +- [Russian](../../../ru/i18n/explanation/style.md) diff --git a/doc/src/content/docs/en/i18n/explanation/manual_of_style.md b/doc/src/content/docs/en/i18n/explanation/style_all.md similarity index 90% rename from doc/src/content/docs/en/i18n/explanation/manual_of_style.md rename to doc/src/content/docs/en/i18n/explanation/style_all.md index 8df7b5848670..02624878f10f 100644 --- a/doc/src/content/docs/en/i18n/explanation/manual_of_style.md +++ b/doc/src/content/docs/en/i18n/explanation/style_all.md @@ -1,8 +1,8 @@ --- -title: translation style guide +title: General Style Guide --- -Follow these conventions when adding or editing in-game text: +Please follow these conventions when adding or editing in-game text: 1. Use US English spelling. 2. Use double sentence spacing after periods. This means that a period that ends a sentence should diff --git a/doc/src/content/docs/en/i18n/reference/edge_cases.md b/doc/src/content/docs/en/i18n/reference/edge_cases.md index fe6338e8627b..73cb8ba76b07 100644 --- a/doc/src/content/docs/en/i18n/reference/edge_cases.md +++ b/doc/src/content/docs/en/i18n/reference/edge_cases.md @@ -2,17 +2,26 @@ title: Edge cases --- -There are issues specific to Cataclysm: BN which translators should be aware of. These include the -use of terms like `%s` and `%3$d` (leave them as they are), and the use of tags like ``, which -shouldn't be translated. +There are issues specific to Cataclysm: BN which translators should be aware of. For example: -Information about these and any other issues specific to individual languages, can be found in -Cataclysm: BN's [language notes folder][notes]. +## Special Symbols -[notes]: https://github.com/cataclysmbnteam/Cataclysm-BN/tree/upload/lang/notes +Some translation texts will have special symbols or formatting, such as -General notes for all translators are in `README_all_translators.txt`, and notes specific to a -language may be stored as `.txt`, for example `de.txt` for German. +- [`%s` and `%3$d` (should be leave them as they are)](../explanation/file_format.md#format-strings-and-newlines) +- [`` (shouldn't be translated)](../explanation/file_format.md#special-tags-in-strings) -Cataclysm: BN has more than 14000 translatable strings, but don't be discouraged. The more -translators there are, the easier it becomes 😄. +To learn more, please read the [file format explanation](../explanation/file_format.md). + +## Language Specific Guidelines + +Check the following files for specific guidelines: + +- [General notes for all translators (mostly english)](../explanation/style_all.md) +- [Notes specific to a language](../explanation/style.md) + +Cataclysm: BN has more than 46,000 translatable strings (last updated at 2023-09-22 [^1]), but don't +be discouraged. The more translators there are, the easier it becomes! + +[^1]: Transifex API does not expose a public endpoint (at least without bearer token), so we were +unable to update the number automatically.) diff --git a/doc/src/content/docs/en/mod/json/guides/map/lab.md b/doc/src/content/docs/en/mod/json/guides/map/lab.md new file mode 100644 index 000000000000..4272480de71f --- /dev/null +++ b/doc/src/content/docs/en/mod/json/guides/map/lab.md @@ -0,0 +1,163 @@ +--- +title: Writing Lab JSON +--- + +Labs are heavily randomized but have very few actual overmap terrain tiles, meaning that variety in +the maps gets almost entirely using JSON. In particular, labs use place_nested extensively to +randomly select submaps, such as new lab rooms. + +## Quick Guide for new lab areas: + +In lab_floorplans.json add a new mapgen json with om_terrain of lab_4side. + +Keep the middle 2 spaces of each border clear, because that's where doors open out to. Some or all +of the border spaces will be turned into 1-width walls between lab sections, so make sure the map +'works' whether or not the outermost spaces are created or not (by keeping them clear, or having +'disposable' furniture like counters, lockers, broken consoles, etc). Allow rotation. + +To add a lab finale instead, use the om_terrain of lab_finale_1level and put your JSON in +lab_floorplans_finale1level.json instead. + +## Quick Guide for new lab dead-ends: + +In lab_floorplans_1side.json add a new mapgen json with om_terrain of lab_1side. + +Make the area facing north, keeping the 2 middle spaces of the northern border clear because that's +where doors open out to. If you want to have a locked area, set the floor to 't_strconc_floor' and +stairs won't appear there (this floor is ',' in the lab_palette). Use place_nested to place +'lab_1side_border_doors' at coords `[0, 0]`. Do not allow rotation. + +## Quick Guide for new lab rooms: + +In lab_rooms.json add a new mapgen json with a nested_mapgen_id of lab_room_7x7 or lab_room_9x9 with +a mapgensize of `[7, 7]` or `[9, 9]`. + +In some rare cases the first row or column of terrain may be replaced with a border wall, so prefer +layouts that look intact even if that occurs. + +If your layout needs to know where the doors of the room will open up into, instead use a +nested_mapgen_id of lab_room_7x7_crossdoors and lab_room_9x9_crossdoors which will ensure that doors +only appear in the exact middle of a wall. + +# Lab JSON Full Guide + +## How area mapgen json works + +A lab is mostly made out of overmap tiles of type 'lab', 'lab_stairs', and typically one +'lab_finale'. + +Lab terrain needs special treatment: stairs, border walls, dead-ends, and more, so JSON instead uses +three 'fake' overmap tile types. Create a JSON mapgen object with om_terrain set to one of these, +and the code will convert it and place it correctly on the map. + +- lab_1side - placed when exactly one lab is adjacent, maps should assume a north-facing entrance. + Do not allow rotation. +- lab_finale_1level - placed at the bottom of a lab on terrain types. Rotation optional. +- lab_4side - all the other maps. Rotation optional. + +## Border walls + +Labs have unusual borders: 1-width walls between lab areas, laid out on the south and east side of +those tiles, potentially with metal doors in the middle of them, like so: + +``` +" |", +" |", +" |", +" |", +" |", +" |", +" |", +" |", +" |", +" |", +" |", +" M", +" M", +" |", +" |", +" |", +" |", +" |", +" |", +" |", +" |", +" |", +" |", +"-----------MM----------|" +``` + +If a north or west neighbor isn't a lab, the entire side gets needs to be overwritten with a wall, +replacing whatever was normally there. If the east or south neighbor isn't a lab, that door needs to +be overwritten with a wall. + +Some JSON maps can start from the above layout, disable rotation, and call place_nested with the +'lab_border_walls' chunk in JSON. In this case, borders will be perfect and no additional code will +fire. + +But if borders have not been managed (determined by checking for the presence of an east-facing +door/wall), then the code will create the lab border walls and doors on all four directions. + +'lab_border_walls' does not work on rotated maps, so rotated maps need to rely on hardcoded border +wall generation. This is preferable because it creates more variety. So if a map layout is amenable +to not knowing if the final 1x1 border around it will be placed or not, it is preferable to allow +rotation and not place 'lab_border_walls'. + +One middle-ground: If just part of the map needs to cares about where the border wall is to look +correct, put a wall on the east-side of the map and only allow rotation of `[0, 1]`. That will +ensure the wall gets placed on the east or south side of the map in the final rotation. See the +"electricity room" floorplan for an example of this. + +## Other hardcoded map generation + +Labs will have a small chance of randomly getting lights, the central & tower labs will always get +them. Stairs will be placed on any empty thconc_floor space if the overmap indicated stairs. There's +also a 10% chance of special effects like flooding, portals, radiation accidents, etc. Ant-infested +labs will get bashed in. + +None of these require json changes to enact, but JSON-ideas for lab special effects in rooms can be +added to the spawn tables in lab_maybe_effects_7x7 and lab_maybe_effects_9x9. Currently this just +adds spider-infestations. + +## Room generation + +The most common source of randomness _within_ a map is to create a 7x7 or 9x9 room and give it +random contents by using place_nested. Don't place rooms directly, instead we use an intermediate +map chunk called a 'spawn' which encodes more information and randomizes between all the kinds of +rooms that would satisify those requirements. + +- lab_spawn_7x7 - a 7x7 room with no guarantees on where the doors are. +- lab_spawn_7x7_crossdoors - a 7x7 room with doors only in the middle of each border wall. +- lab_spawn_9x9 - a 9x9 room with no guarantees on where the doors are. +- lab_spawn_9x9_crossdoors - a 9x9 room with doors only in the middle of each borders wall. + +Selecting a spawn will randomize between: `lab_room_[size]` plus the _rare variants, and the +_crossdoors variants if applicable. + +If your room is also amenable to having two of its walls redefined, you can also use these spawns to +add in more randomized rooms that might modify the walls by adding windows, replacing walls with +chainlink, or creating multiple doors and interior walls. These templates assume that there are no +doors on the two walls which are not part of this submap. Note these submaps are sized 8x8 and 10x10 +because they include the walls to be modified. + +- lab_spawn_7x7_wall_nw +- lab_spawn_7x7_wall_sw +- lab_spawn_9x9_wall_nw +- lab_spawn_9x9_wall_sw + +Use the most specific spawn possible. + +## Directory + +- lab_central.json - hardcoded maps for the top of central lab. +- lab_common.json - terrain palette, loot palettes, common json objects. +- lab_escape.json - maps specifically for lab challenge escape, these are special placed on lvl 4 of + a lab. +- lab_floorplan_cross.json - cross floorplans are unusual for having rock infill when bordering the + edge of the lab, with rare vaults. +- lab_floorplans.json - the main source of lab layouts. +- lab_floorplans_1side.json - dead-end floor plans. +- lab_floorplans_finale1level.json - finale floorplans. +- lab_rooms.json - randomized rooms. +- lab_rooms_wall.json - randomized rooms which rewrite the wall borders. +- lab_trains.json - tiles for the lab science train which rarely happens on levels 2 & 4. diff --git a/doc/src/content/docs/en/mod/json/guides/mapgen.md b/doc/src/content/docs/en/mod/json/guides/map/mapgen.md similarity index 97% rename from doc/src/content/docs/en/mod/json/guides/mapgen.md rename to doc/src/content/docs/en/mod/json/guides/map/mapgen.md index 446bb9354dbf..f61d4d8d84c6 100644 --- a/doc/src/content/docs/en/mod/json/guides/mapgen.md +++ b/doc/src/content/docs/en/mod/json/guides/map/mapgen.md @@ -5,18 +5,18 @@ title: Guide for basic mapgen This guide will cover the basics of mapgen, which files you need to edit, the tags in each file and the differences in creating specials or regular city buildings. -[For full technical information about mapgen entries, visit here](../reference/map/mapgen) +[For full technical information about mapgen entries, visit here](../../reference/map/mapgen) First, lets cover some basic concepts and the files you'll add or edit. -#### General comments: +## General comments: CDDA mapgen is surprisingly powerful once you get used to working with it. You can use lots of tricks to add variability and interest to your maps. Most advanced mapgen techniques will go into a different tutorial. This one covers basic concepts and how to create a basic single OMT (overmap terrain tile)sized building. We will touch on palette usage and how to add a roof as well. -#### Specials vs. city buildings: +## Specials vs. city buildings: A special is a building that spawns outside the city and requires additional information to spawn, like its distance from cities and valid OMT terrain types. They also used to be the only multi-tile @@ -31,7 +31,7 @@ Important policy: since the roof project, all buildings are now multi-tile acros buildings should always get a JSON roof added. Soon, all basements will also be custom fit to the ground floor mapgen, so it is good practice to include dedicated downstairs if you want a basement. -#### The Files & their purpose: +## The Files & their purpose: 1. You will add a new mapgen file in: [data/json/mapgen](https://github.com/cataclysmbnteam/Cataclysm-BN/tree/upload/data/json/mapgen) @@ -64,7 +64,7 @@ ground floor mapgen, so it is good practice to include dedicated downstairs if y - Please avoid editing existing mapgen palettes because you may affect existing maps using a combination of the palette and the mapgen file. -#### Starting the mapgen entry: +## Starting the mapgen entry: When I start a new map project, I generally will add in all the entries I need for it to spawn in game from the outset. This way I can test it as I work on it and adjust it as needed. So, I @@ -83,15 +83,15 @@ Before beginning you’ll want to make some decisions: - Will I be using the mapgen object data in combination with a palette (see the mall 2nd floor if you want a master class in combined usage of both types)? -#### The mapgen map: +## The mapgen map: This covers the mapgen file map flags and what they do in layman’s terms. You can get more extensive -information from [MAPGEN](../reference/map/mapgen). +information from [MAPGEN](../../reference/map/mapgen). the mapgen file has some meta data tags and the `"object"` data which defines everything to make the map. -##### The metadata: +### The metadata: Sample: @@ -116,7 +116,7 @@ Sample: determine how often each spawns in relation to the other. Say the furnished house is at 100, and the abandoned one is at 20. So, it'll spawn 5x less than the furnished house. -##### The object data: +### The object data: This is the section of tags that defines your map, its terrains, furniture, and various spawn types. There are several ways to place items (and nested maps). These deserve their own tutorial. For this @@ -289,7 +289,7 @@ can put any item_group into the machines, like those bullet ones_. 6. Item spawns: There are many ways to place items. This tutorial will only cover explicit symbol placement which is the easiest. There is documentation all about loot spawns you can read for - further information. See: [ITEM_SPAWN.md](../reference/items/ITEM_SPAWN). + further information. See: [ITEM_SPAWN.md](../../reference/items/ITEM_SPAWN). our sample uses "items": for its tag. others include: "place_item", "place_items", "place_loot". Some of these allow for individual item placement and others groups, or both. This will be covered @@ -434,7 +434,7 @@ finally for flowers (which are furniture): "p": "f_region_flower" ``` -#### Adding the roof! +## Adding the roof! Almost all CDDA buildings are now roof-capable and we'd love to keep it that way. Make sure to submit a roof map with your building. This can go into the same file as your ground floor and any @@ -494,9 +494,9 @@ sample roof: "t_shingle_flat_roof" in this mapgen which will override the palettes entry for `".": "t_flat_roof"`. (more on this in advanced mapgen). -I have a separate roof document at: [JSON_ROOF_MAPGEN](./JSON_ROOF_MAPGEN). +I have a separate roof document at: [JSON_ROOF_MAPGEN](../JSON_ROOF_MAPGEN). -#### Linking various mapgen maps using multitile_city_buildings.json +## Linking various mapgen maps using multitile_city_buildings.json This file is found at: [data/json/overmap/multitile_city_buildings.json](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/overmap/multitile_city_buildings.json). @@ -535,7 +535,7 @@ A standard entry: is the generic basement mapgen group and thus doesn't get `_north` (this will change as we add dedicated stairs to our houses). -#### Setting overmap spawns using regional_map_settings.json +## Setting overmap spawns using regional_map_settings.json [data/json/regional_map_settings.json](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/regional_map_settings.json) @@ -545,7 +545,7 @@ A standard entry: complain which is why the are often the same name. 4. Choose a good weight for your building. -#### Linking and spawning specials: +## Linking and spawning specials: Put the entry in: [data/json/overmap/overmap_special/specials.json](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/json/overmap/overmap_special/specials.json). @@ -596,11 +596,11 @@ Example: percentage so `[ 1, 10 ]` wouldn't be 1 to 10 times per overmap but a 1 in 10% chance to spawn on the overmap. So 10% chance to spawn once per overmap. 8. `"flags"`: These are flags you can use to further define the special. For a list of flags see: - [JSON_FLAGS](../reference/JSON_FLAGS). + [JSON_FLAGS](../../reference/JSON_FLAGS). -Read: [OVERMAP](../reference/map/OVERMAP) for more details. +Read: [OVERMAP](../../reference/map/OVERMAP) for more details. -#### Overmap_terrain entries: +## Overmap_terrain entries: Choose a file for your building type at: [data/json/overmap/overmap_terrain](https://github.com/cataclysmbnteam/Cataclysm-BN/tree/upload/data/json/overmap/overmap_terrain). @@ -644,9 +644,9 @@ You need one entry per mapgen ID: appropriate for your location. Others further define the mapgen, like having sidewalks generate. For further information see: -[Overmap Terrain section of OVERMAP](../reference/map/OVERMAP#overmap-terrain). +[Overmap Terrain section of OVERMAP](../../reference/map/OVERMAP#overmap-terrain). -#### Palettes: +## Palettes: As mentioned earlier, palettes can hold almost all the information that the object entry contains, except for `rows` and `fill_ter`. Their main purpose is to reduce the need to add the same basic @@ -738,7 +738,7 @@ are designed to work together for houses using nested mapgen. There is a palette foundation, another for the nests, and finally another one I've designed for domestic outdoor nested chunks. -#### Final comments: +## Final comments: The information here should be enough for you got get around mapgen and start making maps but there are a lot of variations that will be covered in focused. diff --git a/doc/src/content/docs/ru/i18n/explanation/style.md b/doc/src/content/docs/ru/i18n/explanation/style.md new file mode 100644 index 000000000000..1daac27f4a59 --- /dev/null +++ b/doc/src/content/docs/ru/i18n/explanation/style.md @@ -0,0 +1,87 @@ +--- +title: Russian Style Guide +--- + +This file contains notes/discussion regarding translation for Russian, written in Russian. + +--- + +## Специфика: + +Старайтесь избавляться от англицизмов. Например, "Вы вытащили руки из своих карманов" следует +заменить на "Вы вытащили руки из карманов". + +После перевода перечитайте свой текст. Если по-русски он звучит странно, это повод его несколько +подредактировать с сохранением изначального смысла. + +Замена слов на уменьшительно-ласкательные приветствуется, если они подходят по смыслу. Замена слов +на русский сленг или придание словам большей экспрессии тоже приветствуется, если это соответствует +контексту. Импровизация в рамках контекста и смысла допустима, если конечный текст выглядит лучше, +чем дословный перевод. + +После многоточия, по правилам русского языка, следующее предложение начинается с большой буквы. + +Прямую речь следует писать по русским правилам, если она встречается в переводе. + +Иногда перед началом или в конце фразы стоят пробелы. Их очень плохо видно в редакторе Transifex, +имейте это в виду. Особенно часто это бывает, если фраза не окончена или по смыслу имеет +продолжение. Чтобы лучше видеть такие пробелы, можно зайти в настройки редактора и включить пункт +"Показать пробелы". + +Также не стоит забывать про букву Ё. + +## Формы множественного числа + +В редакторе Transifex некоторые названия предметов требуется переводить для всех форм единственного +и множественного числа. В игре, в зависимости от того, сколько у вас предметов, будет отображаться +название предмета в нужной форме. + +1 — единственное число (например: яблоко) Несколько — нужно подобрать окончание так, чтобы оно +соответствовало кол-ву 2-4 предмета (например: яблока) Много — нужно подобрать окончание так, чтобы +оно соответствовало кол-ву 5-бесконечность предметов (например: яблок) Другое — простая форма +множественного числа (например: яблоки) + +В разделе "Несколько", при переводе прилагательных женского рода следует отдавать предпочтение +варианту: две "стиральные машины", а не две "стиральных машины". + +Что касается книг и журналов. Слово копия и выпуск можно опустить. Как правило, если книги/журналы +имеют множественное число, стоит переводить так: 1: книга «Война миров» Несколько (например, две): +книги «Война миров» Много (например, сто): книг «Война миров» Другое: книги «Война миров» + +1: журнал «Плейбой» Несколько (например, два): журнала «Плейбой» Много (например, сто): журналов +«Плейбой» Другое: журналы «Плейбой» + +Иногда встречаются такие слова, которые не стоит писать в единственном или во множественном числе, +например, "фисташки", "арахис" и т.д. Их надо оставлять в той форме, которая больше подходит по +смыслу. + +## Спецсимволы: + +Спецсимволы печатаются комбинацией клавиш. Для различных операционных систем эти комбинации разные. +Для ОС Windows спецсимволы набираются на цифровой клавиатуре с помощью зажатой клавиши alt. Для ОС +Linux существуют комбинации с кнопкой Compose. Для Mac ОС применяется комбинации с клавишей Option. +Некоторые символы имеют свою специфику в русском языке, отличную от английского. Нужно использовать +русскую интерпретацию, если это возможно. + +Стоит различать тире и дефис. Дефис ставится внутри слова, короткий, без пробелов (например: что-то, +чёрно-белый и т.п.). Тире — пунктуационный знак, ставится между словами, длиннее, отделяется +пробелами с обеих сторон. Дефис: - (минус) Тире: — WIN:(alt + 0151) LIN:(Сompose + - + --) +MAC:(Option + Shift + -) + +Кавычки следует использовать ёлочки. Открывающая кавычка: « WIN:(alt + 0171) LIN:(Сompose + < + <) +MAC:(Option + \) Закрывающая кавычка: » WIN:(alt + 0187) LIN:(Сompose + > + >) MAC:(Option + Shift + +\) + +Иногда, в тексте оригинала встречаются спецсимволы "%s", "%2$d", "\n", а также цветовые теги с +цифрами 1 и 2. Оставляете их как есть, подставляя по смыслу в нужное место. Стоит ставить пробелы +перед и после спецсимволов, если они есть в оригинале. \n — перенос строки (эквивалентно клавише +enter в текстовом редакторе) %2$d или %d — вместо этих символов в игре будет отображаться числовое +значение %2$s или %s — вместо этих символов в игре будет отображаться какая-либо другая строка + +Поскольку шрифт в игре моноширинный, а у некоторых еще и квадратный, стоит соблюдать следующую +специфику. Не стоит использовать три точки вместо многоточия, в игре это очень плохо выглядит. Есть +свой спецсимвол. Многоточие: … WIN:(alt + 0133) LIN:(Сompose + . + .) MAC:(Option + ;) + +Также, в английском языке для текста игры принято правило разделять предложения двумя пробелами. В +русском языке такого правила нет, поэтому после точки в конце предложения должен оставаться один +пробел. diff --git a/lang/notes/README_all_translators.md b/lang/notes/README_all_translators.md deleted file mode 100644 index 9f6676e81eff..000000000000 --- a/lang/notes/README_all_translators.md +++ /dev/null @@ -1,142 +0,0 @@ -# Instructions for Cataclysm-DDA translators - -* [Translation file format](#translation-file-format) -* [Translation file header](#translation-file-header) -* [Format strings and newlines](#format-strings-and-newlines) -* [Special tags in strings](#special-tags-in-strings) -* [Plural forms](#plural-forms) - -## Translation file format - -Translations are stored in ".po" files, named with a language code specific to each language and country. So for example the translations for the Spanish spoken in Spain would be found in "es_ES.po" and for Spanish spoken in Mexico would be found in "es_MX.po". - -It is a plain-text filetype, so you can edit it however you choose, but translators often prefer to use purpose-built translation editors (such as Poedit from poedit.net), or web-based translation tools (such as translations.launchpad.net). - -The format of ".po" files is a list of entries, with the english phrase to be translated, followed by the local translation. The english phrase is on the line or lines beginning with `msgid`, and the translated phrase goes on the line or lines beginning with `msgstr`. - -Before the `msgid` line there will be a comment line indicating where in the source code the word or phrase came from. This can often help when the meaning of the english is not obvious. There may also be comments left by the developers to make translation easier. - -Most entries will look something like this: - - #: action.cpp:421 - msgid "Construct Terrain" - msgstr "niarreT tcurtsnoC" - -The english phrase here is "Construct Terrain", and it comes from line 421 of the file "action.cpp". The example translation is just a reversal of the english letters. With this, in stead of "Construct Terrain", the game will display "niarreT tcurtsnoC". - -Another exmple is: - - #: action.cpp:425 defense.cpp:635 defense.cpp:701 npcmove.cpp:2049 - msgid "Sleep" - msgstr "pleeS" - -This is similar to the last example, except it is a more common phrase. It is used in the files action.cpp, defense.cpp (twice) and npcmove.cpp. The translation will replace every usage. - - -## Translation file header - -The header at the top of the ".po" file is the only part that differs from the comment/msgid/msgstr format. - -If you are working on an already established translation you will not have to modify it. - -For a new translation, it should be mostly set up for you, either by the editor you are using or by the `msginit` program which is the recommended way of initializing a translation (see TRANSLATING.md). - -If you are starting from another translation file however, you might need to change a few things. Just fill it in as best you are able. - -The header will look something like: - - # French translations for Cataclysm-DDA package. - # Copyright (C) 2013 CleverRaven and Cataclysm-DDA contributors. - # This file is distributed under the same license as the Cataclysm-DDA package. - # Administrator , 2013. - # - msgid "" - msgstr "" - "Project-Id-Version: 0.7-git\n" - "Report-Msgid-Bugs-To: http://github.com/CleverRaven/Cataclysm-DDA\n" - "POT-Creation-Date: 2013-08-01 13:44+0800\n" - "PO-Revision-Date: 2013-08-01 14:02+0800\n" - "Last-Translator: YOUR NAME \n" - "Language-Team: French\n" - "Language: fr\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" - "Plural-Forms: nplurals=2; plural=(n > 1);\n" - -If you are starting a new translation, or you are in charge of the existing translation, it is helpful if you include your name and e-mail address so that you can be contacted with any questions or issues regarding the translation. - -The only important part that cannot be easily filled out manually is the `Plural-Forms` section. It determines how different numbers of things are handled in your language. More on that later. - - -## Format strings and newlines - -Some strings will have special terms such as `%s`, `%2$d` and `\n`. - -`\n` represents a linebreak. Mostly these are unnecessary as the code wraps lines where it can, but sometimes these are used for placing things on different lines. Just use `\n` in your translation wherever a new line should go. - -`%s` and other similar terms are replaced with something else when the game is running. You might need to move them around, depending on the translation. It is important that every term beginning with `%` is kept in the translation. - -Here is an example which replaces a `%d` with a number: - - #: addiction.cpp:224 - #, c-format - msgid "" - "Strength - %d; Perception - 1; Dexterity - 1;\n" - "Depression and physical pain to some degree. Frequent cravings. Vomiting." - msgstr "" - ";1 - ytiretxeD ;1 - noitpecreP ;%d - htgnertS\n" - ".gnitimoV .sgnivarc tneuqerF .eerged emos ot niap lacisyhp dna noisserpeD" - -Here it is important that the `%d` was not reversed, and that the `\n` remained at the end of the line. In this case, `%d` will be replaced with the character's strength modifier when the message is displayed. - -In some cases it might be necessary to change the order of terms. This can confuse the game. If the order of the `%` terms changes, you must add numbers to all of them, so that the game knows which was which. Some strings will already have these numbers, but some might not. - -As an example, if there is a string with `%s shoots %s!`, it might change in translation. Perhaps it will become something like `%s is shot by %s!`. But now it is the wrong way around, the shooter has swapped with the shootee. - -In this case, each `%s` should be numbered with a digit (1-9) then a dollar sign ($) between the `%` and the `s`. For example `%1$s shoots %2$s!` would be equivalent to `%s shoots %s!`. So the example translation above could be `%2$s is shot by %1$s!`, and this would work correctly. - -The game can figure out these `%1$s` `%2$s` parameters automatically, but you must make sure that (A): all of the `%` terms in the translation are numbered; and (B): the numbers are correct in terms of the original ordering in the english text. - -For example: - - #: map.cpp:680 - #, c-format - msgid "%s loses control of the %s." - msgstr "%2$s eht fo lortnoc sesol %1$s" - -would be displayed in-game as `kcurt eht fo lortnoc sesol liagibA`, assuming `Abigail` was driving a `truck`. - - -## Special tags in strings - -Some strings in the translation may have special tags in front of or inside them. These tags should be left as-is, and only the rest of the string translated. - -For example, the NPC and city names from "data/raw/names.json" are prefixed with `` so as to avoid conflicts with words (such as `Wood` the material, and `Wood` the last name). For these, the `` part should be left in. - -For example: - - #. ~ proper name; gender=female; usage=given - #: lang/json/json_names.py:6 - msgid "Abigail" - msgstr "liagibA" - -Names also have a comment above them, indicating what the name is used for in-game. In this case, `Abigail` is a possible first name for a female NPC. - - -## Plural forms - -Many languages use different terms for things depending on how many of them there are. These are supported using plural forms, defined by the `Plural-Form` line in the ".po" file header. - -For these, there will be multiple `msgstr` lines, intended for the different forms depending on number. The game will automatically choose the correct form depending on the number of things. - -For example: - - #: melee.cpp:913 - #, c-format - msgid "%d enemy hit!" - msgid_plural "%d enemies hit!" - msgstr[0] "!tih ymene %d" - msgstr[1] "!tih seimene %d" - -Here the first entry is for when there is only one `enemy`, the second is for when there are more than one `enemies`. The rules differ wildly between languages. diff --git a/lang/notes/de.txt b/lang/notes/de.txt deleted file mode 100644 index d06822770eaa..000000000000 --- a/lang/notes/de.txt +++ /dev/null @@ -1,122 +0,0 @@ -This file contains notes/discussion regarding translation for German, written in German. - -------------------- - -Diese Datei enthält Anmerkungen für alle, die das Spiel ins Deutsche übersetzen wollen. - -------------------- - -Sprache -------- -Deutsch wie in Deutschland üblich (de_DE). Wir verwenden die neue deutsche Rechtschreibung. - -Zusammenfassung ------------------ - -* Anführungszeichen: »Beispieltext« -* Innere Anführungszeichen: ›Beispieltext‹ -* Anrede: Grundsätzlich mit »du«, mit Ausnahmen (s.u.) -* Strings wie »the %s« oder »a %s« werden besonders übersetzt (s.u.) - -Anrede ------- -Grundsätzlich duzen sich alle. Auch der Spieler wird geduzt. - -Die Idee ist, dass nach der Apokalypse das »Sie« einfach aus der Mode kommt. Sind ja nicht mehr viele übrig. ;-) - -Die förmliche Anrede mit »Sie« wird nur in seltenen Ausnahmefällen benutzt. Diese Ausnahmefälle sind: - -* Alte Dokumente aus der Zeit vor der Apokalypse, wo die förmliche Anrede Sinn ergibt, z.B. alte Behördenprotokolle -* Computer, Terminals und die meisten anderen Bedienelemente -* Wenn es sinnvoll erscheint, auch bestimmte NPC-Dialoge, aber das dann bitte unbedingt im Spiel testen! - -Auf keinen Fall darf völlig grundlos zwischen »du« und »Sie« hin- und hergesprungen werden. - -Blöde Sonderregel für Artikel ------------------------------ -Es kommen sehr viele Strings vor, bei dem ein Artikel gefolgt von einem Platzhalter auftaucht. Das ist problematisch für uns, da deutsche Substantive ein Geschlecht haben. - -Zusammenfassung -############### - -Steht ein Artikel vor einem Platzhalter, wird er wie folgt übersetzt (naja): - -* »the %s« → »%s« -* »a %s« → »1 %s« - -Beispiele: - -* »You hit the %s!« → »Du triffst %s!« -* »You see a %s.« → »Du siehst 1 %s.« - -Ausnahmen sind natürlich erlaubt. - -Bestimmter Artikel »the« -######################## - -Beispiel: »You hit the %s!«. - -Problematische Übersetzung: -* »Du triffst das %s!«. - -So einfach ist das leider nicht, denn wir wissen ja nicht, welches Geschlecht das Wort für %s hat. - -Das funktioniert, wenn %s für »Monster« steht (»das Monster«). Aber wenn %s zu »Spinne« wird, dann kriegen wir »das Spinne«. Das ist blöd. :-( - -Wir haben uns daher angewöhnt, den Artikel einfach ganz wegzulassen. Also als ob %s ein Name wäre. - -Also: -* »Du triffst %s!« - -Das ist zwar immer noch nicht schön, aber besser als »das Spinne«. - -Alternativ hat sich auch der Doppelpunkt bewährt. Also: -* »Du triffst: %s« - -Bei kurzen Strings kann das sinnvoll sein, bei langen Strings eher nicht. - -Unbestimmter Artikel »a«/»an« -############################# - -Beispiel: »On the ground you see a %s.« - -Problematische Übersetzung: »Auf dem Boden siehst du ein %s.« - -Wenn wieder die Spinne kommt, haben wir »ein Spinne«. Das ist doof. :-( - -Notlösung: Wir ersetzen einfach den unbestimmten Artikel mit »1«. Also: - -* »Auf dem Boden siehst du 1 %s.« - -Zugegeben, etwas gefudelt ist das schon. Aber es funktioniert! Irgendwie. :D - -Auch hier wäre der Ansatz mit dem Doppelpunkt denkbar, aber nur, wenn es sein muss. - -Anmerkung -######### - -Beachte: All diese Ansätze sind nur Notlösungen! - -Eine echte Lösung des Problems kann es eigentlich nur geben, wenn die Art, wie C:DDA diese Strings aufbaut, grundsätzlich ändert. :-( - - - -Problemwort: »bionics« ----------------------- -C:DDA verwendet »bionic« als Wort für eine Art Implantat, nicht für ein Konzept wie in Wikipedia beschrieben (s.u.). - -So übersetzen wir es: - -* »the bionic« → »das Bionik« -* »the bionics« → »die Bioniken« - -»bionic« wird auch manchmal als Adjektiv eingesetzt: - -* »bionic« → »bionics« - - -Aus der englischsprachigen Wikipedia: - Bionics (also known as biomimicry, biomimetics, bio-inspiration, biognosis, and close to bionical creativity engineering) is the application of biological methods and systems found in nature to the study and design of engineering systems and modern technology - -Aus der deutschsprachigen Wikipedia: - Die Bionik (auch Biomimikry, Biomimetik oder Biomimese) beschäftigt sich mit dem Übertragen von Phänomenen der Natur auf die Technik. diff --git a/lang/notes/ru.txt b/lang/notes/ru.txt deleted file mode 100644 index 395c43fde925..000000000000 --- a/lang/notes/ru.txt +++ /dev/null @@ -1,69 +0,0 @@ - -This file contains notes/discussion regarding translation for Russian, written in Russian. - ---------------------------------------------------------------------------------------------------- - -Специфика: ---------------------------------------------------------------------------------------------------- -Старайтесь избавляться от англицизмов. Например, "Вы вытащили руки из своих карманов" следует заменить на "Вы вытащили руки из карманов". - -После перевода перечитайте свой текст. Если по-русски он звучит странно, это повод его несколько подредактировать с сохранением изначального смысла. - -Замена слов на уменьшительно-ласкательные приветствуется, если они подходят по смыслу. Замена слов на русский сленг или придание словам большей экспрессии тоже приветствуется, если это соответствует контексту. Импровизация в рамках контекста и смысла допустима, если конечный текст выглядит лучше, чем дословный перевод. - -После многоточия, по правилам русского языка, следующее предложение начинается с большой буквы. - -Прямую речь следует писать по русским правилам, если она встречается в переводе. - -Иногда перед началом или в конце фразы стоят пробелы. Их очень плохо видно в редакторе Transifex, имейте это в виду. Особенно часто это бывает, если фраза не окончена или по смыслу имеет продолжение. Чтобы лучше видеть такие пробелы, можно зайти в настройки редактора и включить пункт "Показать пробелы". - -Также не стоит забывать про букву Ё. - -Формы множественного числа ---------------------------------------------------------------------------------------------------- -В редакторе Transifex некоторые названия предметов требуется переводить для всех форм единственного и множественного числа. В игре, в зависимости от того, сколько у вас предметов, будет отображаться название предмета в нужной форме. - -1 — единственное число (например: яблоко) -Несколько — нужно подобрать окончание так, чтобы оно соответствовало кол-ву 2-4 предмета (например: яблока) -Много — нужно подобрать окончание так, чтобы оно соответствовало кол-ву 5-бесконечность предметов (например: яблок) -Другое — простая форма множественного числа (например: яблоки) - -В разделе "Несколько", при переводе прилагательных женского рода следует отдавать предпочтение варианту: две "стиральные машины", а не две "стиральных машины". - -Что касается книг и журналов. Слово копия и выпуск можно опустить. Как правило, если книги/журналы имеют множественное число, стоит переводить так: -1: книга «Война миров» -Несколько (например, две): книги «Война миров» -Много (например, сто): книг «Война миров» -Другое: книги «Война миров» - -1: журнал «Плейбой» -Несколько (например, два): журнала «Плейбой» -Много (например, сто): журналов «Плейбой» -Другое: журналы «Плейбой» - -Иногда встречаются такие слова, которые не стоит писать в единственном или во множественном числе, например, "фисташки", "арахис" и т.д. Их надо оставлять в той форме, которая больше подходит по смыслу. - -Спецсимволы: ---------------------------------------------------------------------------------------------------- - -Спецсимволы печатаются комбинацией клавиш. Для различных операционных систем эти комбинации разные. Для ОС Windows спецсимволы набираются на цифровой клавиатуре с помощью зажатой клавиши alt. Для ОС Linux существуют комбинации с кнопкой Compose. Для Mac ОС применяется комбинации с клавишей Option. -Некоторые символы имеют свою специфику в русском языке, отличную от английского. Нужно использовать русскую интерпретацию, если это возможно. - -Стоит различать тире и дефис. Дефис ставится внутри слова, короткий, без пробелов (например: что-то, чёрно-белый и т.п.). Тире — пунктуационный знак, ставится между словами, длиннее, отделяется пробелами с обеих сторон. -Дефис: - (минус) -Тире: — WIN:(alt + 0151) LIN:(Сompose + - + --) MAC:(Option + Shift + -) - -Кавычки следует использовать ёлочки. -Открывающая кавычка: « WIN:(alt + 0171) LIN:(Сompose + < + <) MAC:(Option + \) -Закрывающая кавычка: » WIN:(alt + 0187) LIN:(Сompose + > + >) MAC:(Option + Shift + \) - -Иногда, в тексте оригинала встречаются спецсимволы "%s", "%2$d", "\n", а также цветовые теги с цифрами 1 и 2. Оставляете их как есть, подставляя по смыслу в нужное место. Стоит ставить пробелы перед и после спецсимволов, если они есть в оригинале. -\n — перенос строки (эквивалентно клавише enter в текстовом редакторе) -%2$d или %d — вместо этих символов в игре будет отображаться числовое значение -%2$s или %s — вместо этих символов в игре будет отображаться какая-либо другая строка - -Поскольку шрифт в игре моноширинный, а у некоторых еще и квадратный, стоит соблюдать следующую специфику. -Не стоит использовать три точки вместо многоточия, в игре это очень плохо выглядит. Есть свой спецсимвол. -Многоточие: … WIN:(alt + 0133) LIN:(Сompose + . + .) MAC:(Option + ;) - -Также, в английском языке для текста игры принято правило разделять предложения двумя пробелами. В русском языке такого правила нет, поэтому после точки в конце предложения должен оставаться один пробел.