From d7383b4ecfe5ed3f2ee06ac873e68f27d15d2cac Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sun, 12 Aug 2007 05:18:18 +0000 Subject: added "TRANSLATING" file :) --- doc/AUTHORS | 3 + doc/TRANSLATING | 117 ++++++++++ portato/gui/templates/portato.glade | 426 ++++++++++++++++++------------------ 3 files changed, 335 insertions(+), 211 deletions(-) create mode 100644 doc/TRANSLATING diff --git a/doc/AUTHORS b/doc/AUTHORS index 821c57a..3b60cd1 100644 --- a/doc/AUTHORS +++ b/doc/AUTHORS @@ -4,3 +4,6 @@ Application icon: P4r4D0X (after an idea by wolfden) Shipped with code from: - Daniel J. Popowich (TreeViewTooltips) + +Many thanks to the Porthole team which often inspired me or gave me hints. +(And sometimes I even copied files ^^ ;)) diff --git a/doc/TRANSLATING b/doc/TRANSLATING new file mode 100644 index 0000000..1cb59c9 --- /dev/null +++ b/doc/TRANSLATING @@ -0,0 +1,117 @@ +#--------------------------------------# +| INSTRUCTIONS FOR TRANSLATING PORTATO | +#--------------------------------------# + +PRENOTE: This document is copied from the porthole project and slightly changed afterwards. +Thanks guys :) + +The recommended way to translate Portato into another language is to use +"Poedit" (app-i18n/poedit). However you might want to try out either +KBabel (kde-base/kbabel) or Gtranslator (app-text/gtranslator). + + +Getting the sources: +=================== + +You do need the sources to make translations. The installed program is not sufficient. +Change into a local directory where you want to have the sources installed. +Then do: + +> svn co https://portato.svn.sourceforge.net/svnroot/portato/trunk portato + +You now should have the actual sources in the "portato" subdirectory. + + +To update an incomplete translation: +=================================== + +If there is a translation for your language already, then open the .po file in +portato's i18n/ directory with Poedit (e.g. pl.po = Polish, fr_FR.po = French +(France)). Select "Update from POT file" from the "Catalog" menu, then choose +the messages.pot file in the i18n/ directory. Untranslated strings will be +highlighted and placed at the top of the list. Translate them and save the file! + + +To create a new translation: +=========================== + +Open poedit and Select "New catalog from POT file" from the "File" menu, and +choose the messages.pot file in portato's i18n/ directory. Translate, then save +the file (also in the i18n/ directory) as .po where is the two +letter code for your language, optionally followed by a two letter modifier. +For example en.po would be for English, en_GB.po would be specifically for +British English. + + +Important notes about placeholders: +================================== + +The translatable strings in the messages.pot catalogue and the .po files +are partially in Python's string format, partially in GTK's. The following items +should be included in translated strings as placeholders for names or figures: + +"%s" : string placeholder +"%d" : number placeholder +"%(days)d" : placeholder named "days", do not translate the name +pretty much anything starting with "%" + +Html-Tags ("some_text") should be kept as is and only the text in between +has to be changed. + +In addition, the underscore (_) is used to indicate that the next character will +be used as the accellerator key. When the user presses "CTRL" + this key, it will +perform the item's action. These are not required, but if you use them the +characters chosen must all be different. + +Strings like "gtk-quit", "gtk-cancel" etc. must not be translated. + + +To test your translation: +======================== + +run the "pocompile" script in the portato directory: + +> ./pocompile.sh + +This will compile all the .po files in i18n/ into .mo files (which +gettext uses when translating Portatot) and place them in the necessary +subdirectories (/LC_MESSAGES). + +Now you can run the local portato version in your language: + +> ./portato.py + +If you are not seeing your language, make sure the environment variable "LANG" +is set to your language code. +For example, to run portato using the German translation: + +> LANG="de_DE" ./portato.py + + +To submit the translation so we can include it in Portato distributions: +======================================================================== + +The easiest method is to post it to a tracker on portato's sourceforge site, +http://sourceforge.net/projects/portato. + + +I found a string in Portatot that I can't translate! What gives?: +================================================================ + +Post a bug report on the sourceforge site +(http://sourceforge.net/projects/portato). Include the untranslatable string +and where in Portato you came across it. It's easy for us to mark the strings +for translation, but we may have missed some! + + +I don't want to use a stupid GUI, they are plain text files!: +============================================================ + +The .po files are indeed plain text files. If you don't want to use poedit for +some reason, these gettext commands might come in handy: + +Update a .po file from the messages.pot file: +> "msgmerge .po messages.pot > newpofile.po" + +Create a new .po file from the messages.pot file: +> "msginit -i messages.pot -l " diff --git a/portato/gui/templates/portato.glade b/portato/gui/templates/portato.glade index 77f8a8f..ad7ddfa 100644 --- a/portato/gui/templates/portato.glade +++ b/portato/gui/templates/portato.glade @@ -450,52 +450,107 @@ 5 3 - + True - 1 - True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - True - True - Installed - 0 - True - - - - False - + + + + 3 + 1 + 2 + GTK_EXPAND + + + + + + True + True + <b>Installed, but not in portage anymore</b> + True + + + 3 + 2 + 3 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 - + True - True - Masked - 0 - True - + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + False + + + - False - 1 + False - + True - True - Testing - 0 - True - + False + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + + - False - 2 + 1 + + 3 + 3 + 4 + 5 + 5 + + + + + True + GTK_JUSTIFY_CENTER + True + + + 3 + GTK_FILL + + 10 + + + + + True + True + <span foreground='red'><b>MISSING KEYWORD</b></span> + True + 3 2 @@ -562,90 +617,51 @@ - - True - True - <span foreground='red'><b>MISSING KEYWORD</b></span> - True - - - 3 - 2 - 3 - GTK_FILL - - - - - True - GTK_JUSTIFY_CENTER - True - - - 3 - GTK_FILL - - 10 - - - - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 + 1 + True - + True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - False - - - + True + Installed + 0 + True + - False + False - + True - False - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - - + True + Masked + 0 + True + + False 1 - - - 3 - 3 - 4 - 5 - 5 - - - - - True - True - <b>Installed, but not in portage anymore</b> - True + + + True + True + Testing + 0 + True + + + + False + 2 + + 3 @@ -654,22 +670,6 @@ GTK_FILL - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - - 3 - 1 - 2 - GTK_EXPAND - - - False @@ -1147,189 +1147,189 @@ - - True - 0 - 5 - <u><i>Masking Keywords</i></u> - True - True - - - 7 - 8 - 5 - - - - + True - 0 - 5 - <u><i>Testing Keywords</i></u> - True - True - 4 - 5 - 5 + 1 + 2 + 3 + 4 - + True 0 - 5 - <u><i>Use-Flags</i></u> - True + File name to use, if package.use is a directory: True - 1 - 2 - 6 + 3 + 4 - + True - - - True - 0 - GTK_SHADOW_OUT - - - True - 0 - <u>You may use the following placeholders:</u> - -<i>$(cat)</i>: category -<i>$(pkg)</i>: package name -<i>$(cat-1)/$(cat-2)</i>: first/second part of the category - True - - - - - - label_item - - - - + Add only exact version to package.use + 0 + True 2 + 2 + 3 - + True - Add only exact version to package.mask/package.unmask + Add only exact version to package.keywords 0 True 2 - 8 - 9 + 5 + 6 - + True 0 - File name to use, if package.mask/package.unmask is a directory: + File name to use, if package.keywords is a directory: True - 9 - 10 + 6 + 7 - + True 1 2 - 9 - 10 + 6 + 7 - + True 1 2 - 6 - 7 + 9 + 10 - + True 0 - File name to use, if package.keywords is a directory: + File name to use, if package.mask/package.unmask is a directory: True - 6 - 7 + 9 + 10 - + True - Add only exact version to package.keywords + Add only exact version to package.mask/package.unmask 0 True 2 - 5 - 6 + 8 + 9 - + True - Add only exact version to package.use - 0 - True + + + True + 0 + GTK_SHADOW_OUT + + + True + 0 + <u>You may use the following placeholders:</u> + +<i>$(cat)</i>: category +<i>$(pkg)</i>: package name +<i>$(cat-1)/$(cat-2)</i>: first/second part of the category + True + + + + + + label_item + + + + 2 - 2 - 3 - + True 0 - File name to use, if package.use is a directory: + 5 + <u><i>Use-Flags</i></u> + True True - 3 - 4 + 1 + 2 + 6 - + + True + 0 + 5 + <u><i>Testing Keywords</i></u> + True + True + + + 4 + 5 + 5 + + + + True + 0 + 5 + <u><i>Masking Keywords</i></u> + True + True - 1 - 2 - 3 - 4 + 7 + 8 + 5 @@ -1752,7 +1752,11 @@ Copyright (C) 2006-2007 René 'Necoro' Neumann <necoro@necoro.net>http://portato.sourceforge.net René 'Necoro' Neumann -uses code from: Daniel J. Popowich +uses code from: Daniel J. Popowich + +Many thanks to the Porthole team which often inspired me or gave me hints. +(And sometimes I even copied files ^^ ;)) + p4r4d0x (inspired by wolfden) -- cgit v1.2.3