celestar@5592: STRGEN USAGE celestar@5592: ------------ celestar@5592: This guide is only interesting for people who want to alter something celestar@5592: themselves without access to WT2 (translator2.openttd.org). Please note that celestar@5592: your compiled language file will only be compatible with the OpenTTD version celestar@5592: you have downloaded english.txt, the master language file, for. While this is celestar@5592: not always true, namely when changes in the code have not touched language celestar@5592: files, your safest bet is to assume this 'limitation'. celestar@5592: As a first step you need to compile strgen. This is as easy as typing celestar@5592: 'make strgen'. You can also download a precompiled binary from a release, celestar@5592: nightly, etc. celestar@5592: strgen takes as argument a txt file and translates it to a lng file, allowing celestar@5592: it to be used inside OpenTTD. strgen needs the master language file celestar@5592: english.txt to work. Below are some examples of strgen usage. celestar@5592: celestar@5592: EXAMPLES celestar@5592: -------- celestar@5592: Example 1: celestar@5592: if you are in the root of your working copy (svn code), you should type celestar@5592: strgen/strgen -s lang lang/english.txt celestar@5592: to compile englist.txt into english.lng. It will be placed in the lang dir celestar@5592: celestar@5592: Example 2: celestar@5592: you only have the strgen executable (no working copy) and you want to compile celestar@5592: a txt file in the same directory. You should type celestar@5592: ./strgen english.txt celestar@5592: and you will get and english.lng in the same dir celestar@5592: celestar@5592: Example 3: celestar@5592: you have strgen somewhere, english.txt in /usr/openttd/lang and you want the celestar@5592: resulting language file to go to /tmp. Use celestar@5592: ./strgen -s /usr/openttd/lang -d /tmp english.txt celestar@5592: celestar@5592: You can interchange english.txt to whichever language you want to generate a celestar@5592: .lng file for. celestar@5592: celestar@5592: STRGEN COMMAND SWITCHES celestar@5592: ----------------------- celestar@5592: -v | --version celestar@5592: strgen will tell what svn revision it was last modified celestar@5592: celestar@5592: -t | --todo celestar@5592: strgen will add to any untranslated/missing strings and use the english celestar@5592: strings while compiling the language file celestar@5592: celestar@5592: -w | --warning celestar@5592: strgen will print any missing strings or wrongly translated (bad format) celestar@5592: to standard error output(stderr) celestar@5592: celestar@5592: -h | --help | -? celestar@5592: Print out a summarized help message explaining these switches celestar@5592: celestar@5592: -s | --source_dir celestar@5592: strgen will search for the master file english.txt in the directory specified celestar@5592: by this switch instead of the current directory celestar@5592: celestar@5592: -d | --dest_dir celestar@5592: strgen will put .lng in the directory specified by this switch; if celestar@5592: no dest_dir is given, output is the same as source_dir