changeset 34:875ff127b2dd

- i18n management: gettext integration + french translation - added misc files to distribution
author Goffi <goffi@goffi.org>
date Tue, 28 Dec 2010 21:48:01 +0100
parents 8147568448cd
children 5a8e2200ddc0
files README fr.po i18n/fr/LC_MESSAGES/urwid_satext.mo setup.py urwid_satext.po urwid_satext/files_management.py
diffstat 6 files changed, 146 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/README	Tue Dec 28 21:46:25 2010 +0100
+++ b/README	Tue Dec 28 21:48:01 2010 +0100
@@ -38,7 +38,8 @@
 
 ** How to use it ? **
 
-You can see the documentation on http://wiki.goffi.org/wiki/urwid-satext .
+You can see the documentation at http://wiki.goffi.org/wiki/urwid-satext .
+Also check examples directory.
 
 ** Credit **
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fr.po	Tue Dec 28 21:48:01 2010 +0100
@@ -0,0 +1,67 @@
+# urwid-satext french translation file.
+# Copyright (C) 2009, 2010 Jérôme Poisson
+# This file is distributed under the same license as the urwid-satext package.
+# Jérôme Poisson <goffi@goffi.org>, 2009, 2010.
+# Goffi <goffi@goffi.org>, 2009.
+# Jérôme Poisson (Goffi) <goffi@goffi.org>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-12-28 20:10+0100\n"
+"PO-Revision-Date: 2010-12-28 20:28+0100\n"
+"Last-Translator: Jérôme Poisson (Goffi) <goffi@goffi.org>\n"
+"Language-Team: french <goffi@goffi.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: urwid_satext/files_management.py:109
+msgid "Impossible to list directory"
+msgstr "Impossible de lister les répertoires"
+
+#: urwid_satext/files_management.py:134
+msgid "Please select a file"
+msgstr "Veuillez choisir un fichier"
+
+#: urwid_satext/files_management.py:141
+msgid "Path: "
+msgstr "Chemin: "
+
+#: urwid_satext/files_management.py:154
+msgid "Bookmarks"
+msgstr "Favoris"
+
+#: urwid_satext/files_management.py:160 urwid_satext/sat_widgets.py:740
+msgid "Cancel"
+msgstr "Annuler"
+
+#: urwid_satext/files_management.py:203
+msgid "No GTK bookmarks file found"
+msgstr "Fichier de favoris GTK non trouvé"
+
+#: urwid_satext/files_management.py:213
+msgid "No KDE bookmarks file found"
+msgstr "Fichier de favoris KDE non trouvé"
+
+#: urwid_satext/sat_widgets.py:164
+msgid "WARNING: unknown text type"
+msgstr "ATTENTION: type de texte inconnu"
+
+#: urwid_satext/sat_widgets.py:741 urwid_satext/sat_widgets.py:749
+msgid "Ok"
+msgstr "Ok"
+
+#: urwid_satext/sat_widgets.py:745
+msgid "Yes"
+msgstr "Oui"
+
+#: urwid_satext/sat_widgets.py:746
+msgid "No"
+msgstr "Non"
+
+#: urwid_satext/sat_widgets.py:962
+msgid "INTERNAL ERROR: Tab not found"
+msgstr "ERREUR INTERNE: Onglet non trouvé"
Binary file i18n/fr/LC_MESSAGES/urwid_satext.mo has changed
--- a/setup.py	Tue Dec 28 21:46:25 2010 +0100
+++ b/setup.py	Tue Dec 28 21:48:01 2010 +0100
@@ -2,12 +2,19 @@
 # -*- coding: utf-8 -*-
 
 from distutils.core import setup
+import sys
+from os import path
 
-setup(name='urwid-satext',
+name = 'urwid_satext'
+
+setup(name=name,
       version='0.1.0',
       description=u'SàT extension widgets for Urwid',
       author='Goffi (Jérôme Poisson)',
       author_email='goffi@goffi.org',
       url='http://wiki.goffi.org/wiki/Urwid-satext',
       packages=['urwid_satext'],
+      data_files=[(path.join(sys.prefix,'share/locale/fr/LC_MESSAGES'), ['i18n/fr/LC_MESSAGES/urwid_satext.mo']),
+                  ('share/doc/%s/examples' % name, ["examples/file_dialog.py"]),
+                  ('share/doc/%s' % name, ['COPYING','COPYING.LESSER','README'])]
      )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/urwid_satext.po	Tue Dec 28 21:48:01 2010 +0100
@@ -0,0 +1,66 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-12-28 20:10+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: urwid_satext/files_management.py:109
+msgid "Impossible to list directory"
+msgstr ""
+
+#: urwid_satext/files_management.py:134
+msgid "Please select a file"
+msgstr ""
+
+#: urwid_satext/files_management.py:141
+msgid "Path: "
+msgstr ""
+
+#: urwid_satext/files_management.py:154
+msgid "Bookmarks"
+msgstr ""
+
+#: urwid_satext/files_management.py:160 urwid_satext/sat_widgets.py:740
+msgid "Cancel"
+msgstr ""
+
+#: urwid_satext/files_management.py:203
+msgid "No GTK bookmarks file found"
+msgstr ""
+
+#: urwid_satext/files_management.py:213
+msgid "No KDE bookmarks file found"
+msgstr ""
+
+#: urwid_satext/sat_widgets.py:164
+msgid "WARNING: unknown text type"
+msgstr ""
+
+#: urwid_satext/sat_widgets.py:741 urwid_satext/sat_widgets.py:749
+msgid "Ok"
+msgstr ""
+
+#: urwid_satext/sat_widgets.py:745
+msgid "Yes"
+msgstr ""
+
+#: urwid_satext/sat_widgets.py:746
+msgid "No"
+msgstr ""
+
+#: urwid_satext/sat_widgets.py:962
+msgid "INTERNAL ERROR: Tab not found"
+msgstr ""
--- a/urwid_satext/files_management.py	Tue Dec 28 21:46:25 2010 +0100
+++ b/urwid_satext/files_management.py	Tue Dec 28 21:48:01 2010 +0100
@@ -25,7 +25,9 @@
 from xml.dom import minidom
 from logging import debug, info, error
 from time import time
-_ = unicode #FIXME: temporary workaround, the time to manage well i18n
+
+import gettext
+gettext.install('urwid_satext', unicode=True)
 
 class PathEdit(sat_widgets.AdvancedEdit):
     """AdvancedEdit with manage file paths"""