summaryrefslogtreecommitdiff
path: root/docs/HOWTO_compile_lang_files.txt
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-12-29 00:06:31 +0000
committerDarkvater <darkvater@openttd.org>2006-12-29 00:06:31 +0000
commit88eb5014ce2b87e7428af33ee04e4b3efee17591 (patch)
treef5d230510337d060949e4550b203a47c69b53d36 /docs/HOWTO_compile_lang_files.txt
parent6b572f1e1ffea489651e57026a53af838fe2c687 (diff)
downloadopenttd-88eb5014ce2b87e7428af33ee04e4b3efee17591.tar.xz
(svn r7605) -Update documentation of MSVC and strgen in docs/ dir and remove directmusic.txt
Diffstat (limited to 'docs/HOWTO_compile_lang_files.txt')
-rw-r--r--docs/HOWTO_compile_lang_files.txt59
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/HOWTO_compile_lang_files.txt b/docs/HOWTO_compile_lang_files.txt
new file mode 100644
index 000000000..101e50b02
--- /dev/null
+++ b/docs/HOWTO_compile_lang_files.txt
@@ -0,0 +1,59 @@
+STRGEN USAGE
+------------
+This guide is only interesting for people who want to alter something
+themselves without access to WT2 (translator2.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 also download a precompiled binary from a release,
+nightly, etc.
+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.
+
+EXAMPLES
+--------
+Example 1:
+if you are in the root of your working copy (svn code), 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
+
+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
+
+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
+
+You can interchange english.txt to whichever language you want to generate a
+.lng file for.
+
+STRGEN COMMAND SWITCHES
+-----------------------
+-v | --version
+strgen will tell what svn revision it was last modified
+
+-t | --todo
+strgen will add <TODO> to any untranslated/missing strings and use the english
+strings while compiling the language file
+
+-w | --warning
+strgen will print any missing strings or wrongly translated (bad format)
+to standard error output(stderr)
+
+-h | --help | -?
+Print out a summarized help message explaining these switches
+
+-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
+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