I18N, extract de.po, add ru.po
authorlogvinon <NLogvinov@gmail.com>
Fri, 13 Mar 2009 12:14:28 +0000 (12:14 +0000)
committerlogvinon <NLogvinov@gmail.com>
Fri, 13 Mar 2009 12:14:28 +0000 (12:14 +0000)
git-svn-id: file:///svnroot/multilist@7 bd6b1de3-02cc-4133-82b9-a2a787a87b1d

15 files changed:
Makefile
data/high/multilist.png [new file with mode: 0644]
data/low/multilist.png [new file with mode: 0644]
data/scale/multilist.png [new file with mode: 0644]
debian/changelog
po/de.po [new file with mode: 0644]
po/ru.po [new file with mode: 0644]
setup.py
src/multilist
src/multilistclasses/libbottombar.py
src/multilistclasses/libmultilist.py
src/multilistclasses/libselection.py
src/multilistclasses/libsqldialog.py
src/multilistclasses/libsync.py
src/multilistclasses/libview.py

index 5d27979..ab363c7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,26 @@
-all:
+all: build_mo
        python2.5 setup.py build  
 clean: 
+       rm -rf ./locale ./po/templates.pot
        python2.5 setup.py clean --all
-install:
+install: build_mo
        python2.5 setup.py install --root $(DESTDIR) 
