From a926928f4b1c27c5f4510eb0b1d93fdc97eb9538 Mon Sep 17 00:00:00 2001 From: Bandie Date: Mon, 8 Oct 2018 20:02:28 +0200 Subject: [PATCH] Updated How to translate (markdown) --- How-to-translate.md | 48 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/How-to-translate.md b/How-to-translate.md index edfb7ec..f98e843 100644 --- a/How-to-translate.md +++ b/How-to-translate.md @@ -17,16 +17,27 @@ then [add it to your github account](https://help.github.com/articles/adding-a-n 3. Go to [this github project page](https://github.com/pampanic/pam_panic/wiki/How-to-translate) and fork this project. (Click on **Fork** in the upper right.) > **Forking:** You are about to create an own version of a project. It will copy its content to your account under a new project, and github will note that this fork exist. After you pressed the Fork button you will be in your **own** project afterwards. -4. [Clone your fork](https://help.github.com/articles/cloning-a-repository/) you just made from this project -5. (Optional:) Get an editor for po files like `poedit` or use an online service for it. +4. [Clone your fork](https://help.github.com/articles/cloning-a-repository/) you just made from this project. + +5. _Optional:_ Get an editor for po files like `poedit` or use an online service for it. **Installation on (K)Ubuntu:** `sudo apt-get install poedit` Are you new to .po files? You might want to read about [The .po structure](https://github.com/pampanic/pam_panic/wiki/The-.po-structure). -# Translating the program +# Translating the pam_panic program -## Steps to do +## Steps to do for `poedit` +1. Open `poedit`. +2. Go to _Edit -> Preferences_ +3. Put in your (nick-)name and email address and close the window. +4. Click on "Create New Translation". +5. Change into the `po` directory of your cloned pam_panic project and choose the file `pam_panic.pot`. +6. Do your translation. +7. Save your translation. +8. Add your [two-letter language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) to the `LINGUAS` file within the po directory. + +## Steps to do - Tech-savvy edition 1. Change into the `po` 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: \n"` to `"Last-Translator: Your Name \n"` @@ -41,12 +52,22 @@ Are you new to .po files? You might want to read about [The .po structure](https - Please include all spaces and special characters like in `msgid`. -# Translating the man pages +# Translating the man pages (manuals) -## Steps to do +## Steps to do for `poedit` +1. Open `poedit`. +2. Go to _Edit -> Preferences_ +3. Put in your (nick-)name and email address and close the window. +4. Click on "Create New Translation". +5. Change into the `po4a` directory of your cloned pam_panic project and choose the file `pam_panic.pot`. +6. Do your translation. +7. Save your translation. + +## Steps to do - Tech-savvy edition 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 " +4. Do your translation. ## Translating notes: man pages - Please fill out translations even if they're the same, like digits or other things. @@ -59,16 +80,23 @@ Are you new to .po files? You might want to read about [The .po structure](https "This man page has been revised by Jordy Dickinson Ejordy." "dickinson@icloud.comE." ``` - Put your own name and mail address into the msgstr, with a sentence like `This man page has been translated by Name Email@address.tldE` (translated of course). + Put your own name and mail address into that translation, with a sentence like `This man page has been translated by Name Email@address.tldE` (translated of course). ## Integration of the man pages -- 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`. +1. 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 \". +2. Same thing for `src/pam_panic_pw/man/Makefile.am`. # Send a pull request -After you're satisfied with your work, make a pull request. +After you're satisfied with your work: + +1. Open the console. +2. Use `cd` to change into the pam_panic directory. E.g. `cd pam_panic` to go into the directory pam_panic. +3. Type `git add . ` (yes, a dot). It will add all changings you've made to the git system. +4. Type `git commit -m "Translation for YOUR_LANGUAGE_HERE"` to make it ready to push to the github servers. The text within the quotes will be the message about the changing you've done. +5. Type `git push` to push it into your project on github. You'll need to use your github credentials to push them up. +6. [Create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)