diff --git a/How-to-translate.md b/How-to-translate.md index f2b1f94..e37b7c3 100644 --- a/How-to-translate.md +++ b/How-to-translate.md @@ -1,7 +1,7 @@ This article will show you how you can help to translate this project. ## Preparation -1. Install git and gettext. +1. Install git, gettext and po4a. 2. Fork this project. 3. Clone your fork on your computer. @@ -9,10 +9,17 @@ This article will show you how you can help to translate this project. We will begin with the simplest translations: ## Translation within the program - gettext -1. Change into the `po` directory. -2. Run `msginit --locale=` (for example `msginit --locale=de_DE.UTF-8`). This will ask for some information about you. It will generate a file ending with `.po` which you want to translate. +1. Run `autoreconf -i && ./configure`. +2. Change into the `po` directory. +3. Run `msginit --locale=` (for example `msginit --locale=de_DE.UTF-8`). This will ask for your mail adress. It will generate a file ending with `.po` which you want to translate. +4. Change the header from `"Last-Translator: \n"` to `"Last-Translator: Your Name \n"` +5. Do your translation. (You can use some .po translation programs) +6. Add your language to the `LINGUAS` file. +7. Run `make update-po`. -### .po translation convention + +### .po gettext translation convention +- Please fill out translations even if they're the same, like digits. - Please don't translate words with big letters, for example `ERROR`. - Please don't translate words in surrounding of `\"`, for example `\"allow\"`. - Please include all spaces and special characters like in `msgid`. @@ -55,33 +62,21 @@ msgstr "" ## man pages -Sadly there's no system implemented yet to translate man pages. It means you have to do it by hand. - -### man pages location -The man pages are at -``` -src/pam_panic/man/man8 -src/pam_panic_pw/man/man1 -``` ### Preparation -For pam_panic: -1. Go to `src/pam_panic/man`. -2. Make a new directory called like your ISO locale. (de for German, es for Spanish, ...). `mkdir de`. -3. Copy recursively the man[digit] to your directory which you just created. `cp -r man8 de`. +1. Change into the `po4a` directory. +2. Run `msginit --locale=` (for example `msginit --locale=de_DE.UTF-8`). This will ask for your mail adress. It will generate a file ending with `.po` which you want to translate. +3. Change the header from "Last-Translator: " to "Last-Translator: Your Name " -For pam_panic_pw: -1. Go to `src/pam_panic_pw/man`. -2. Make a new directory called like your ISO locale. (de for German, es for Spanish, ...). `mkdir de`. -3. Copy recursively the man[digit] to your directory which you just created. `cp -r man1 de`. +### .po4a man page translation convention +- Please fill out translations even if they're the same, like digits. +- Please don't translate the words "reboot", "poweroff", "serious", "allow" and "reject". Those are surrounded by escape sequences like "B" (which means "make the word "reboot" big). +- Please don't translate words in surrounding of `\"`, for example `\"allow\"`. +- Please include all spaces and special characters like in `msgid`. -### Translate -Try to translate the man page. The man page file is ending with a digit like `pam_panic.8`. -You will see something like `\fBpam_panic\&.so\fR` which looks weird: -- `\fB` and `\fR` are formatting control characters. Just try to adopt them. -- `\&.` is actually a `.`. You need to escape dots like this. Sadly. ### Integration of the man pages -- Open `src/pam_panic/man/Makefile.am` and put your new man page path into the `nobase_dist_cant_believe_its_not_man_DATA` list. Note that you have to add a `\` at the end of the last entry. + +- Open `src/pam_panic/man/Makefile.am` and put your new language in the `nobase_dist_cant_believe_its_not_man_DATA` list. Note that you have to add a `\` at the end of the last entry. It will look like "/man8/pam_panic.8.gz \". - Same thing for `src/pam_panic_pw/man/Makefile.am`.