From 1e26c0fe56a7e354f0649792de096dfeada8a1c5 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 2 May 2012 19:13:48 -0400 Subject: Improve i18n --- MANIFEST.in | 2 +- locale/fr_FR/LC_MESSAGES/mat-gui.po | 177 ----------------------------------- locale/gui.pot | 179 ------------------------------------ po/POTFILES.in | 1 + po/fr.po | 177 +++++++++++++++++++++++++++++++++++ po/mat-gui.pot | 179 ++++++++++++++++++++++++++++++++++++ setup.py | 25 ++--- 7 files changed, 367 insertions(+), 373 deletions(-) delete mode 100644 locale/fr_FR/LC_MESSAGES/mat-gui.po delete mode 100644 locale/gui.pot create mode 100644 po/POTFILES.in create mode 100644 po/fr.po create mode 100644 po/mat-gui.pot mode change 100755 => 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in index 99cc0dc..3b7ac13 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include README FORMATS LICENSE mat-cli mat-gui -recursive-include locale *.mo recursive-include mat *.py recursive-include test *.py clean.* dirty.* +recursive-include po * diff --git a/locale/fr_FR/LC_MESSAGES/mat-gui.po b/locale/fr_FR/LC_MESSAGES/mat-gui.po deleted file mode 100644 index 9a7ea11..0000000 --- a/locale/fr_FR/LC_MESSAGES/mat-gui.po +++ /dev/null @@ -1,177 +0,0 @@ -# Metadata Anonymisation Toolkit -# Copyright (C) 2011 Julien (jvoisin) Voisin " -# This file is distributed under the same license as the mat package. -# Julien (jvoisin) Voisin \n" -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: fr\n" -"Report-Msgid-Bugs-To: Julien (jvoisin) Voisin \n" -"POT-Creation-Date: 2012-01-07 00:09+0100\n" -"PO-Revision-Date: 2012-01-07 00:09+0100\n" -"Last-Translator: Julien (jvoisin) Voisin \n" -"Language-Team: Julien (jvoisin) Voisin \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: mat-gui:88 mat-gui:504 mat-gui:523 mat-gui:542 -msgid "Ready" -msgstr "Prêt" - -#: mat-gui:100 -msgid "Add" -msgstr "Ajouter" - -#: mat-gui:102 mat-gui:186 -msgid "Add files" -msgstr "Ajouter fichiers" - -#: mat-gui:106 mat-gui:206 mat-gui:498 mat-gui:519 -msgid "Clean (lossless)" -msgstr "Nettoyer (sans pertes)" - -#: mat-gui:108 -msgid "Clean selected files without possible data loss" -msgstr "Nettoie les fichiers selectionnés sans pertes possible de données" - -#: mat-gui:113 mat-gui:217 mat-gui:496 mat-gui:514 mat-gui:533 mat-gui:538 -msgid "Clean (strict)" -msgstr "Nettoyer (strict)" - -#: mat-gui:116 -msgid "Clean selected files with possible data loss, but clean more efficiently" -msgstr "Nettoie les fichiers selectionnés de manière stricte, mais des pertes de données sont possibles" - -#: mat-gui:121 mat-gui:228 -msgid "Check" -msgstr "Vérifier" - -#: mat-gui:123 -msgid "Check selected files for harmful meta" -msgstr "Vérifie si les fichiers selectionnés comportent des metadatas compromettantes" - -#: mat-gui:127 mat-gui:188 -msgid "Quit" -msgstr "Quitter" - -#: mat-gui:139 mat-gui:331 -msgid "Filename" -msgstr "Nom" - -#: mat-gui:139 mat-gui:333 -msgid "Mimetype" -msgstr "Type Mime" - -#: mat-gui:139 -msgid "State" -msgstr "État" - -#: mat-gui:140 -msgid "Cleaned file" -msgstr "Fichier nettoyé" - -#: mat-gui:185 -msgid "Files" -msgstr "Fichiers" - -#: mat-gui:191 -msgid "Edit" -msgstr "Edition" - -#: mat-gui:192 -msgid "Clear the filelist" -msgstr "Vider la liste de fichiers" - -#: mat-gui:195 mat-gui:403 -msgid "Preferences" -msgstr "Préférences" - -#: mat-gui:198 -msgid "Process" -msgstr "Traiter" - -#: mat-gui:232 -msgid "Help" -msgstr "Aide" - -#: mat-gui:233 mat-gui:361 -msgid "Supported formats" -msgstr "Formats supportés" - -#: mat-gui:235 -msgid "About" -msgstr "À propos" - -#: mat-gui:244 -msgid "Choose files" -msgstr "Choisir fichiers" - -#: mat-gui:251 -msgid "All files" -msgstr "Tout les fichiers" - -#: mat-gui:258 -msgid "Supported files" -msgstr "Fichiers supportés" - -#: mat-gui:301 -msgid "unknow" -msgstr "inconnu" - -#: mat-gui:311 -msgid "Not-supported" -msgstr "Non-supporté" - -#: mat-gui:348 -msgid "This software was coded during the GSoC 2011" -msgstr "Ce logiciel fût forgé lors du GSoC 2011" - -#: mat-gui:350 -msgid "Website" -msgstr "Site internet" - -#: mat-gui:414 -msgid "Force Clean" -msgstr "Forcer le nettoyage" - -#: mat-gui:417 -msgid "Do not check if already clean before cleaning" -msgstr "Ne pas vérifier si un fichier est propre avant le nettoyage" - -#: mat-gui:421 -msgid "Backup" -msgstr "Sauvegarde" - -#: mat-gui:424 -msgid "Keep a backup copy" -msgstr "Conserve une copie de sauvegarde" - -#: mat-gui:427 -msgid "Add unsupported file to archives" -msgstr "Ajoute les types de fichiers non-supportés aux archives" - -#: mat-gui:431 -msgid "Add non-supported (and so non-anonymised) file to output archive" -msgstr "Ajoute les types de fichiers non supportés (et donc, non-traités) aux archives produites" - -#: mat-gui:495 -#, python-format -msgid "Checking %s..." -msgstr "Vérifie %s..." - -#: mat-gui:500 -msgid "dirty" -msgstr "compromettant" - -#: mat-gui:513 mat-gui:532 -#, python-format -msgid "Cleaning %s..." -msgstr "Nettoie %s..." - -#: mat-gui:531 -#, python-format -msgid "Cleaning (strict) %s" -msgstr "Nettoie de manière stricte %s..." diff --git a/locale/gui.pot b/locale/gui.pot deleted file mode 100644 index d8a6ae3..0000000 --- a/locale/gui.pot +++ /dev/null @@ -1,179 +0,0 @@ -# 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 , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-01-12 19:12+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../mat-gui:88 ../mat-gui:504 ../mat-gui:523 ../mat-gui:542 -msgid "Ready" -msgstr "" - -#: ../mat-gui:100 -msgid "Add" -msgstr "" - -#: ../mat-gui:102 ../mat-gui:186 -msgid "Add files" -msgstr "" - -#: ../mat-gui:106 ../mat-gui:206 ../mat-gui:498 ../mat-gui:519 -msgid "Clean (lossless)" -msgstr "" - -#: ../mat-gui:108 -msgid "Clean selected files without possible data loss" -msgstr "" - -#: ../mat-gui:113 ../mat-gui:217 ../mat-gui:496 ../mat-gui:514 ../mat-gui:533 -#: ../mat-gui:538 -msgid "Clean (strict)" -msgstr "" - -#: ../mat-gui:116 -msgid "" -"Clean selected files with possible data loss, but clean more efficiently" -msgstr "" - -#: ../mat-gui:121 ../mat-gui:228 -msgid "Check" -msgstr "" - -#: ../mat-gui:123 -msgid "Check selected files for harmful meta" -msgstr "" - -#: ../mat-gui:127 ../mat-gui:188 -msgid "Quit" -msgstr "" - -#: ../mat-gui:139 ../mat-gui:331 -msgid "Filename" -msgstr "" - -#: ../mat-gui:139 ../mat-gui:333 -msgid "Mimetype" -msgstr "" - -#: ../mat-gui:139 -msgid "State" -msgstr "" - -#: ../mat-gui:140 -msgid "Cleaned file" -msgstr "" - -#: ../mat-gui:185 -msgid "Files" -msgstr "" - -#: ../mat-gui:191 -msgid "Edit" -msgstr "" - -#: ../mat-gui:192 -msgid "Clear the filelist" -msgstr "" - -#: ../mat-gui:195 ../mat-gui:403 -msgid "Preferences" -msgstr "" - -#: ../mat-gui:198 -msgid "Process" -msgstr "" - -#: ../mat-gui:232 -msgid "Help" -msgstr "" - -#: ../mat-gui:233 ../mat-gui:361 -msgid "Supported formats" -msgstr "" - -#: ../mat-gui:235 -msgid "About" -msgstr "" - -#: ../mat-gui:244 -msgid "Choose files" -msgstr "" - -#: ../mat-gui:251 -msgid "All files" -msgstr "" - -#: ../mat-gui:258 -msgid "Supported files" -msgstr "" - -#: ../mat-gui:301 -msgid "unknow" -msgstr "" - -#: ../mat-gui:311 -msgid "Not-supported" -msgstr "" - -#: ../mat-gui:348 -msgid "This software was coded during the GSoC 2011" -msgstr "" - -#: ../mat-gui:350 -msgid "Website" -msgstr "" - -#: ../mat-gui:414 -msgid "Force Clean" -msgstr "" - -#: ../mat-gui:417 -msgid "Do not check if already clean before cleaning" -msgstr "" - -#: ../mat-gui:421 -msgid "Backup" -msgstr "" - -#: ../mat-gui:424 -msgid "Keep a backup copy" -msgstr "" - -#: ../mat-gui:427 -msgid "Add unsupported file to archives" -msgstr "" - -#: ../mat-gui:431 -msgid "Add non-supported (and so non-anonymised) file to output archive" -msgstr "" - -#: ../mat-gui:495 -#, python-format -msgid "Checking %s..." -msgstr "" - -#: ../mat-gui:500 -msgid "dirty" -msgstr "" - -#: ../mat-gui:513 ../mat-gui:532 -#, python-format -msgid "Cleaning %s..." -msgstr "" - -#: ../mat-gui:531 -#, python-format -msgid "Cleaning (strict) %s" -msgstr "" diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..8dee4d7 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +mat-gui diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..9a7ea11 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,177 @@ +# Metadata Anonymisation Toolkit +# Copyright (C) 2011 Julien (jvoisin) Voisin " +# This file is distributed under the same license as the mat package. +# Julien (jvoisin) Voisin \n" +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: fr\n" +"Report-Msgid-Bugs-To: Julien (jvoisin) Voisin \n" +"POT-Creation-Date: 2012-01-07 00:09+0100\n" +"PO-Revision-Date: 2012-01-07 00:09+0100\n" +"Last-Translator: Julien (jvoisin) Voisin \n" +"Language-Team: Julien (jvoisin) Voisin \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: mat-gui:88 mat-gui:504 mat-gui:523 mat-gui:542 +msgid "Ready" +msgstr "Prêt" + +#: mat-gui:100 +msgid "Add" +msgstr "Ajouter" + +#: mat-gui:102 mat-gui:186 +msgid "Add files" +msgstr "Ajouter fichiers" + +#: mat-gui:106 mat-gui:206 mat-gui:498 mat-gui:519 +msgid "Clean (lossless)" +msgstr "Nettoyer (sans pertes)" + +#: mat-gui:108 +msgid "Clean selected files without possible data loss" +msgstr "Nettoie les fichiers selectionnés sans pertes possible de données" + +#: mat-gui:113 mat-gui:217 mat-gui:496 mat-gui:514 mat-gui:533 mat-gui:538 +msgid "Clean (strict)" +msgstr "Nettoyer (strict)" + +#: mat-gui:116 +msgid "Clean selected files with possible data loss, but clean more efficiently" +msgstr "Nettoie les fichiers selectionnés de manière stricte, mais des pertes de données sont possibles" + +#: mat-gui:121 mat-gui:228 +msgid "Check" +msgstr "Vérifier" + +#: mat-gui:123 +msgid "Check selected files for harmful meta" +msgstr "Vérifie si les fichiers selectionnés comportent des metadatas compromettantes" + +#: mat-gui:127 mat-gui:188 +msgid "Quit" +msgstr "Quitter" + +#: mat-gui:139 mat-gui:331 +msgid "Filename" +msgstr "Nom" + +#: mat-gui:139 mat-gui:333 +msgid "Mimetype" +msgstr "Type Mime" + +#: mat-gui:139 +msgid "State" +msgstr "État" + +#: mat-gui:140 +msgid "Cleaned file" +msgstr "Fichier nettoyé" + +#: mat-gui:185 +msgid "Files" +msgstr "Fichiers" + +#: mat-gui:191 +msgid "Edit" +msgstr "Edition" + +#: mat-gui:192 +msgid "Clear the filelist" +msgstr "Vider la liste de fichiers" + +#: mat-gui:195 mat-gui:403 +msgid "Preferences" +msgstr "Préférences" + +#: mat-gui:198 +msgid "Process" +msgstr "Traiter" + +#: mat-gui:232 +msgid "Help" +msgstr "Aide" + +#: mat-gui:233 mat-gui:361 +msgid "Supported formats" +msgstr "Formats supportés" + +#: mat-gui:235 +msgid "About" +msgstr "À propos" + +#: mat-gui:244 +msgid "Choose files" +msgstr "Choisir fichiers" + +#: mat-gui:251 +msgid "All files" +msgstr "Tout les fichiers" + +#: mat-gui:258 +msgid "Supported files" +msgstr "Fichiers supportés" + +#: mat-gui:301 +msgid "unknow" +msgstr "inconnu" + +#: mat-gui:311 +msgid "Not-supported" +msgstr "Non-supporté" + +#: mat-gui:348 +msgid "This software was coded during the GSoC 2011" +msgstr "Ce logiciel fût forgé lors du GSoC 2011" + +#: mat-gui:350 +msgid "Website" +msgstr "Site internet" + +#: mat-gui:414 +msgid "Force Clean" +msgstr "Forcer le nettoyage" + +#: mat-gui:417 +msgid "Do not check if already clean before cleaning" +msgstr "Ne pas vérifier si un fichier est propre avant le nettoyage" + +#: mat-gui:421 +msgid "Backup" +msgstr "Sauvegarde" + +#: mat-gui:424 +msgid "Keep a backup copy" +msgstr "Conserve une copie de sauvegarde" + +#: mat-gui:427 +msgid "Add unsupported file to archives" +msgstr "Ajoute les types de fichiers non-supportés aux archives" + +#: mat-gui:431 +msgid "Add non-supported (and so non-anonymised) file to output archive" +msgstr "Ajoute les types de fichiers non supportés (et donc, non-traités) aux archives produites" + +#: mat-gui:495 +#, python-format +msgid "Checking %s..." +msgstr "Vérifie %s..." + +#: mat-gui:500 +msgid "dirty" +msgstr "compromettant" + +#: mat-gui:513 mat-gui:532 +#, python-format +msgid "Cleaning %s..." +msgstr "Nettoie %s..." + +#: mat-gui:531 +#, python-format +msgid "Cleaning (strict) %s" +msgstr "Nettoie de manière stricte %s..." diff --git a/po/mat-gui.pot b/po/mat-gui.pot new file mode 100644 index 0000000..d8a6ae3 --- /dev/null +++ b/po/mat-gui.pot @@ -0,0 +1,179 @@ +# 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 , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-01-12 19:12+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../mat-gui:88 ../mat-gui:504 ../mat-gui:523 ../mat-gui:542 +msgid "Ready" +msgstr "" + +#: ../mat-gui:100 +msgid "Add" +msgstr "" + +#: ../mat-gui:102 ../mat-gui:186 +msgid "Add files" +msgstr "" + +#: ../mat-gui:106 ../mat-gui:206 ../mat-gui:498 ../mat-gui:519 +msgid "Clean (lossless)" +msgstr "" + +#: ../mat-gui:108 +msgid "Clean selected files without possible data loss" +msgstr "" + +#: ../mat-gui:113 ../mat-gui:217 ../mat-gui:496 ../mat-gui:514 ../mat-gui:533 +#: ../mat-gui:538 +msgid "Clean (strict)" +msgstr "" + +#: ../mat-gui:116 +msgid "" +"Clean selected files with possible data loss, but clean more efficiently" +msgstr "" + +#: ../mat-gui:121 ../mat-gui:228 +msgid "Check" +msgstr "" + +#: ../mat-gui:123 +msgid "Check selected files for harmful meta" +msgstr "" + +#: ../mat-gui:127 ../mat-gui:188 +msgid "Quit" +msgstr "" + +#: ../mat-gui:139 ../mat-gui:331 +msgid "Filename" +msgstr "" + +#: ../mat-gui:139 ../mat-gui:333 +msgid "Mimetype" +msgstr "" + +#: ../mat-gui:139 +msgid "State" +msgstr "" + +#: ../mat-gui:140 +msgid "Cleaned file" +msgstr "" + +#: ../mat-gui:185 +msgid "Files" +msgstr "" + +#: ../mat-gui:191 +msgid "Edit" +msgstr "" + +#: ../mat-gui:192 +msgid "Clear the filelist" +msgstr "" + +#: ../mat-gui:195 ../mat-gui:403 +msgid "Preferences" +msgstr "" + +#: ../mat-gui:198 +msgid "Process" +msgstr "" + +#: ../mat-gui:232 +msgid "Help" +msgstr "" + +#: ../mat-gui:233 ../mat-gui:361 +msgid "Supported formats" +msgstr "" + +#: ../mat-gui:235 +msgid "About" +msgstr "" + +#: ../mat-gui:244 +msgid "Choose files" +msgstr "" + +#: ../mat-gui:251 +msgid "All files" +msgstr "" + +#: ../mat-gui:258 +msgid "Supported files" +msgstr "" + +#: ../mat-gui:301 +msgid "unknow" +msgstr "" + +#: ../mat-gui:311 +msgid "Not-supported" +msgstr "" + +#: ../mat-gui:348 +msgid "This software was coded during the GSoC 2011" +msgstr "" + +#: ../mat-gui:350 +msgid "Website" +msgstr "" + +#: ../mat-gui:414 +msgid "Force Clean" +msgstr "" + +#: ../mat-gui:417 +msgid "Do not check if already clean before cleaning" +msgstr "" + +#: ../mat-gui:421 +msgid "Backup" +msgstr "" + +#: ../mat-gui:424 +msgid "Keep a backup copy" +msgstr "" + +#: ../mat-gui:427 +msgid "Add unsupported file to archives" +msgstr "" + +#: ../mat-gui:431 +msgid "Add non-supported (and so non-anonymised) file to output archive" +msgstr "" + +#: ../mat-gui:495 +#, python-format +msgid "Checking %s..." +msgstr "" + +#: ../mat-gui:500 +msgid "dirty" +msgstr "" + +#: ../mat-gui:513 ../mat-gui:532 +#, python-format +msgid "Cleaning %s..." +msgstr "" + +#: ../mat-gui:531 +#, python-format +msgid "Cleaning (strict) %s" +msgstr "" diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index ff9cd50..ec2c1cb --- a/setup.py +++ b/setup.py @@ -1,11 +1,9 @@ #!/usr/bin/env python import os -import sys -import glob -import subprocess -from distutils.core import setup +from distutils.core import setup, Command +from DistUtilsExtra.command import * from lib import mat @@ -15,17 +13,6 @@ from lib import mat if os.path.exists('MANIFEST'): os.remove('MANIFEST') - -def l10n(): - ''' - Compile .po files to .mo - ''' - for language in glob.glob('locale/*/'): - fpath = os.path.join(language, 'LC_MESSAGES', 'mat-gui.po') - output = fpath[:-2] + 'mo' - subprocess.call(['msgfmt', fpath, '-o', output]) - yield output - setup( name = 'MAT', version = mat.__version__, @@ -42,6 +29,12 @@ setup( ( 'share/applications', ['mat.desktop'] ), ( 'share/mat', ['FORMATS', 'logo.png'] ), ( 'share/doc/mat', ['README', 'TODO'] ), - ( 'share/mat/locale/', [i for i in l10n()] ), ], + cmdclass = { + 'build': build_extra.build_extra, + 'build_i18n': build_i18n.build_i18n, + 'build_help': build_help.build_help, + 'build_icons': build_icons.build_icons, + 'clean': clean_i18n.clean_i18n, + }, ) -- cgit v1.3