Skip to content

Commit

Permalink
Mention the comment (ignorable) column function in translation csv
Browse files Browse the repository at this point in the history
As we have the godotengine/godot-proposals#8183 done, this needs to be documented as akien-mga suggests godotengine/godot#84569 (comment)
  • Loading branch information
jsjtxietian authored Feb 24, 2024
1 parent c8d799d commit e4c32c6
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions tutorials/assets_pipeline/importing_translations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,26 @@ CSV files must be formatted as follows:
+--------+----------+----------+----------+

The "lang" tags must represent a language, which must be one of the :ref:`valid
locales <doc_locales>` supported by the engine. The "KEY" tags must be
unique and represent a string universally (they are usually in
locales <doc_locales>` supported by the engine, or they must start with an underscore (`_`),
which means the related column is served as comment and won't be imported.
The "KEY" tags must be unique and represent a string universally (they are usually in
uppercase, to differentiate from other strings). These keys will be replaced at
runtime by the matching translated string. Note that the case is important,
"KEY1" and "Key1" will be different keys.
The top-left cell is ignored and can be left empty or having any content.
Here's an example:

+-------+-----------------------+------------------------+------------------------------+
| keys | en | es | ja |
+=======+=======================+========================+==============================+
| GREET | Hello, friend! | Hola, amigo! | こんにちは |
+-------+-----------------------+------------------------+------------------------------+
| ASK | How are you? | Cómo está? | 元気ですか |
+-------+-----------------------+------------------------+------------------------------+
| BYE | Goodbye | Adiós | さようなら |
+-------+-----------------------+------------------------+------------------------------+
| QUOTE | "Hello" said the man. | "Hola" dijo el hombre. | 「こんにちは」男は言いました |
+-------+-----------------------+------------------------+------------------------------+
+-------+-----------------------+------------------------+------------------------------+------------------------------+
| keys | en | es | ja | _character |
+=======+=======================+========================+==============================+==============================+
| GREET | Hello, friend! | Hola, amigo! | こんにちは | John |
+-------+-----------------------+------------------------+------------------------------+------------------------------+
| ASK | How are you? | Cómo está? | 元気ですか | Jade |
+-------+-----------------------+------------------------+------------------------------+------------------------------+
| BYE | Goodbye | Adiós | さようなら | Nancy |
+-------+-----------------------+------------------------+------------------------------+------------------------------+
| QUOTE | "Hello" said the man. | "Hola" dijo el hombre. | 「こんにちは」男は言いました | Tian |
+-------+-----------------------+------------------------+------------------------------+------------------------------+

The same example is shown below as a comma-separated plain text file,
which should be the result of editing the above in a spreadsheet.
Expand All @@ -89,11 +90,11 @@ comma in the import options.

.. code-block:: none
keys,en,es,ja
GREET,"Hello, friend!","Hola, amigo!",こんにちは
ASK,How are you?,Cómo está?,元気ですか
BYE,Goodbye,Adiós,さようなら
QUOTE,"""Hello"" said the man.","""Hola"" dijo el hombre.",「こんにちは」男は言いました
keys,en,es,ja,_character
GREET,"Hello, friend!","Hola, amigo!",こんにちは,John
ASK,How are you?,Cómo está?,元気ですか,Jade
BYE,Goodbye,Adiós,さようなら,Nancy
QUOTE,"""Hello"" said the man.","""Hola"" dijo el hombre.",「こんにちは」男は言いました,Tian
CSV importer
------------
Expand Down

0 comments on commit e4c32c6

Please sign in to comment.