summaryrefslogtreecommitdiff
path: root/docs/HOWTO_compile_lang_files.txt
diff options
context:
space:
mode:
authorAndy <andy@teamrubber.com>2019-10-19 11:27:04 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-10-20 17:12:54 +0100
commita70b6fcece52ed11a40e1457d3d9b9860b6a2804 (patch)
treef2d20b1260a4fff848e5c7dcb5c8ca1bd997e6b2 /docs/HOWTO_compile_lang_files.txt
parentf159d9157224569d126fd0a85f22ea82a67babe4 (diff)
downloadopenttd-a70b6fcece52ed11a40e1457d3d9b9860b6a2804.tar.xz
Doc: convert some docs to markdown (without rename)
Diffstat (limited to 'docs/HOWTO_compile_lang_files.txt')
-rw-r--r--docs/HOWTO_compile_lang_files.txt75
1 files changed, 36 insertions, 39 deletions
diff --git a/docs/HOWTO_compile_lang_files.txt b/docs/HOWTO_compile_lang_files.txt
index 547854e50..234fcf2a6 100644
--- a/docs/HOWTO_compile_lang_files.txt
+++ b/docs/HOWTO_compile_lang_files.txt
@@ -1,72 +1,69 @@
-OpenTTD and strgen
-Last updated: 2009-06-30
-------------------------------------------------------------------------
-
+# How to compile lang files (OpenTTD and strgen)
-Table of contents
------------------
-1.0) strgen usage
- * 1.1) Examples
- * 1.2) strgen command switches
+Last updated: 2009-06-30
+## strgen usage
-1.0) strgen usage
----- ------------
This guide is only interesting for people who want to alter something
-themselves without access to translator.openttd.org. Please note that
-your compiled language file will only be compatible with the OpenTTD version
-you have downloaded english.txt, the master language file, for. While this is
+themselves without access to [translator.openttd.org](https://translator.openttd.org/).
+
+Please note that your compiled language file will only be compatible with the OpenTTD version
+you have downloaded `english.txt`, the master language file, for. While this is
not always true, namely when changes in the code have not touched language
files, your safest bet is to assume this 'limitation'.
+
As a first step you need to compile strgen. This is as easy as typing
-'make strgen'. You can download the precompile strgen from:
-http://www.openttd.org/download-strgen
+`'make strgen'`. You can download the precompile strgen from:
+[http://www.openttd.org/download-strgen](http://www.openttd.org/download-strgen)
strgen takes as argument a txt file and translates it to a lng file, allowing
it to be used inside OpenTTD. strgen needs the master language file
-english.txt to work. Below are some examples of strgen usage.
+`english.txt` to work. Below are some examples of strgen usage.
-1.1) Examples
----- --------
-Example 1:
-if you are in the root of your working copy (git repository), you should type
-strgen/strgen -s lang lang/english.txt
-to compile englist.txt into english.lng. It will be placed in the lang dir
+## Examples
-Example 2:
-you only have the strgen executable (no working copy) and you want to compile
+### Example 1
+
+If you are in the root of your working copy (git repository), you should type
+`./strgen/strgen -s lang lang/english.txt`
+to compile `english.txt` into `english.lng`. It will be placed in the lang dir.
+
+### Example 2
+
+You only have the strgen executable (no working copy) and you want to compile
a txt file in the same directory. You should type
-./strgen english.txt
-and you will get and english.lng in the same dir
+`./strgen english.txt`
+and you will get and `english.lng` in the same dir.
-Example 3:
-you have strgen somewhere, english.txt in /usr/openttd/lang and you want the
+### Example 3
+
+You have strgen somewhere, `english.txt` in `/usr/openttd/lang` and you want the
resulting language file to go to /tmp. Use
-./strgen -s /usr/openttd/lang -d /tmp english.txt
+`./strgen -s /usr/openttd/lang -d /tmp english.txt`
-You can interchange english.txt to whichever language you want to generate a
+You can interchange `english.txt` to whichever language you want to generate a
.lng file for.
-1.2) strgen command switches
----- -----------------------
--v | --version
+## strgen command switches
+
+`-v | --version`
strgen will tell what git revision it was last modified
--t | --todo
+`-t | --todo`
strgen will add <TODO> to any untranslated/missing strings and use the english
strings while compiling the language file
--w | --warning
+`-w | --warning`
strgen will print any missing strings or wrongly translated (bad format)
to standard error output(stderr)
--h | --help | -?
+`-h | --help | -?`
Print out a summarized help message explaining these switches
--s | --source_dir
+`-s | --source_dir`
strgen will search for the master file english.txt in the directory specified
by this switch instead of the current directory
--d | --dest_dir
+`-d | --dest_dir`
strgen will put <language>.lng in the directory specified by this switch; if
no dest_dir is given, output is the same as source_dir