diff options
| author | jvoisin | 2011-08-10 15:57:14 +0200 |
|---|---|---|
| committer | jvoisin | 2011-08-10 15:57:14 +0200 |
| commit | 772019b088f6b36df7e1d9c2a844ca5669a5e904 (patch) | |
| tree | 665eea80a76962baffcc0a83f532b5053a9f8cee | |
| parent | cbe66667fa129ccaca7737d0b950271c1b694159 (diff) | |
French localisation
| -rw-r--r-- | gui.py | 34 | ||||
| -rw-r--r-- | locale/fr/LC_MESSAGES/gui.mo | bin | 0 -> 2647 bytes | |||
| -rw-r--r-- | locale/fr/LC_MESSAGES/gui.pot | 162 |
3 files changed, 182 insertions, 14 deletions
| @@ -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 | |||
| 8 | import gobject | 9 | import gobject |
| 9 | 10 | ||
| 10 | import gettext | 11 | import gettext |
| 12 | import locale | ||
| 11 | import logging | 13 | import logging |
| 12 | import os | 14 | import os |
| 13 | import xml.sax | 15 | import 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 | ||
| 20 | t = gettext.translation('gui', 'locale', fallback=True) | 22 | |
| 21 | _ = t.ugettext | ||
| 22 | 23 | ||
| 23 | logging.basicConfig(level=mat.LOGGING_LEVEL) | 24 | logging.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 | ||
| 39 | class ListStoreApp: | 40 | class 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 | ||
| 563 | if __name__ == '__main__': | 563 | if __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 | ||
| 7 | msgid "" | ||
| 8 | msgstr "" | ||
| 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 | ||
| 21 | msgid "Ready" | ||
| 22 | msgstr "Prêt" | ||
| 23 | |||
| 24 | #: gui.py:93 | ||
| 25 | msgid "Add" | ||
| 26 | msgstr "Ajouter" | ||
| 27 | |||
| 28 | #: gui.py:95 gui.py:171 | ||
| 29 | msgid "Add files" | ||
| 30 | msgstr "Ajouter fichiers" | ||
| 31 | |||
| 32 | #: gui.py:99 gui.py:187 | ||
| 33 | msgid "Clean" | ||
| 34 | msgstr "Nettoyer" | ||
| 35 | |||
| 36 | #: gui.py:101 | ||
| 37 | msgid "Clean selected files without data loss" | ||
| 38 | msgstr "Nettoyer les fichiers séléctionnés sans pertes possibles d'informations" | ||
| 39 | |||
| 40 | #: gui.py:105 | ||
| 41 | msgid "Brute Clean" | ||
| 42 | msgstr "Nettoyer avec pertes possibles" | ||
| 43 | |||
| 44 | #: gui.py:107 | ||
| 45 | msgid "Clean selected files with possible data loss" | ||
| 46 | msgstr "Nettoyer avec pertes possibles d'informations" | ||
| 47 | |||
| 48 | #: gui.py:112 gui.py:203 | ||
| 49 | msgid "Check" | ||
| 50 | msgstr "Vérifier" | ||
| 51 | |||
| 52 | #: gui.py:114 | ||
| 53 | msgid "Check selected files for harmful meta" | ||
| 54 | msgstr "Vérifier l'état actuel des fichiers selectionnés" | ||
| 55 | |||
| 56 | #: gui.py:118 gui.py:173 | ||
| 57 | msgid "Quit" | ||
| 58 | msgstr "Quitter" | ||
| 59 | |||
| 60 | #: gui.py:130 | ||
| 61 | msgid "Filename" | ||
| 62 | msgstr "Nom" | ||
| 63 | |||
| 64 | #: gui.py:130 | ||
| 65 | msgid "Mimetype" | ||
| 66 | msgstr "Type mime" | ||
| 67 | |||
| 68 | #: gui.py:130 | ||
| 69 | msgid "State" | ||
| 70 | msgstr "État" | ||
| 71 | |||
| 72 | #: gui.py:170 | ||
| 73 | msgid "Files" | ||
| 74 | msgstr "Fichiers" | ||
| 75 | |||
| 76 | #: gui.py:176 | ||
| 77 | msgid "Edit" | ||
| 78 | msgstr "Edition" | ||
| 79 | |||
| 80 | #: gui.py:177 | ||
| 81 | msgid "Clear the filelist" | ||
| 82 | msgstr "Vider la liste de fichiers" | ||
| 83 | |||
| 84 | #: gui.py:179 gui.py:331 | ||
| 85 | msgid "Preferences" | ||
| 86 | msgstr "Préférences" | ||
| 87 | |||
| 88 | #: gui.py:182 | ||
| 89 | msgid "Process" | ||
| 90 | msgstr "Traiter" | ||
| 91 | |||
| 92 | #: gui.py:195 | ||
| 93 | msgid "Clean (lossy way)" | ||
| 94 | msgstr "Nettoyer (avec pertes possibles)" | ||
| 95 | |||
| 96 | #: gui.py:208 | ||
| 97 | msgid "Help" | ||
| 98 | msgstr "Aide" | ||
| 99 | |||
| 100 | #: gui.py:209 gui.py:289 | ||
| 101 | msgid "Supported formats" | ||
| 102 | msgstr "Formats supportés" | ||
| 103 | |||
| 104 | #: gui.py:211 | ||
| 105 | msgid "About" | ||
| 106 | msgstr "A propos" | ||
| 107 | |||
| 108 | #: gui.py:219 | ||
| 109 | msgid "Choose files" | ||
| 110 | msgstr "Sélection de fichiers" | ||
| 111 | |||
| 112 | #: gui.py:226 | ||
| 113 | msgid "All files" | ||
| 114 | msgstr "Tous" | ||
| 115 | |||
| 116 | #: gui.py:233 | ||
| 117 | msgid "Supported files" | ||
| 118 | msgstr "Supportés" | ||
| 119 | |||
| 120 | #: gui.py:266 | ||
| 121 | msgid "unknow" | ||
| 122 | msgstr "inconnu" | ||
| 123 | |||
| 124 | #: gui.py:276 | ||
| 125 | msgid "This software was coded during the GSoC 2011" | ||
| 126 | msgstr "Ce logiciel a été produit lors du GSoC 2011" | ||
| 127 | |||
| 128 | #: gui.py:278 | ||
| 129 | msgid "Website" | ||
| 130 | msgstr "Site internet" | ||
| 131 | |||
| 132 | #: gui.py:342 | ||
| 133 | msgid "Force Clean" | ||
| 134 | msgstr "Forcer traitement" | ||
| 135 | |||
| 136 | #: gui.py:345 | ||
| 137 | msgid "Do not check if already clean before cleaning" | ||
| 138 | msgstr "Ne pas vérifier l'état avant de traiter" | ||
| 139 | |||
| 140 | #: gui.py:349 | ||
| 141 | msgid "Backup" | ||
| 142 | msgstr "Copie de sauvegarde" | ||
| 143 | |||
| 144 | #: gui.py:352 | ||
| 145 | msgid "Keep a backup copy" | ||
| 146 | msgstr "Garde une copie de sauvegarde du fichier original" | ||
| 147 | |||
| 148 | #: gui.py:355 | ||
| 149 | msgid "Add unsupported file to archives" | ||
| 150 | msgstr "Ajout des formats non supportés" | ||
| 151 | |||
| 152 | #: gui.py:359 | ||
| 153 | msgid "Add non-supported (and so non-anonymised) file to outputed archive" | ||
| 154 | msgstr "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 | ||
| 157 | msgid "clean" | ||
| 158 | msgstr "propre" | ||
| 159 | |||
| 160 | #: gui.py:397 | ||
| 161 | msgid "dirty" | ||
| 162 | msgstr "compromettant" | ||
