1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
Worker Catalogs
^^^^^^^^^^^^^^^
If you want to create a catalog for your language, you can use the 'template.*'
files in this directory.
There are 2 files, but you don't need to adjust both.
1.template.catalog
2.template.catalog.flags
The first file contains all strings needed by worker. The second file
contains all names of the flags for the "own command".
The files have the following format:
<Number>:<String>
The number is the internal number for the string.
You can have empty lines and anything behind # is a comment.
Take a look at the template file, there is the original (internal) string for
each number in the comment before, so you can easily add the string in your
language behind the ":"
If the original string contain some of the special %-characters, you must insert them
in the translation too. For example %s will be replaced by a string (exactly the
printf format), so for correctness it's important to insert this values at
the correct position for you language.
In some strings you will find the character "|". This is used for
dialog texts and it indicates a newline. You can insert as many of
this character as you want, so if you need more space for your string,
you can add "|" and the following text will placed in a new line. This
works only for dialog strings, though.
You can split one catalog entry into multiple lines when backslash-ing the newline.
If you need a backslash in the string, backslash it (\\).
If you need the newline character (|) in a requester text, protect it with a
backslash (but because when Worker loads the catalog, it resolve backslash you
have to add two backslashes -> \\| )
In the template, some original strings are empty. These strings are
not used at the moment, leave them empty as well.
You don't need to translate all strings. If you want to skip a number,
leave it empty or remove the line with the number from the file. In
this case the internal string will used.
Finally replace the "template" in the filename with your language name
(for example, for German the "template.catalog" file becomes
"deutsch.catalog" and "template.catalog.flags" becomes
"deutsch.catalog.flags"). The last step is to copy these two files into
$HOME/.config/worker/catalogs (create it if it does not exist).
Encodings
---------
You can also use UTF8 encoded strings for your translation but you
have to add ".utf8" to the file names. So the file "lang.catalog"
becomes "lang.catalog.utf8" and so on.
Installation
------------
There is also a global directory for catalogs (/usr/local/share/worker
if you didn't change the install directory). If there are 2 catalogs
with same name, the files in the global directory will be used!
You can then select the language in the global settings.
Don't forget to send me the two files, so I can add them to the next release!
|