Table of Contents
- General preparation
- Translating the pam_panic program including the pam_panic_config script
- Steps to do for poedit
- Steps to do - Tech-savvy edition
- Translation notes: pam_panic program / pam_panic_config
- Translating the man pages (manuals)
- Steps to do for poedit
- Steps to do - Tech-savvy edition
- Translating notes: man pages
- Integration of the man pages
- Translating the .desktop file
- Send a pull request
This article will show you how you can help to translate this project.
General preparation
It would be best if you create a Linux work environment.
If you're not familiar with Linux, try to take the Distrochooser test.
It might help you to choose one of the many Linux distributions.
Anyway, the following text will assume that you have chosen Ubuntu or Kubuntu or something like that.
-
Install git on your computer.
git: A versioning software so that you can keep track in software projects on which changing has taken place at what time and circumstances. This is what github is all about.
Installation on (K)Ubuntu: Open the console and type
sudo apt-get install git
, type in your password (you won't see any dots or stars in there while typing) and it is going to be installed. -
If not already done, create a github account.
-
Generate a new ssh key. Here you only need to follow the "Generating a new SSH key" steps.
-
Enable gpg signed commits by typing
git config --global commit.gpgsign true
in your command line. -
Go to this github project page 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.
-
Clone your fork you just made from this project.
-
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.
Translating the pam_panic program including the pam_panic_config script
Steps to do for poedit
- Open
poedit
. - Go to Edit -> Preferences
- Put in your (nick-)name and email address and close the window.
- Click on "Create New Translation".
- Change into the
po
directory of your cloned pam_panic project and choose the filepam_panic.pot
. - Do your translation.
- Save your translation.
- Add your two-letter language code to the
LINGUAS
file within the po directory.
Steps to do - Tech-savvy edition
- Change into the
po
directory. - Run
msginit --locale=<your locale here>
(for examplemsginit --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. - Change the header from
"Last-Translator: <your.mail@address.tld>\n"
to"Last-Translator: Your Name <your.mail@address.tld>\n"
- Do your translation. (You can use some .po translation programs or use online services for it)
- Add your language to the
LINGUAS
file.
Translation notes: pam_panic program / pam_panic_config
- Please fill out translations even if they're the same, like digits.
- Please keep the formatting of the words like in the original; e.g.
ERROR
should be kept uppercase. - Please don't translate words in surrounding of
\"
, for example\"allow\"
. - Please include all spaces and special characters like in
msgid
. - There are two strings "We will destroy" and "when you trigger the panic function.". They are actually one sentence with something in between, as in: "We will destroy X when you trigger the panic function."
Translating the man pages (manuals)
Steps to do for poedit
- Open
poedit
. - Go to Edit -> Preferences
- Put in your (nick-)name and email address and close the window.
- Click on "Create New Translation".
- Change into the
po4a
directory of your cloned pam_panic project and choose the filepam_panic.pot
. - Do your translation.
- Save your translation.
Steps to do - Tech-savvy edition
- Change into the
po4a
directory. - Run
msginit --locale=<your locale here>
(for examplemsginit --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. - Change the header from "Last-Translator: your.mail@address.tld" to "Last-Translator: Your Name your.mail@address.tld"
- Do your translation.
Translating notes: man pages
- Please fill out translations even if they're the same, like digits or other things.
- Translate
__PAMPANICSO__
,__PAMPANICPW__
,__PPASSFILE__
and other weird looking stuff exactly like they're looking. - Please don't translate the words "reboot", "poweroff", "serious", "allow" and "reject", but include them in your text. Those are surrounded by escape sequences like "B" (which means "make the word "reboot" big).
- Please include all spaces and special characters like in
msgid
, like\"
, B,E<lt>yourmailadress@foo.comE<gt>
. - Seeing
Put your own name and mail address into that translation, with a sentence likemsgid "" "This man page has been revised by Jordy Dickinson E<lt>jordy." "dickinson@icloud.comE<gt>."
This man page has been translated by Name E<lt>mail@address.tldE<gt>
(translated of course).
Integration of the man pages
- Open
src/pam_panic/man/Makefile.am
and put your new language in thenobase_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
.
Translating the .desktop
file
The .desktop
file is the link and icon for Desktop Environments.
You can find the desktop file here:
src/pam_panic_config/applications/pampanic-config.desktop
The structure of the .desktop file will be understandable to you; nothing hard.
The program behind the desktop file is not translatable yet.
Send a pull request
After you're satisfied with your work:
- Open the console.
- Use
cd
to change into the pam_panic directory. E.g.cd pam_panic
to go into the directory pam_panic. - Type
git add .
(yes, a dot). It will add all changings you've made to the git system. - 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. - Type
git push
to push it into your project on github. You'll need to use your github credentials to push them up. - Create a pull request
Contact
- Support channel on IRC at #pampanic on chat.freenode.net - Feel free to idle. :)