+
+TEXT_DOMAIN=multilist
+POTFILES=src/multilist $(wildcard src/multilistclasses/*.py)
+
+update_po: po/templates.pot
+       @for lang in $(basename $(notdir $(wildcard po/*.po))); do \
+               msgmerge -U --strict --no-wrap po/$$lang.po po/templates.pot; \
+       done
+
+po/templates.pot: $(POTFILES)
+       xgettext --language=Python --strict --no-wrap --output=$@ $(POTFILES)
+
+build_mo:
+       @for lang in $(basename $(notdir $(wildcard po/*.po))); do \
+               mkdir -p locale/$$lang/LC_MESSAGES; \
+               msgfmt --statistics -c -o locale/$$lang/LC_MESSAGES/$(TEXT_DOMAIN).mo po/$$lang.po; \
+       done
+
+.PHONES: update_po build_mo
diff --git a/data/high/multilist.png b/data/high/multilist.png
new file mode 100644 (file)
index 0000000..a62085d
Binary files /dev/null and b/data/high/multilist.png differ
diff --git a/data/low/multilist.png b/data/low/multilist.png
new file mode 100644 (file)
index 0000000..d978b6d
Binary files /dev/null and b/data/low/multilist.png differ
diff --git a/data/scale/multilist.png b/data/scale/multilist.png
new file mode 100644 (file)
index 0000000..6caa276
Binary files /dev/null and b/data/scale/multilist.png differ
index f5154e8..7437e34 100644 (file)
@@ -1,3 +1,9 @@
+multilist (0.3.1) unstable; urgency=low
+
+  * I18N
+
+ -- Nikolay Logvinov <NLogvinov@gmail.com> Fri, 13 Mar 2009 13:42:23 +0300
+
 multilist (0.3.0) unstable; urgency=low
 
   * Initial Release.
diff --git a/po/de.po b/po/de.po
new file mode 100644 (file)
index 0000000..7ec3e0f
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,250 @@
+# German translations for multilist package
+# German messages for multilist.
+# Copyright (C) 2009 THE multilist'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the multilist package.
+# Christoph Würstle <chris@axique.de>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: multilist\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-03-13 15:05+0300\n"
+"PO-Revision-Date: 2009-03-13 13:07+0300\n"
+"Last-Translator: Christoph Würstle <chris@axique.de>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+#
+# File: src/multilist, line: 44
+msgid "Multilist is already running. Start anyway? (Could result in db problems!)"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 39
+msgid "New item name:"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 60
+msgid "Delete current item?"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 67
+msgid "No item selected!"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 75
+msgid "Really checkout all items?"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 91
+msgid "New category name:"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 112
+msgid "New list name:"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 141
+msgid "New item"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 148
+msgid "Search:"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 157
+msgid "Checkout all items"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 161
+msgid "Del item"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 109
+msgid "Sync"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 128
+# File: src/multilistclasses/libmultilist.py, line: 246
+msgid "Choose columns"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 215
+msgid "Choose database file"
+msgstr "DB auswählen"
+#
+# File: src/multilistclasses/libmultilist.py, line: 219
+msgid "SQL history"
+msgstr "SQL History anschauen"
+#
+# File: src/multilistclasses/libmultilist.py, line: 223
+msgid "SQL optimize"
+msgstr "SQL optimieren"
+#
+# File: src/multilistclasses/libmultilist.py, line: 227
+msgid "Sync items"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 233
+msgid "Quit"
+msgstr "Beenden"
+#
+# File: src/multilistclasses/libmultilist.py, line: 238
+msgid "File"
+msgstr "Datei"
+#
+# File: src/multilistclasses/libmultilist.py, line: 250
+msgid "Rename Category"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 254
+msgid "Rename List"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 258
+msgid "Tools"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 264
+msgid "About"
+msgstr "Über"
+#
+# File: src/multilistclasses/libmultilist.py, line: 268
+msgid "Help"
+msgstr "Hilfe"
+#
+# File: src/multilistclasses/libmultilist.py, line: 360
+msgid "Select SQL export file"
+msgstr "Wähle SQL-Export-Datei"
+#
+# File: src/multilistclasses/libmultilist.py, line: 390
+msgid "Choose your database file"
+msgstr "Wähle Datenbank-Datei"
+#
+# File: src/multilistclasses/libselection.py, line: 66
+# File: src/multilistclasses/libselection.py, line: 69
+# File: src/multilistclasses/libselection.py, line: 129
+msgid "all"
+msgstr ""
+#
+# File: src/multilistclasses/libselection.py, line: 164
+msgid "List:"
+msgstr ""
+#
+# File: src/multilistclasses/libselection.py, line: 171
+msgid "  Category:"
+msgstr ""
+#
+# File: src/multilistclasses/libselection.py, line: 181
+msgid "  View:"
+msgstr ""
+#
+# File: src/multilistclasses/libselection.py, line: 184
+msgid "All"
+msgstr ""
+#
+# File: src/multilistclasses/libselection.py, line: 186
+msgid "Active"
+msgstr ""
+#
+# File: src/multilistclasses/libsqldialog.py, line: 54
+msgid "SQL History (the past two days):"
+msgstr "SQL History (der letzten 2 Tage (max. 50)):"
+#
+# File: src/multilistclasses/libsqldialog.py, line: 57
+msgid "Export"
+msgstr ""
+#
+# File: src/multilistclasses/libsqldialog.py, line: 73
+msgid "Date"
+msgstr "Datum"
+#
+# File: src/multilistclasses/libsqldialog.py, line: 74
+msgid "SQL"
+msgstr ""
+#
+# File: src/multilistclasses/libsqldialog.py, line: 75
+msgid "Parameter"
+msgstr ""
+#
+# File: src/multilistclasses/libsqldialog.py, line: 116
+msgid " (Reduced parameter) "
+msgstr " (Parameter gekürzt) "
+#
+# File: src/multilistclasses/libsync.py, line: 44
+msgid "Sync process"
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 49
+msgid "Sync process running...please wait"
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 51
+msgid "(this can take some minutes)"
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 91
+msgid "Query"
+msgstr "Abfrage"
+#
+# File: src/multilistclasses/libsync.py, line: 198
+# File: src/multilistclasses/libsync.py, line: 290
+msgid "sync process running"
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 243
+msgid "Syncserver running..."
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 251
+msgid "Sync server could not start. Please check IP and port."
+msgstr "Konnte Sync-Server nicht starten. Bitte IP und Port überprüfen."
+#
+# File: src/multilistclasses/libsync.py, line: 264
+msgid "Syncserver not running..."
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 281
+# File: src/multilistclasses/libsync.py, line: 317
+# File: src/multilistclasses/libsync.py, line: 325
+# File: src/multilistclasses/libsync.py, line: 332
+# File: src/multilistclasses/libsync.py, line: 424
+msgid "no sync process (at the moment)"
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 319
+msgid "Synchronization successfully completed"
+msgstr "Synchronisation erfolgreich beendet"
+#
+# File: src/multilistclasses/libsync.py, line: 326
+msgid "The clocks are not synchronized between stations"
+msgstr "Zeit differiert zu viel zwischen den Systemen"
+#
+# File: src/multilistclasses/libsync.py, line: 333
+msgid "Sync failed, reason: "
+msgstr "Sync gescheitert. Fehler:"
+#
+# File: src/multilistclasses/libsync.py, line: 389
+msgid "Local SyncServer (port "
+msgstr "LokalerSync-Server (Port "
+#
+# File: src/multilistclasses/libsync.py, line: 407
+msgid "Start SyncServer"
+msgstr "SyncServer starten"
+#
+# File: src/multilistclasses/libsync.py, line: 411
+msgid "Syncserver not running"
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 414
+msgid "RemoteSync-Server (Port "
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 420
+msgid "Connect to remote SyncServer"
+msgstr "Verbinde zu Remote-SyncServer"
+#
+# File: src/multilistclasses/libview.py, line: 63
+msgid "Columns"
+msgstr ""
diff --git a/po/ru.po b/po/ru.po
new file mode 100644 (file)
index 0000000..c12ba2b
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,249 @@
+# Russian translations for multilist package
+# Copyright (C) 2008 THE multilist'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the multilist package.
+# Nikolay Logvinov <NLogvinov@gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: multilist\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-03-13 15:05+0300\n"
+"PO-Revision-Date: 2009-03-13 05:07+0400\n"
+"Last-Translator: Nikolay Logvinov <NLogvinov@gmail.com>\n"
+"Language-Team: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+#
+# File: src/multilist, line: 44
+msgid "Multilist is already running. Start anyway? (Could result in db problems!)"
+msgstr ""
+#
+# File: src/multilistclasses/libbottombar.py, line: 39
+msgid "New item name:"
+msgstr "Новый элемент"
+#
+# File: src/multilistclasses/libbottombar.py, line: 60
+msgid "Delete current item?"
+msgstr "Удалить текущий элемент?"
+#
+# File: src/multilistclasses/libbottombar.py, line: 67
+msgid "No item selected!"
+msgstr "Сначала выберите элемент"
+#
+# File: src/multilistclasses/libbottombar.py, line: 157
+msgid "Really checkout all items?"
+msgstr "Снять все пометки?"
+#
+# File: src/multilistclasses/libbottombar.py, line: 91
+msgid "New category name:"
+msgstr "Новая категория"
+#
+# File: src/multilistclasses/libbottombar.py, line: 112
+msgid "New list name:"
+msgstr "Новый список"
+#
+# File: src/multilistclasses/libbottombar.py, line: 141
+msgid "New item"
+msgstr "Добавить элемент"
+#
+# File: src/multilistclasses/libbottombar.py, line: 148
+msgid "Search:"
+msgstr "Искать:"
+#
+# File: src/multilistclasses/libbottombar.py, line: 157
+msgid "Checkout all items"
+msgstr "Снять все пометки"
+#
+# File: src/multilistclasses/libbottombar.py, line: 161
+msgid "Del item"
+msgstr "Удалить"
+#
+# File: src/multilistclasses/libmultilist.py, line: 109
+msgid "Sync"
+msgstr "Синхронизация"
+#
+# File: src/multilistclasses/libmultilist.py, line: 128
+# File: src/multilistclasses/libmultilist.py, line: 246
+msgid "Choose columns"
+msgstr "Выбрать столбцы"
+#
+# File: src/multilistclasses/libmultilist.py, line: 215
+msgid "Choose database file"
+msgstr "Выберите файл для хранения списков"
+#
+# File: src/multilistclasses/libmultilist.py, line: 219
+msgid "SQL history"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 223
+msgid "SQL optimize"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 227
+msgid "Sync items"
+msgstr "Синхронизация"
+#
+# File: src/multilistclasses/libmultilist.py, line: 233
+msgid "Quit"
+msgstr "Выход"
+#
+# File: src/multilistclasses/libmultilist.py, line: 238
+msgid "File"
+msgstr "Файл"
+#
+# File: src/multilistclasses/libmultilist.py, line: 250
+msgid "Rename Category"
+msgstr "Изменить название категории"
+#
+# File: src/multilistclasses/libmultilist.py, line: 254
+msgid "Rename List"
+msgstr "Изменить имя списка"
+#
+# File: src/multilistclasses/libmultilist.py, line: 258
+msgid "Tools"
+msgstr "Инструменты"
+#
+# File: src/multilistclasses/libmultilist.py, line: 264
+msgid "About"
+msgstr "О программе"
+#
+# File: src/multilistclasses/libmultilist.py, line: 268
+msgid "Help"
+msgstr "Справка"
+#
+# File: src/multilistclasses/libmultilist.py, line: 360
+msgid "Select SQL export file"
+msgstr ""
+#
+# File: src/multilistclasses/libmultilist.py, line: 390
+msgid "Choose your database file"
+msgstr "Выберите файл для хранения списков"
+#
+# File: src/multilistclasses/libselection.py, line: 66
+# File: src/multilistclasses/libselection.py, line: 69
+# File: src/multilistclasses/libselection.py, line: 129
+msgid "all"
+msgstr "всё"
+#
+# File: src/multilistclasses/libselection.py, line: 164
+msgid "List:"
+msgstr "Список:"
+#
+# File: src/multilistclasses/libselection.py, line: 171
+msgid "  Category:"
+msgstr "  Категория:"
+#
+# File: src/multilistclasses/libselection.py, line: 181
+msgid "  View:"
+msgstr "  Смотреть:"
+#
+# File: src/multilistclasses/libselection.py, line: 184
+msgid "All"
+msgstr "Все"
+#
+# File: src/multilistclasses/libselection.py, line: 186
+msgid "Active"
+msgstr "Используемые"
+#
+# File: src/multilistclasses/libsqldialog.py, line: 54
+msgid "SQL History (the past two days):"
+msgstr ""
+#
+# File: src/multilistclasses/libsqldialog.py, line: 57
+msgid "Export"
+msgstr ""
+#
+# File: src/multilistclasses/libsqldialog.py, line: 73
+msgid "Date"
+msgstr "Дата"
+#
+# File: src/multilistclasses/libsqldialog.py, line: 74
+msgid "SQL"
+msgstr ""
+#
+# File: src/multilistclasses/libsqldialog.py, line: 75
+msgid "Parameter"
+msgstr "Параметры"
+#
+# File: src/multilistclasses/libsqldialog.py, line: 116
+msgid " (Reduced parameter) "
+msgstr ""
+#
+# File: src/multilistclasses/libsync.py, line: 44
+msgid "Sync process"
+msgstr "Синхронизация"
+#
+# File: src/multilistclasses/libsync.py, line: 49
+msgid "Sync process running...please wait"
+msgstr "Синхронизируются списки, подождите ..."
+#
+# File: src/multilistclasses/libsync.py, line: 51
+msgid "(this can take some minutes)"
+msgstr "(некоторое время)"
+#
+# File: src/multilistclasses/libsync.py, line: 91
+msgid "Query"
+msgstr "Запрос"
+#
+# File: src/multilistclasses/libsync.py, line: 198
+# File: src/multilistclasses/libsync.py, line: 290
+msgid "sync process running"
+msgstr "идёт синхронизация"
+#
+# File: src/multilistclasses/libsync.py, line: 243
+msgid "Syncserver running..."
+msgstr "Сервер синхронизации работает ..."
+#
+# File: src/multilistclasses/libsync.py, line: 251
+msgid "Sync server could not start. Please check IP and port."
+msgstr "Не удаётся стартовать Сервер синхронизации. Проверьте IP-адрес и порт."
+#
+# File: src/multilistclasses/libsync.py, line: 264
+msgid "Syncserver not running..."
+msgstr "Сервер синхронизации остановлен ..."
+#
+# File: src/multilistclasses/libsync.py, line: 281
+# File: src/multilistclasses/libsync.py, line: 317
+# File: src/multilistclasses/libsync.py, line: 325
+# File: src/multilistclasses/libsync.py, line: 332
+# File: src/multilistclasses/libsync.py, line: 424
+msgid "no sync process (at the moment)"
+msgstr "сейчас синхронизация не выполняется"
+#
+# File: src/multilistclasses/libsync.py, line: 319
+msgid "Synchronization successfully completed"
+msgstr "Синхронизация успешно завершенa"
+#
+# File: src/multilistclasses/libsync.py, line: 326
+msgid "The clocks are not synchronized between stations"
+msgstr "Согласуйте время между системами"
+#
+# File: src/multilistclasses/libsync.py, line: 333
+msgid "Sync failed, reason: "
+msgstr "Синхронизовать заметки не удалось по причине: "
+#
+# File: src/multilistclasses/libsync.py, line: 414
+msgid "Local SyncServer (port "
+msgstr "Местный сервер синхронизации (порт "
+#
+# File: src/multilistclasses/libsync.py, line: 407
+msgid "Start SyncServer"
+msgstr "Запуск сервера синхронизации"
+#
+# File: src/multilistclasses/libsync.py, line: 411
+msgid "Syncserver not running"
+msgstr "Сервер синхронизации остановлен"
+#
+# File: src/multilistclasses/libsync.py, line: 414
+msgid "RemoteSync-Server (Port "
+msgstr "Удалённый сервер синхронизации (порт "
+#
+# File: src/multilistclasses/libsync.py, line: 420
+msgid "Connect to remote SyncServer"
+msgstr "Установить соединение"
+#
+# File: src/multilistclasses/libview.py, line: 63
+msgid "Columns"
+msgstr "Столбцы"
index 6cd82e4..fe9ac07 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -17,5 +17,8 @@ setup(name='multilist',
                     #('share/pixmaps',             ['data/multilist.png']),                
                     ('share/applications/hildon', ['data/multilist.desktop']),           
                     ('share/dbus-1/services',     ['data/multilist.service']),      
+                    # I18N
+                    ('share/locale/de/LC_MESSAGES', ['locale/de/LC_MESSAGES/multilist.mo']),
+                    ('share/locale/ru/LC_MESSAGES', ['locale/ru/LC_MESSAGES/multilist.mo']),
                     ]
-      ) 
\ No newline at end of file
+      ) 
index db1de34..aa7cc92 100755 (executable)
 
 import os
 import sys
+
+##
+## I18N
+##
+import locale
+import gettext
+gettext.install('multilist', unicode=1)
                        
 if __name__ == "__main__":
        
@@ -34,7 +41,7 @@ if __name__ == "__main__":
        except OSError:
                ## Failed: another instance is running
                
-               mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_ERROR,gtk.BUTTONS_YES_NO,"Multilist already runnging.Start anyway? (Could result in db problems!)") 
+               mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_ERROR,gtk.BUTTONS_YES_NO,_("Multilist is already running. Start anyway? (Could result in db problems!)")) 
                response=mbox.run() 
                mbox.hide() 
                mbox.destroy() 
index 160787c..654c72d 100644 (file)
@@ -36,7 +36,7 @@ class Bottombar(gtk.HBox):
 
                
        def new_item(self,widget=None,data1=None,data2=None):
-               dialog = gtk.Dialog("New item name:",None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+               dialog = gtk.Dialog(_("New item name:"),None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
                
                dialog.set_position(gtk.WIN_POS_CENTER)
                entryKlasse=gtk.Entry()
@@ -57,14 +57,14 @@ class Bottombar(gtk.HBox):
        def del_item(self,widget=None,data1=None,data2=None):
                path, col = self.view.treeview.get_cursor()
                if path!=None:
-                       mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_QUESTION,gtk.BUTTONS_YES_NO,"Delete current item?") 
+                       mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_QUESTION,gtk.BUTTONS_YES_NO,_("Delete current item?")) 
                        response=mbox.run() 
                        mbox.hide() 
                        mbox.destroy() 
                        if response==gtk.RESPONSE_YES:
                                self.view.del_active_row()
                else:
-                       mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_ERROR,gtk.BUTTONS_OK,"No item selected!") 
+                       mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_ERROR,gtk.BUTTONS_OK,_("No item selected!")) 
                        response=mbox.run() 
                        mbox.hide() 
                        mbox.destroy()                  
@@ -72,7 +72,7 @@ class Bottombar(gtk.HBox):
                
        def checkout_items(self,widget=None,data1=None,data2=None):
                #self.view.del_active_row()
-               mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_QUESTION,gtk.BUTTONS_YES_NO,"Really checlout all items?") 
+               mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_QUESTION,gtk.BUTTONS_YES_NO,(_("Really checkout all items?"))) 
                response=mbox.run() 
                mbox.hide() 
                mbox.destroy() 
@@ -88,7 +88,7 @@ class Bottombar(gtk.HBox):
                        
        
        def rename_category(self,widget=None,data1=None,data2=None):
-               dialog = gtk.Dialog("New categrory name:",None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+               dialog = gtk.Dialog(_("New category name:"),None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
                
                dialog.set_position(gtk.WIN_POS_CENTER)
                entryKlasse=gtk.Entry()
@@ -109,7 +109,7 @@ class Bottombar(gtk.HBox):
                
                
        def rename_list(self,widget=None,data1=None,data2=None):
-               dialog = gtk.Dialog("New list name:",None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+               dialog = gtk.Dialog(_("New list name:"),None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
                
                dialog.set_position(gtk.WIN_POS_CENTER)
                entryKlasse=gtk.Entry()
@@ -138,14 +138,14 @@ class Bottombar(gtk.HBox):
                logging.info("libBottomBar, init")
                        
                
-               button=gtk.Button("New item")
+               button=gtk.Button(_("New item"))
                button.connect("clicked",self.new_item)
                self.pack_start(button, expand=False, fill=True, padding=0)
                
                label=gtk.Label("  ")
                self.pack_start(label, expand=True, fill=True, padding=0)
                
-               label=gtk.Label("Search:")
+               label=gtk.Label(_("Search:"))
                self.pack_start(label, expand=False, fill=True, padding=0)
                searchEntry=gtk.Entry()
                searchEntry.connect("changed",self.search_list)
@@ -154,13 +154,13 @@ class Bottombar(gtk.HBox):
                label=gtk.Label("  ")
                self.pack_start(label, expand=True, fill=True, padding=0)
                
-               button=gtk.Button("Checkout all items")
+               button=gtk.Button(_("Checkout all items"))
                button.connect("clicked",self.checkout_items)
                self.pack_start(button, expand=False, fill=True, padding=0)
                
-               button=gtk.Button("Del item")
+               button=gtk.Button(_("Del item"))
                button.connect("clicked",self.del_item)
                self.pack_start(button, expand=False, fill=True, padding=0)
                
                
-               
\ No newline at end of file
+               
index 28b489d..69321c6 100755 (executable)
@@ -106,7 +106,7 @@ class multilistclass(hildon.Program):
                
        
        def prepare_sync_dialog(self):
-               self.sync_dialog = gtk.Dialog("Sync",None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+               self.sync_dialog = gtk.Dialog(_("Sync"),None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
                
                self.sync_dialog.set_position(gtk.WIN_POS_CENTER)
                sync=libsync.Sync(self.db,self.window,50503)
@@ -125,7 +125,7 @@ class multilistclass(hildon.Program):
 
 
        def show_columns_dialog(self,widget=None,data=None):
-               col_dialog = gtk.Dialog("Choose columns",self.window,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+               col_dialog = gtk.Dialog(_("Choose columns"),self.window,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
                
                col_dialog.set_position(gtk.WIN_POS_CENTER)
                cols=libview.Columns_dialog(self.db,self.liststorehandler)
@@ -212,30 +212,30 @@ class multilistclass(hildon.Program):
                #Menue
                dateimenu = gtk.Menu()
                
-               menu_items = gtk.MenuItem("DB auswählen")
+               menu_items = gtk.MenuItem(_("Choose database file"))
                dateimenu.append(menu_items)
                menu_items.connect("activate", self.select_db_dialog, None)
                
-               menu_items = gtk.MenuItem("SQL History anschauen")
+               menu_items = gtk.MenuItem(_("SQL history"))
                dateimenu.append(menu_items)
                menu_items.connect("activate", self.view_sql_history, None)
                
-               menu_items = gtk.MenuItem("SQL optimieren")
+               menu_items = gtk.MenuItem(_("SQL optimize"))
                dateimenu.append(menu_items)
                menu_items.connect("activate", self.optimizeSQL, None)
                
-               menu_items = gtk.MenuItem("Sync items")
+               menu_items = gtk.MenuItem(_("Sync items"))
                self.prepare_sync_dialog()
                dateimenu.append(menu_items)
                menu_items.connect("activate", self.sync_notes, None)
                
                
-               menu_items = gtk.MenuItem("Beenden")
+               menu_items = gtk.MenuItem(_("Quit"))
                dateimenu.append(menu_items)
                menu_items.connect("activate", self.destroy, None)
                #menu_items.show()
                
-               datei_menu = gtk.MenuItem("Datei")
+               datei_menu = gtk.MenuItem(_("File"))
                datei_menu.show()
                datei_menu.set_submenu(dateimenu)
                
@@ -243,29 +243,29 @@ class multilistclass(hildon.Program):
                toolsmenu = gtk.Menu()
                
                
-               menu_items = gtk.MenuItem("Choose columns")
+               menu_items = gtk.MenuItem(_("Choose columns"))
                toolsmenu.append(menu_items)
                menu_items.connect("activate", self.show_columns_dialog, None)
                
-               menu_items = gtk.MenuItem("Rename Category")
+               menu_items = gtk.MenuItem(_("Rename Category"))
                toolsmenu.append(menu_items)
                menu_items.connect("activate", self.bottombar.rename_category, None)
                
-               menu_items = gtk.MenuItem("Rename List")
+               menu_items = gtk.MenuItem(_("Rename List"))
                toolsmenu.append(menu_items)
                menu_items.connect("activate", self.bottombar.rename_list, None)
                
-               tools_menu = gtk.MenuItem("Tools")
+               tools_menu = gtk.MenuItem(_("Tools"))
                tools_menu.show()
                tools_menu.set_submenu(toolsmenu)
                
                
                hilfemenu = gtk.Menu()
-               menu_items = gtk.MenuItem("Über")
+               menu_items = gtk.MenuItem(_("About"))
                hilfemenu.append(menu_items)
                menu_items.connect("activate", self.show_about, None)
                
-               hilfe_menu = gtk.MenuItem("Hilfe")
+               hilfe_menu = gtk.MenuItem(_("Help"))
                hilfe_menu.show()
                hilfe_menu.set_submenu(hilfemenu)
                
@@ -357,7 +357,7 @@ class multilistclass(hildon.Program):
                                #dlg = hildon.FileChooserDialog(parent = self.window, action = gtk.FILE_CHOOSER_ACTION_SAVE)
                                dlg=hildon.FileChooserDialog(self.window, gtk.FILE_CHOOSER_ACTION_SAVE)
                        
-                       dlg.set_title("Wähle SQL-Export-Datei")
+                       dlg.set_title(_("Select SQL export file"))
                        if dlg.run() == gtk.RESPONSE_OK:
                                fileName = dlg.get_filename()
                                dlg.destroy()
@@ -387,7 +387,7 @@ class multilistclass(hildon.Program):
                
                if self.db.ladeDirekt('datenbank'):
                        dlg.set_filename(self.db.ladeDirekt('datenbank'))
-               dlg.set_title("Wähle Datenbank-Datei")
+               dlg.set_title(_("Choose your database file"))
                if dlg.run() == gtk.RESPONSE_OK:
                        fileName = dlg.get_filename()
                        self.db.speichereDirekt('datenbank',fileName)
index a740d4e..9ab8651 100644 (file)
@@ -63,10 +63,10 @@ class Selection(gtk.HBox):
                sql="SELECT DISTINCT category FROM items WHERE list=? ORDER BY category"
                rows=self.db.ladeSQL(sql,(self.get_list(),))
                
-               self.comboCategory.append_text("all")
+               self.comboCategory.append_text(_("all"))
                if ((rows!=None)and(len(rows)>0)):
                        for row in rows:
-                               if (row[0]!="all"):
+                               if (row[0]!=_("all")):
                                        self.comboCategory.append_text(row[0])
                
                s=self.db.ladeDirekt("comboCategoryText"+self.comboList.get_child().get_text())
@@ -126,7 +126,7 @@ class Selection(gtk.HBox):
        
        def get_category(self,select=False):
                s=self.comboCategory.get_child().get_text()
-               if s=="all":
+               if s==_("all"):
                        if (select==False):
                                return "undefined"
                        else:
@@ -161,14 +161,14 @@ class Selection(gtk.HBox):
                logging.info("libSelection, init")
                        
                
-               label=gtk.Label("List:")
+               label=gtk.Label(_("List:"))
                self.pack_start(label, expand=False, fill=True, padding=0)
                
                self.comboList = gtk.combo_box_entry_new_text()
                self.comboList.set_size_request(180,-1)
                self.pack_start(self.comboList, expand=False, fill=True, padding=0)
                        
-               label=gtk.Label("  Category:")
+               label=gtk.Label(_("  Category:"))
                self.pack_start(label, expand=False, fill=True, padding=0)
                
                self.comboCategory = gtk.combo_box_entry_new_text()
@@ -178,14 +178,14 @@ class Selection(gtk.HBox):
                self.comboList.connect("changed", self.comboList_changed, None)
                self.comboCategory.connect("changed", self.comboCategory_changed, None)
                
-               label=gtk.Label("  View:")
+               label=gtk.Label(_("  View:"))
                self.pack_start(label, expand=False, fill=True, padding=0)
                
-               self.radio_all=gtk.RadioButton(group=None, label="All", use_underline=True)
+               self.radio_all=gtk.RadioButton(group=None, label=_("All"), use_underline=True)
                self.pack_start(self.radio_all, expand=False, fill=True, padding=0)
-               self.radio_active=gtk.RadioButton(group=self.radio_all, label="Active", use_underline=True)
+               self.radio_active=gtk.RadioButton(group=self.radio_all, label=_("Active"), use_underline=True)
                self.pack_start(self.radio_active, expand=False, fill=True, padding=0)
                self.radio_all.connect("toggled",self.radioActive_changed, None)
                
                
-               
\ No newline at end of file
+               
index a7bad6a..2f384a8 100755 (executable)
@@ -51,10 +51,10 @@ class sqlDialog(gtk.Dialog):
                
                logging.info("sqldialog, init")
                
-               gtk.Dialog.__init__(self,"SQL History (der letzten 2 Tage (max. 50)):",None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+               gtk.Dialog.__init__(self,_("SQL History (the past two days):"),None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
                
                
-               self.add_button("Export", 444)
+               self.add_button(_("Export"), 444)
                self.set_position(gtk.WIN_POS_CENTER)
                
                
@@ -70,9 +70,9 @@ class sqlDialog(gtk.Dialog):
                #self.cell1.set_property('markup', 1)
                
                # create the TreeViewColumns to display the data
-               self.tvcolumn1 = gtk.TreeViewColumn('Datum')
-               self.tvcolumn2 = gtk.TreeViewColumn('SQL')
-               self.tvcolumn3 = gtk.TreeViewColumn('Parameter')
+               self.tvcolumn1 = gtk.TreeViewColumn(_('Date'))
+               self.tvcolumn2 = gtk.TreeViewColumn(_('SQL'))
+               self.tvcolumn3 = gtk.TreeViewColumn(_('Parameter'))
                
                # add columns to treeview
                self.treeview.append_column(self.tvcolumn1)
@@ -113,7 +113,7 @@ class sqlDialog(gtk.Dialog):
                        pcdatum,sql,param = row
                        datum=str(time.strftime("%d.%m.%y %H:%M:%S ", (time.localtime(pcdatum))))
                        if len(param)>100:
-                               param=param[:20]+" (Parameter gekürzt) "+param[20:]
+                               param=param[:20]+_(" (Reduced parameter) ")+param[20:]
                        self.liststore.append([datum, sql,param])
                        i+=1
                        if (i>50):
index 26d7967..a793a16 100755 (executable)
@@ -41,14 +41,14 @@ class ProgressDialog(gtk.Dialog):
                #self.progressbar.pulse()
                pass
        
-       def __init__(self,title="Sync process", parent=None):
+       def __init__(self,title=_("Sync process"), parent=None):
                gtk.Dialog.__init__(self,title,parent,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,())
                
                logging.info("ProgressDialog, init")
                
-               label=gtk.Label("Sync process running...please wait")
+               label=gtk.Label(_("Sync process running...please wait"))
                self.vbox.pack_start(label, True, True, 0)
-               label=gtk.Label("(this can take some minutes)")
+               label=gtk.Label(_("(this can take some minutes)"))
                self.vbox.pack_start(label, True, True, 0)
                
                #self.progressbar=gtk.ProgressBar()
@@ -88,7 +88,7 @@ class Sync(gtk.VBox):
                
        
        def getUeberblickBox(self):
-               frame=gtk.Frame("Abfrage")
+               frame=gtk.Frame(_("Query"))
                return frame
                        
        def handleRPC(self):
@@ -195,7 +195,7 @@ class Sync(gtk.VBox):
        def doSync(self,sync_uuid,pcdatum,newSQLs,pcdatumjetzt):
                #print uuid,pcdatum,newSQLs
                #logging.info("doSync 0")
-               self.changeSyncStatus(True,"sync process running")
+               self.changeSyncStatus(True,_("sync process running"))
                self.pulse()
                #logging.info("doSync 1")
                
@@ -240,7 +240,7 @@ class Sync(gtk.VBox):
                                self.poll=select.poll()
                                self.poll.register(self.rpcserver.fileno())
                                gobject.timeout_add(1000, self.handleRPC)
-                               self.syncServerStatusLabel.set_text("Syncserver running...")
+                               self.syncServerStatusLabel.set_text(_("Syncserver running..."))
                        
                                #save
                                self.db.speichereDirekt("startSyncServer",True)
@@ -248,7 +248,7 @@ class Sync(gtk.VBox):
                        except:
                                s=str(sys.exc_info())
                                logging.error("libsync: could not start server. Error: "+s)
-                               mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_ERROR,gtk.BUTTONS_OK,"Konnte Sync-Server nicht starten. Bitte IP und Port überprüfen.") #gtk.DIALOG_MODAL
+                               mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_ERROR,gtk.BUTTONS_OK,_("Sync server could not start. Please check IP and port.")) #gtk.DIALOG_MODAL
                                mbox.set_modal(False)
                                response=mbox.run() 
                                mbox.hide() 
@@ -261,7 +261,7 @@ class Sync(gtk.VBox):
                                del self.rpcserver      
                        except:
                                pass
-                       self.syncServerStatusLabel.set_text("Syncserver not running...")
+                       self.syncServerStatusLabel.set_text(_("Syncserver not running..."))
                        #save
                        self.db.speichereDirekt("startSyncServer",False)
                
@@ -278,7 +278,7 @@ class Sync(gtk.VBox):
                sql="INSERT INTO sync (syncpartner,uuid,pcdatum) VALUES (?,?,?)"
                self.db.speichereSQL(sql,("x",str(sync_uuid),pcdatum),log=False)
                self.pulse()
-               self.changeSyncStatus(False,"no sync process (at the moment)")
+               self.changeSyncStatus(False,_("no sync process (at the moment)"))
                return (self.sync_uuid,pcdatum)
                
        
@@ -287,7 +287,7 @@ class Sync(gtk.VBox):
                #sql="DELETE FROM logtable WHERE sql LIKE externeStundenplanung"
                #self.db.speichereSQL(sql)
                
-               self.changeSyncStatus(True,"sync process running")
+               self.changeSyncStatus(True,_("sync process running"))
                while (gtk.events_pending()):
                        gtk.main_iteration();
 
@@ -314,23 +314,23 @@ class Sync(gtk.VBox):
                                sync_uuid, finalpcdatum=self.server.doSaveFinalTime(self.sync_uuid)
                                self.doSaveFinalTime(sync_uuid, finalpcdatum)
                        
-                               self.changeSyncStatus(False,"no sync process (at the moment)")
+                               self.changeSyncStatus(False,_("no sync process (at the moment)"))
                                
-                               mbox =  gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_INFO,gtk.BUTTONS_OK,"Synchronisation erfolgreich beendet") 
+                               mbox =  gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_INFO,gtk.BUTTONS_OK,_("Synchronization successfully completed"))
                                response = mbox.run() 
                                mbox.hide() 
                                mbox.destroy() 
                        else:
                                logging.warning("Zeitdiff zu groß/oder anderer db-Fehler")
-                               self.changeSyncStatus(False,"no sync process (at the moment)")
-                               mbox =  gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_INFO,gtk.BUTTONS_OK,"Zeit differiert zu viel zwischen den Systemen") 
+                               self.changeSyncStatus(False,_("no sync process (at the moment)"))
+                               mbox =  gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_INFO,gtk.BUTTONS_OK,_("The clocks are not synchronized between stations"))
                                response = mbox.run() 
                                mbox.hide() 
                                mbox.destroy() 
                except:
                                logging.warning("Sync connect failed")
-                               self.changeSyncStatus(False,"no sync process (at the moment)")
-                               mbox =  gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_INFO,gtk.BUTTONS_OK,"Sync gescheitert. Fehler:"+str(sys.exc_info()))
+                               self.changeSyncStatus(False,_("no sync process (at the moment)"))
+                               mbox =  gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_INFO,gtk.BUTTONS_OK,_("Sync failed, reason: ")+unicode(sys.exc_info()[1][1]))
                                response = mbox.run() 
                                mbox.hide() 
                                mbox.destroy() 
@@ -367,6 +367,7 @@ class Sync(gtk.VBox):
                if (rows==None)or(len(rows)!=1):
                        sql="DELETE FROM sync WHERE syncpartner=?"
                        self.db.speichereSQL(sql,("self",),log=False)
+
                        #uuid1=uuid()
                        #print "Sync, 3b"
                        
@@ -385,8 +386,8 @@ class Sync(gtk.VBox):
                #print "Sync, 4"
 
                
-               frame=gtk.Frame("LokalerSync-Server (Port "+str(self.port)+")")
-               
+               frame=gtk.Frame(_("Local SyncServer (port ")+str(self.port)+")")
+       
                
                
                self.comboIP=gtk.combo_box_entry_new_text()
@@ -403,24 +404,24 @@ class Sync(gtk.VBox):
                #print "Sync, 4e"
                
                frame.add(self.comboIP)
-               serverbutton=gtk.ToggleButton("SyncServer starten")
+               serverbutton=gtk.ToggleButton(_("Start SyncServer"))
                serverbutton.connect("clicked",self.startServer,(None,))
                self.pack_start(frame, expand=False, fill=True, padding=1)
                self.pack_start(serverbutton, expand=False, fill=True, padding=1)
-               self.syncServerStatusLabel=gtk.Label("Syncserver not running")
+               self.syncServerStatusLabel=gtk.Label(_("Syncserver not running"))
                self.pack_start(self.syncServerStatusLabel, expand=False, fill=True, padding=1)         
                                
-               frame=gtk.Frame("RemoteSync-Server (Port "+str(self.port)+")")
+               frame=gtk.Frame(_("RemoteSync-Server (Port ")+str(self.port)+")")
                self.comboRemoteIP=gtk.combo_box_entry_new_text()
                self.comboRemoteIP.append_text("192.168.0.?")
                self.comboRemoteIP.append_text("192.168.1.?")
                self.comboRemoteIP.append_text("192.168.176.?")
                frame.add(self.comboRemoteIP)
-               syncbutton=gtk.Button("Verbinde zu Remote-SyncServer")
+               syncbutton=gtk.Button(_("Connect to remote SyncServer"))
                syncbutton.connect("clicked",self.syncButton,(None,))
                self.pack_start(frame, expand=False, fill=True, padding=1)
                self.pack_start(syncbutton, expand=False, fill=True, padding=1)
-               self.syncStatusLabel=gtk.Label("no sync process (at the moment)")
+               self.syncStatusLabel=gtk.Label(_("no sync process (at the moment)"))
                self.pack_start(self.syncStatusLabel, expand=False, fill=True, padding=1)
 
 
@@ -432,4 +433,4 @@ class Sync(gtk.VBox):
                if (self.db.ladeDirekt("startSyncServer",False)==True):
                        serverbutton.set_active(True)
                        
-               #print "Sync, 9"
\ No newline at end of file
+               #print "Sync, 9"
index eeeef16..481464c 100644 (file)
@@ -60,7 +60,7 @@ class Columns_dialog(gtk.VBox):
                #self.pack_start(serverbutton, expand=False, fill=True, padding=1)
                #print "x1"
                
-               frame=gtk.Frame("Columns")
+               frame=gtk.Frame(_("Columns"))
                self.framebox=gtk.VBox(homogeneous=False, spacing=0)
                
                self.scrolled_window = gtk.ScrolledWindow()