summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2011-08-10 15:57:14 +0200
committerjvoisin2011-08-10 15:57:14 +0200
commit772019b088f6b36df7e1d9c2a844ca5669a5e904 (patch)
tree665eea80a76962baffcc0a83f532b5053a9f8cee
parentcbe66667fa129ccaca7737d0b950271c1b694159 (diff)
French localisation
-rw-r--r--gui.py34
-rw-r--r--locale/fr/LC_MESSAGES/gui.mobin0 -> 2647 bytes
-rw-r--r--locale/fr/LC_MESSAGES/gui.pot162
3 files changed, 182 insertions, 14 deletions
diff --git a/gui.py b/gui.py
index 5b5bf54..4dca692 100644
--- a/gui.py
+++ b/gui.py
@@ -1,4 +1,5 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2#charset utf-8
2 3
3''' 4'''
4 Metadata anonymisation toolkit - GUI edition 5 Metadata anonymisation toolkit - GUI edition
@@ -8,6 +9,7 @@ import gtk
8import gobject 9import gobject
9 10
10import gettext 11import gettext
12import locale
11import logging 13import logging
12import os 14import os
13import xml.sax 15import xml.sax
@@ -17,8 +19,7 @@ from lib import mat
17__version__ = '0.1' 19__version__ = '0.1'
18__author__ = 'jvoisin' 20__author__ = 'jvoisin'
19 21
20t = gettext.translation('gui', 'locale', fallback=True) 22
21_ = t.ugettext
22 23
23logging.basicConfig(level=mat.LOGGING_LEVEL) 24logging.basicConfig(level=mat.LOGGING_LEVEL)
24 25
@@ -36,7 +37,7 @@ class CFile(object):
36 self.file = None 37 self.file = None
37 38
38 39
39class ListStoreApp: 40class GUI:
40 ''' 41 '''
41 Main GUI class 42 Main GUI class
42 ''' 43 '''
@@ -207,7 +208,7 @@ data loss'))
207 help_menu = self.create_sub_menu(_('Help'), menubar) 208 help_menu = self.create_sub_menu(_('Help'), menubar)
208 self.create_menu_item(_('Supported formats'), self.supported, help_menu, 209 self.create_menu_item(_('Supported formats'), self.supported, help_menu,
209 gtk.STOCK_INFO) 210 gtk.STOCK_INFO)
210 self.create_menu_item('About', self.about, help_menu, gtk.STOCK_ABOUT) 211 self.create_menu_item(_('About'), self.about, help_menu, gtk.STOCK_ABOUT)
211 212
212 return menubar 213 return menubar
213 214
@@ -215,21 +216,21 @@ data loss'))
215 ''' 216 '''
216 Add the files chosed by the filechoser ("Add" button) 217 Add the files chosed by the filechoser ("Add" button)
217 ''' 218 '''
218 chooser = gtk.FileChooserDialog(title='Choose files', 219 chooser = gtk.FileChooserDialog(title=_('Choose files'),
219 parent=self.window, action=gtk.FILE_CHOOSER_ACTION_OPEN, 220 parent=self.window, action=gtk.FILE_CHOOSER_ACTION_OPEN,
220 buttons=(gtk.STOCK_OK, 0, gtk.STOCK_CANCEL, 1)) 221 buttons=(gtk.STOCK_OK, 0, gtk.STOCK_CANCEL, 1))
221 chooser.set_default_response(0) 222 chooser.set_default_response(0)
222 chooser.set_select_multiple(True) 223 chooser.set_select_multiple(True)
223 224
224 all_filter = gtk.FileFilter() # filter that shows all files 225 all_filter = gtk.FileFilter() # filter that shows all files
225 all_filter.set_name('All files') 226 all_filter.set_name(_('All files'))
226 all_filter.add_pattern('*') 227 all_filter.add_pattern('*')
227 chooser.add_filter(all_filter) 228 chooser.add_filter(all_filter)
228 229
229 supported_filter = gtk.FileFilter() 230 supported_filter = gtk.FileFilter()
230 # filter that shows only supported formats 231 # filter that shows only supported formats
231 [supported_filter.add_mime_type(i) for i in mat.STRIPPERS.keys()] 232 [supported_filter.add_mime_type(i) for i in mat.STRIPPERS.keys()]
232 supported_filter.set_name('Supported files') 233 supported_filter.set_name(_('Supported files'))
233 chooser.add_filter(supported_filter) 234 chooser.add_filter(supported_filter)
234 235
235 response = chooser.run() 236 response = chooser.run()
@@ -262,7 +263,7 @@ data loss'))
262 cf = CFile(filename, self.backup, self.add2archive) 263 cf = CFile(filename, self.backup, self.add2archive)
263 if cf.file is not None: 264 if cf.file is not None:
264 self.liststore.append([cf, cf.file.basename, 265 self.liststore.append([cf, cf.file.basename,
265 cf.file.mime, 'unknow']) 266 cf.file.mime, _('unknow')])
266 267
267 268
268 def about(self, button): 269 def about(self, button):
@@ -272,9 +273,9 @@ data loss'))
272 w = gtk.AboutDialog() 273 w = gtk.AboutDialog()
273 w.set_version(__version__) 274 w.set_version(__version__)
274 w.set_copyright('GNU Public License v2') 275 w.set_copyright('GNU Public License v2')
275 w.set_comments('This software was coded during the GSoC 2011') 276 w.set_comments(_('This software was coded during the GSoC 2011'))
276 w.set_website('https://gitweb.torproject.org/user/jvoisin/mat.git') 277 w.set_website('https://gitweb.torproject.org/user/jvoisin/mat.git')
277 w.set_website_label('Website') 278 w.set_website_label(_('Website'))
278 w.set_authors(['Julien (jvoisin) Voisin', ]) 279 w.set_authors(['Julien (jvoisin) Voisin', ])
279 w.set_program_name('Metadata Anonymistion Toolkit') 280 w.set_program_name('Metadata Anonymistion Toolkit')
280 click = w.run() 281 click = w.run()
@@ -285,7 +286,7 @@ data loss'))
285 ''' 286 '''
286 List the supported formats 287 List the supported formats
287 ''' 288 '''
288 dialog = gtk.Dialog('Supported formats', self.window, 0, 289 dialog = gtk.Dialog(_('Supported formats'), self.window, 0,
289 (gtk.STOCK_CLOSE, 0)) 290 (gtk.STOCK_CLOSE, 0))
290 vbox = gtk.VBox(spacing=5) 291 vbox = gtk.VBox(spacing=5)
291 dialog.get_content_area().pack_start(vbox, True, True, 0) 292 dialog.get_content_area().pack_start(vbox, True, True, 0)
@@ -304,8 +305,7 @@ data loss'))
304 for item in handler.list: # list of dict : one dict per format 305 for item in handler.list: # list of dict : one dict per format
305 #create one expander per format 306 #create one expander per format
306 title = '%s (%s)' % (item['name'], item['extension']) 307 title = '%s (%s)' % (item['name'], item['extension'])
307 support = ('\t<b>%s</b> : %s' % (_('support'), item['support'])) 308 support = ('\t<b>%s</b> : %s' % ('support', item['support']))
308 #support = '\t<b>support</b> : ' + item['support']
309 metadata = '\n\t<b>metadata</b> : ' + item['metadata'] 309 metadata = '\n\t<b>metadata</b> : ' + item['metadata']
310 method = '\n\t<b>method</b> : ' + item['method'] 310 method = '\n\t<b>method</b> : ' + item['method']
311 content = support + metadata + method 311 content = support + metadata + method
@@ -561,5 +561,11 @@ class TreeViewTooltips(object):
561 561
562 562
563if __name__ == '__main__': 563if __name__ == '__main__':
564 ListStoreApp() 564 #Translations
565 t = gettext.translation('gui', 'locale', fallback=True)
566 _ = t.ugettext
567 t.install()
568
569 #Main
570 GUI()
565 gtk.main() 571 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
--- /dev/null
+++ b/locale/fr/LC_MESSAGES/gui.mo
Binary files 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 @@
1# Metadata ANonymisation Toolkit : GUI
2# Copyright (C) 2011 Julien (jvoisin) Voisin <pouicpouicpouic@gmail.com>
3# This file is distributed under the same license as the MAT package.
4# Julien (jvoisin) Voisin <pouicpouicpouic@gmail.com>, 2011
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: 0.1\n"
10"Report-Msgid-Bugs-To: Julien (jvoisin) Voisin <pouicpouicpouic@gmail.com>\n"
11"POT-Creation-Date: 2011-08-10 15:41+0200\n"
12"PO-Revision-Date: 2011-08-10 15:41+0200\n"
13"Last-Translator: Julien (jvoisin) Voisin <pouicpouicpouic@gmail.com>\n"
14"Language-Team: Fr Julien (jvoisin) Voisin <pouicpouicpouic@gmail.com>\n"
15"Language: FR_fr\n"
16"MIME-Version: 1.0\n"
17"Content-Type: text/plain; charset=UTF-8\n"
18"Content-Transfer-Encoding: 8bit\n"
19
20#: gui.py:81
21msgid "Ready"
22msgstr "Prêt"
23
24#: gui.py:93
25msgid "Add"
26msgstr "Ajouter"
27
28#: gui.py:95 gui.py:171
29msgid "Add files"
30msgstr "Ajouter fichiers"
31
32#: gui.py:99 gui.py:187
33msgid "Clean"
34msgstr "Nettoyer"
35
36#: gui.py:101
37msgid "Clean selected files without data loss"
38msgstr "Nettoyer les fichiers séléctionnés sans pertes possibles d'informations"
39
40#: gui.py:105
41msgid "Brute Clean"
42msgstr "Nettoyer avec pertes possibles"
43
44#: gui.py:107
45msgid "Clean selected files with possible data loss"
46msgstr "Nettoyer avec pertes possibles d'informations"
47
48#: gui.py:112 gui.py:203
49msgid "Check"
50msgstr "Vérifier"
51
52#: gui.py:114
53msgid "Check selected files for harmful meta"
54msgstr "Vérifier l'état actuel des fichiers selectionnés"
55
56#: gui.py:118 gui.py:173
57msgid "Quit"
58msgstr "Quitter"
59
60#: gui.py:130
61msgid "Filename"
62msgstr "Nom"
63
64#: gui.py:130
65msgid "Mimetype"
66msgstr "Type mime"
67
68#: gui.py:130
69msgid "State"
70msgstr "État"
71
72#: gui.py:170
73msgid "Files"
74msgstr "Fichiers"
75
76#: gui.py:176
77msgid "Edit"
78msgstr "Edition"
79
80#: gui.py:177
81msgid "Clear the filelist"
82msgstr "Vider la liste de fichiers"
83
84#: gui.py:179 gui.py:331
85msgid "Preferences"
86msgstr "Préférences"
87
88#: gui.py:182
89msgid "Process"
90msgstr "Traiter"
91
92#: gui.py:195
93msgid "Clean (lossy way)"
94msgstr "Nettoyer (avec pertes possibles)"
95
96#: gui.py:208
97msgid "Help"
98msgstr "Aide"
99
100#: gui.py:209 gui.py:289
101msgid "Supported formats"
102msgstr "Formats supportés"
103
104#: gui.py:211
105msgid "About"
106msgstr "A propos"
107
108#: gui.py:219
109msgid "Choose files"
110msgstr "Sélection de fichiers"
111
112#: gui.py:226
113msgid "All files"
114msgstr "Tous"
115
116#: gui.py:233
117msgid "Supported files"
118msgstr "Supportés"
119
120#: gui.py:266
121msgid "unknow"
122msgstr "inconnu"
123
124#: gui.py:276
125msgid "This software was coded during the GSoC 2011"
126msgstr "Ce logiciel a été produit lors du GSoC 2011"
127
128#: gui.py:278
129msgid "Website"
130msgstr "Site internet"
131
132#: gui.py:342
133msgid "Force Clean"
134msgstr "Forcer traitement"
135
136#: gui.py:345
137msgid "Do not check if already clean before cleaning"
138msgstr "Ne pas vérifier l'état avant de traiter"
139
140#: gui.py:349
141msgid "Backup"
142msgstr "Copie de sauvegarde"
143
144#: gui.py:352
145msgid "Keep a backup copy"
146msgstr "Garde une copie de sauvegarde du fichier original"
147
148#: gui.py:355
149msgid "Add unsupported file to archives"
150msgstr "Ajout des formats non supportés"
151
152#: gui.py:359
153msgid "Add non-supported (and so non-anonymised) file to outputed archive"
154msgstr "Ajouter les fichiers de formats non-supportés (et donc, non traités) aux archives anonymisées"
155
156#: gui.py:395 gui.py:409 gui.py:412 gui.py:422 gui.py:425
157msgid "clean"
158msgstr "propre"
159
160#: gui.py:397
161msgid "dirty"
162msgstr "compromettant"