From 772019b088f6b36df7e1d9c2a844ca5669a5e904 Mon Sep 17 00:00:00 2001
From: jvoisin
Date: Wed, 10 Aug 2011 15:57:14 +0200
Subject: French localisation
---
gui.py | 34 +++++----
locale/fr/LC_MESSAGES/gui.mo | Bin 0 -> 2647 bytes
locale/fr/LC_MESSAGES/gui.pot | 162 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 182 insertions(+), 14 deletions(-)
create mode 100644 locale/fr/LC_MESSAGES/gui.mo
create mode 100644 locale/fr/LC_MESSAGES/gui.pot
diff --git a/gui.py b/gui.py
index 5b5bf54..4dca692 100644
--- a/gui.py
+++ b/gui.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+#charset utf-8
'''
Metadata anonymisation toolkit - GUI edition
@@ -8,6 +9,7 @@ import gtk
import gobject
import gettext
+import locale
import logging
import os
import xml.sax
@@ -17,8 +19,7 @@ from lib import mat
__version__ = '0.1'
__author__ = 'jvoisin'
-t = gettext.translation('gui', 'locale', fallback=True)
-_ = t.ugettext
+
logging.basicConfig(level=mat.LOGGING_LEVEL)
@@ -36,7 +37,7 @@ class CFile(object):
self.file = None
-class ListStoreApp:
+class GUI:
'''
Main GUI class
'''
@@ -207,7 +208,7 @@ data loss'))
help_menu = self.create_sub_menu(_('Help'), menubar)
self.create_menu_item(_('Supported formats'), self.supported, help_menu,
gtk.STOCK_INFO)
- self.create_menu_item('About', self.about, help_menu, gtk.STOCK_ABOUT)
+ self.create_menu_item(_('About'), self.about, help_menu, gtk.STOCK_ABOUT)
return menubar
@@ -215,21 +216,21 @@ data loss'))
'''
Add the files chosed by the filechoser ("Add" button)
'''
- chooser = gtk.FileChooserDialog(title='Choose files',
+ chooser = gtk.FileChooserDialog(title=_('Choose files'),
parent=self.window, action=gtk.FILE_CHOOSER_ACTION_OPEN,
buttons=(gtk.STOCK_OK, 0, gtk.STOCK_CANCEL, 1))
chooser.set_default_response(0)
chooser.set_select_multiple(True)
all_filter = gtk.FileFilter() # filter that shows all files
- all_filter.set_name('All files')
+ all_filter.set_name(_('All files'))
all_filter.add_pattern('*')
chooser.add_filter(all_filter)
supported_filter = gtk.FileFilter()
# filter that shows only supported formats
[supported_filter.add_mime_type(i) for i in mat.STRIPPERS.keys()]
- supported_filter.set_name('Supported files')
+ supported_filter.set_name(_('Supported files'))
chooser.add_filter(supported_filter)
response = chooser.run()
@@ -262,7 +263,7 @@ data loss'))
cf = CFile(filename, self.backup, self.add2archive)
if cf.file is not None:
self.liststore.append([cf, cf.file.basename,
- cf.file.mime, 'unknow'])
+ cf.file.mime, _('unknow')])
def about(self, button):
@@ -272,9 +273,9 @@ data loss'))
w = gtk.AboutDialog()
w.set_version(__version__)
w.set_copyright('GNU Public License v2')
- w.set_comments('This software was coded during the GSoC 2011')
+ w.set_comments(_('This software was coded during the GSoC 2011'))
w.set_website('https://gitweb.torproject.org/user/jvoisin/mat.git')
- w.set_website_label('Website')
+ w.set_website_label(_('Website'))
w.set_authors(['Julien (jvoisin) Voisin', ])
w.set_program_name('Metadata Anonymistion Toolkit')
click = w.run()
@@ -285,7 +286,7 @@ data loss'))
'''
List the supported formats
'''
- dialog = gtk.Dialog('Supported formats', self.window, 0,
+ dialog = gtk.Dialog(_('Supported formats'), self.window, 0,
(gtk.STOCK_CLOSE, 0))
vbox = gtk.VBox(spacing=5)
dialog.get_content_area().pack_start(vbox, True, True, 0)
@@ -304,8 +305,7 @@ data loss'))
for item in handler.list: # list of dict : one dict per format
#create one expander per format
title = '%s (%s)' % (item['name'], item['extension'])
- support = ('\t%s : %s' % (_('support'), item['support']))
- #support = '\tsupport : ' + item['support']
+ support = ('\t%s : %s' % ('support', item['support']))
metadata = '\n\tmetadata : ' + item['metadata']
method = '\n\tmethod : ' + item['method']
content = support + metadata + method
@@ -561,5 +561,11 @@ class TreeViewTooltips(object):
if __name__ == '__main__':
- ListStoreApp()
+ #Translations
+ t = gettext.translation('gui', 'locale', fallback=True)
+ _ = t.ugettext
+ t.install()
+
+ #Main
+ GUI()
gtk.main()
diff --git a/locale/fr/LC_MESSAGES/gui.mo b/locale/fr/LC_MESSAGES/gui.mo
new file mode 100644
index 0000000..c25b987
Binary files /dev/null and b/locale/fr/LC_MESSAGES/gui.mo differ
diff --git a/locale/fr/LC_MESSAGES/gui.pot b/locale/fr/LC_MESSAGES/gui.pot
new file mode 100644
index 0000000..50daecd
--- /dev/null
+++ b/locale/fr/LC_MESSAGES/gui.pot
@@ -0,0 +1,162 @@
+# Metadata ANonymisation Toolkit : GUI
+# Copyright (C) 2011 Julien (jvoisin) Voisin
+# This file is distributed under the same license as the MAT package.
+# Julien (jvoisin) Voisin , 2011
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.1\n"
+"Report-Msgid-Bugs-To: Julien (jvoisin) Voisin \n"
+"POT-Creation-Date: 2011-08-10 15:41+0200\n"
+"PO-Revision-Date: 2011-08-10 15:41+0200\n"
+"Last-Translator: Julien (jvoisin) Voisin \n"
+"Language-Team: Fr Julien (jvoisin) Voisin \n"
+"Language: FR_fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: gui.py:81
+msgid "Ready"
+msgstr "Prêt"
+
+#: gui.py:93
+msgid "Add"
+msgstr "Ajouter"
+
+#: gui.py:95 gui.py:171
+msgid "Add files"
+msgstr "Ajouter fichiers"
+
+#: gui.py:99 gui.py:187
+msgid "Clean"
+msgstr "Nettoyer"
+
+#: gui.py:101
+msgid "Clean selected files without data loss"
+msgstr "Nettoyer les fichiers séléctionnés sans pertes possibles d'informations"
+
+#: gui.py:105
+msgid "Brute Clean"
+msgstr "Nettoyer avec pertes possibles"
+
+#: gui.py:107
+msgid "Clean selected files with possible data loss"
+msgstr "Nettoyer avec pertes possibles d'informations"
+
+#: gui.py:112 gui.py:203
+msgid "Check"
+msgstr "Vérifier"
+
+#: gui.py:114
+msgid "Check selected files for harmful meta"
+msgstr "Vérifier l'état actuel des fichiers selectionnés"
+
+#: gui.py:118 gui.py:173
+msgid "Quit"
+msgstr "Quitter"
+
+#: gui.py:130
+msgid "Filename"
+msgstr "Nom"
+
+#: gui.py:130
+msgid "Mimetype"
+msgstr "Type mime"
+
+#: gui.py:130
+msgid "State"
+msgstr "État"
+
+#: gui.py:170
+msgid "Files"
+msgstr "Fichiers"
+
+#: gui.py:176
+msgid "Edit"
+msgstr "Edition"
+
+#: gui.py:177
+msgid "Clear the filelist"
+msgstr "Vider la liste de fichiers"
+
+#: gui.py:179 gui.py:331
+msgid "Preferences"
+msgstr "Préférences"
+
+#: gui.py:182
+msgid "Process"
+msgstr "Traiter"
+
+#: gui.py:195
+msgid "Clean (lossy way)"
+msgstr "Nettoyer (avec pertes possibles)"
+
+#: gui.py:208
+msgid "Help"
+msgstr "Aide"
+
+#: gui.py:209 gui.py:289
+msgid "Supported formats"
+msgstr "Formats supportés"
+
+#: gui.py:211
+msgid "About"
+msgstr "A propos"
+
+#: gui.py:219
+msgid "Choose files"
+msgstr "Sélection de fichiers"
+
+#: gui.py:226
+msgid "All files"
+msgstr "Tous"
+
+#: gui.py:233
+msgid "Supported files"
+msgstr "Supportés"
+
+#: gui.py:266
+msgid "unknow"
+msgstr "inconnu"
+
+#: gui.py:276
+msgid "This software was coded during the GSoC 2011"
+msgstr "Ce logiciel a été produit lors du GSoC 2011"
+
+#: gui.py:278
+msgid "Website"
+msgstr "Site internet"
+
+#: gui.py:342
+msgid "Force Clean"
+msgstr "Forcer traitement"
+
+#: gui.py:345
+msgid "Do not check if already clean before cleaning"
+msgstr "Ne pas vérifier l'état avant de traiter"
+
+#: gui.py:349
+msgid "Backup"
+msgstr "Copie de sauvegarde"
+
+#: gui.py:352
+msgid "Keep a backup copy"
+msgstr "Garde une copie de sauvegarde du fichier original"
+
+#: gui.py:355
+msgid "Add unsupported file to archives"
+msgstr "Ajout des formats non supportés"
+
+#: gui.py:359
+msgid "Add non-supported (and so non-anonymised) file to outputed archive"
+msgstr "Ajouter les fichiers de formats non-supportés (et donc, non traités) aux archives anonymisées"
+
+#: gui.py:395 gui.py:409 gui.py:412 gui.py:422 gui.py:425
+msgid "clean"
+msgstr "propre"
+
+#: gui.py:397
+msgid "dirty"
+msgstr "compromettant"
--
cgit v1.3