Revision: 5338
http://svn.sourceforge.net/translate/?rev=5338&view=rev
Author: zejn
Date: 2007-04-02 05:42:16 -0700 (Mon, 02 Apr 2007)
Log Message:
-----------
[django-migration] Add a way to filter translations for checks and tests.
Modified Paths:
--------------
src/branches/django-migration/Pootle/path.py
Added Paths:
-----------
src/branches/django-migration/Pootle/tests/
src/branches/django-migration/Pootle/tests/sample.po
src/branches/django-migration/Pootle/tests/test_utils_stats.py
Modified: src/branches/django-migration/Pootle/path.py
===================================================================
--- src/branches/django-migration/Pootle/path.py 2007-04-02 12:10:30 UTC (rev 5337)
+++ src/branches/django-migration/Pootle/path.py 2007-04-02 12:42:16 UTC (rev 5338)
@@ -36,7 +36,7 @@
import sys, warnings, os, fnmatch, glob, shutil, codecs, md5, re
from Pootle.utils.fstags import create_tag
-from Pootle.utils.stats import enumerating_classify, SimpleStats
+from Pootle.utils.stats import enumerating_classify, classify_unit, SimpleStats
from Pootle.utils import NotImplementedException
from Pootle.conf import instance
from Pootle.utils.convert import convert_translation_store
@@ -1056,9 +1056,7 @@
def _get_classify(self): # FIXME this should probably go to TranslationStore object
if not hasattr(self,'_classify'):
if self.is_po_file():
- # FIXME standard checker
- checker = checks.StandardChecker()
- self._classify = enumerating_classify( checker , [u for u in self.translationstore.units if not u.isheader() and not u.isobsolete()] )
+ self._classify = enumerating_classify( self.checker , [u for u in self.translationstore.units if not u.isheader() and not u.isobsolete()] )
else:
self._classify = None
return self._classify
@@ -1067,6 +1065,31 @@
# conveniently convert translation store
convert = convert_translation_store
+ def _get_checker(self):
+ # FIXME : make this translation project aware
+ if not hasattr(self, '_checker'):
+ self._checker = checks.StandardChecker()
+ return self._checker
+ checker = property(_get_checker)
+
+ def filter(self, exclude_list, start=None):
+ if start == None:
+ start = -1
+ start = start + 1
+ end = start
+ units = [u for u in self.translationstore.units if not u.isheader() and not u.isobsolete()]
+ for unit in units[start:]:
+ d = classify_unit(self.checker, unit)
+ if sum([int(d.has_key(f)) for f in exclude_list]) == 0:
+ return end, unit
+ end = end + 1
+
+ def iterfilter(self, exclude_list):
+ unit = self.filter(exclude_list)
+ while unit:
+ yield unit
+ unit = self.filter(exclude_list, unit[0])
+
def icon(self):
"returns name of the icon"
if self.isdir():
Added: src/branches/django-migration/Pootle/tests/sample.po
===================================================================
--- src/branches/django-migration/Pootle/tests/sample.po (rev 0)
+++ src/branches/django-migration/Pootle/tests/sample.po 2007-04-02 12:42:16 UTC (rev 5338)
@@ -0,0 +1,1373 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: translate-pootle@..."
+"POT-Creation-Date: 2006-08-07 12:36+0200\n"
+"PO-Revision-Date: 2006-08-08 11:48+0200\n"
+"Last-Translator: FULL NAME <EMAIL@..."
+"Language-Team: LANGUAGE <LL@..."
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Generated-By: pygettext.py 1.1\n"
+"X-Generator: Pootle 0.10rc1\n"
+
+#: adminpages.py:35 adminpages.py:71 adminpages.py:126 adminpages.py:187
+#: adminpages.py:273 adminpages.py:333 indexpage.py:58 indexpage.py:77
+#: indexpage.py:112 indexpage.py:166 indexpage.py:226 indexpage.py:312
+#: pagelayout.py:59 users.py:38 users.py:71 users.py:104 users.py:125
+#: translatepage.py:91
+msgid "Pootle Demo"
+msgstr "Demo de Pootle"
+
+#: adminpages.py:43 adminpages.py:79 adminpages.py:134 adminpages.py:195
+#: pagelayout.py:36
+msgid "Home"
+msgstr "Principal"
+
+#: adminpages.py:44 adminpages.py:197
+msgid "Users"
+msgstr "Usuarios"
+
+#: adminpages.py:45 adminpages.py:81 indexpage.py:75
+msgid "Languages"
+msgstr "Idiomas"
+
+#: adminpages.py:46 adminpages.py:136 indexpage.py:76
+msgid "Projects"
+msgstr "Proyectos"
+
+#: adminpages.py:47
+msgid "General options"
+msgstr "Opciones Generales"
+
+#: adminpages.py:48 users.py:129
+msgid "Option"
+msgstr "Opción"
+
+#: adminpages.py:49 users.py:130
+msgid "Current value"
+msgstr "Valor actual"
+
+#: adminpages.py:50 adminpages.py:82 adminpages.py:137 adminpages.py:198
+#: users.py:142
+msgid "Save changes"
+msgstr "Guardar cambios"
+
+#: adminpages.py:54
+msgid "Title"
+msgstr "Título"
+
+#: adminpages.py:54
+msgid "Description"
+msgstr "Descripción"
+
+#: adminpages.py:54
+msgid "Base URL"
+msgstr "URL Base"
+
+#: adminpages.py:54
+msgid "Home Page"
+msgstr "Página Principal"
+
+#: adminpages.py:80 adminpages.py:135 adminpages.py:196
+msgid "Main admin page"
+msgstr "Página Principal de Administración"
+
+#: adminpages.py:86
+msgid "ISO Code"
+msgstr "Código ISO"
+
+#: adminpages.py:87 adminpages.py:142 adminpages.py:203 users.py:80
+msgid "Full Name"
+msgstr "Nombre Completo"
+
+#: adminpages.py:87
+msgid "(add language here)"
+msgstr "(agregar idioma aquí)"
+
+#: adminpages.py:88
+msgid "Special Chars"
+msgstr "Carácteres Especiales"
+
+#: adminpages.py:88
+msgid "(special characters)"
+msgstr "(caracteres especiales)"
+
+#: adminpages.py:89 indexpage.py:189
+msgid "Number of Plurals"
+msgstr "Número de Plurales"
+
+#: adminpages.py:89
+msgid "(number of plurals)"
+msgstr "(número de plurales)"
+
+#: adminpages.py:90 indexpage.py:190
+msgid "Plural Equation"
+msgstr "Ecuación del Plural"
+
+#: adminpages.py:90
+msgid "(plural equation)"
+msgstr "(ecuación del plural)"
+
+#: adminpages.py:91
+msgid "Remove Language"
+msgstr "Eliminar Idioma"
+
+#. l10n: The parameter is a languagecode, projectcode or username
+#: adminpages.py:106 adminpages.py:168 adminpages.py:229 adminpages.py:392
+#, python-format
+msgid "Remove %s"
+msgstr "Eliminar %s"
+
+#: adminpages.py:124
+msgid "Standard"
+msgstr "Estándar"
+
+#: adminpages.py:141
+msgid "Project Code"
+msgstr "Código del Proyecto"
+
+#: adminpages.py:142
+msgid "(add project here)"
+msgstr "(agregar proyecto aquí)"
+
+#: adminpages.py:143
+msgid "Project Description"
+msgstr "Descripción del Proyecto"
+
+#: adminpages.py:143
+msgid "(project description)"
+msgstr "(descripción del proyecto)"
+
+#: adminpages.py:144
+msgid "Checker Style"
+msgstr "Estilo del Verificador"
+
+#: adminpages.py:145
+msgid "Create MO Files"
+msgstr "Crear Archivos MO"
+
+#: adminpages.py:146
+msgid "Remove Project"
+msgstr "Eliminar Proyecto"
+
+#: adminpages.py:202 users.py:46
+msgid "Login"
+msgstr "Iniciar sesión"
+
+#: adminpages.py:203 users.py:274
+msgid "(add full name here)"
+msgstr "(agregar nombre completo aquí)"
+
+#: adminpages.py:204 users.py:77
+msgid "Email Address"
+msgstr "Dirección de Correo Electrónico"
+
+#: adminpages.py:204 users.py:277
+msgid "(add email here)"
+msgstr "(agregar correo-e aquí)"
+
+#: adminpages.py:205 users.py:83
+msgid "Password"
+msgstr "Contraseña"
+
+#: adminpages.py:205 users.py:271
+msgid "(add password here)"
+msgstr "(agregar contraseña aquí)"
+
+#: adminpages.py:206
+msgid "Activated"
+msgstr "Activado"
+
+#: adminpages.py:206
+msgid "Activate New User"
+msgstr "Activar Nuevo Usuario"
+
+#: adminpages.py:207
+msgid "Remove User"
+msgstr "Eliminar Usuario"
+
+#: adminpages.py:261
+msgid "Back to main page"
+msgstr "Regresar a la página principal"
+
+#: adminpages.py:262
+msgid "Existing languages"
+msgstr "Idiomas existentes"
+
+#. l10n: This refers to updating the translation files from the templates like with .pot files
+#: adminpages.py:266
+msgid "Update Languages"
+msgstr "Actualizar Idiomas"
+
+#: adminpages.py:267
+#, python-format
+msgid "Pootle Admin: %s"
+msgstr "Administración de Pootle: %s"
+
+#: adminpages.py:268 adminpages.py:330
+msgid "You do not have the rights to administer this project."
+msgstr "No tiene los derechos para administrar este proyecto."
+
+#. l10n: This refers to updating the translation files from the templates like with .pot files
+#: adminpages.py:270
+msgid "Update from templates"
+msgstr "Actualizar desde plantillas"
+
+#: adminpages.py:278
+msgid "Add Language"
+msgstr "Agregar Idioma"
+
+#. l10n: This is the page title. The first parameter is the language name, the second parameter is the project name
+#: adminpages.py:310
+#, python-format
+msgid "Pootle Admin: %s %s"
+msgstr "Administración Pootle: %s %s"
+
+#: adminpages.py:311
+msgid "Project home page"
+msgstr "Página principal del proyecto"
+
+#: adminpages.py:329
+#, python-format
+msgid "Cannot set rights for username %s - user does not exist"
+msgstr ""
+"No se pueden asignar derechos para el nombre de usuario %s - el usuario no "
+"existe"
+
+#: adminpages.py:346
+msgid "This is a GNU-style project (one directory, files named per language)."
+msgstr ""
+"Este es un proyecto al estilo GNU (un directorio, archivos nombrados por "
+"idioma)."
+
+#: adminpages.py:348
+msgid "This is a standard style project (one directory per language)."
+msgstr "Este es un proyecto al estilo estándar (un directorio por idioma)."
+
+#: adminpages.py:349
+msgid "User Permissions"
+msgstr "Permisos del Usuario"
+
+#: adminpages.py:350 users.py:74 users.py:107
+msgid "Username"
+msgstr "Nombre de usuario"
+
+#: adminpages.py:351
+msgid "(select to add user)"
+msgstr "(selecciona para agregar un usuario)"
+
+#: adminpages.py:352
+msgid "Rights"
+msgstr "Derechos"
+
+#: adminpages.py:353 indexpage.py:929
+msgid "Remove"
+msgstr "Eliminar"
+
+#: adminpages.py:373
+msgid "Update Rights"
+msgstr "Actualizar Derechos"
+
+#: indexpage.py:49
+msgid "About Pootle"
+msgstr "Acerca de Pootle"
+
+#: indexpage.py:50
+msgid ""
+"<strong>Pootle</strong> is a simple web portal that should allow you to "
+"<strong>translate</strong>! Since Pootle is <strong>Free Software</strong>, "
+"you can download it and run your own copy if you like. You can also help "
+"participate in the development in many ways (you don't have to be able to "
+"program)."
+msgstr ""
+"<strong>Pootle</strong> es un simple portal web que le permite "
+"<strong>traducir</strong>! Mientras que Pootle es <strong>Software Libre</"
+"strong>, puede descargarlo y ejecutar su propia copia si lo desea. Puede "
+"incluso ayudar participando en el desarrollo en muchas formas (no tiene que "
+"saber programar)."
+
+#: indexpage.py:51
+msgid ""
+"The Pootle project itself is hosted at <a href=\"http://translate."
+"sourceforge.net/\">translate.sourceforge.net</a> where you can find the "
+"details about source code, mailing lists etc."
+msgstr ""
+"El proyecto Pootle está hospedado en <a href=\"http://translate.sourceforge."
+"net/\">translate.sourceforge.net</a> donde puede encontrar detalles acerca "
+"del código, lista de correos, etc."
+
+#. l10n: If your language uses right-to-left layout and you leave the English untranslated, consider enclosing the necessary text with <span dir="ltr">.......</span> to help browsers to display it correctly
+#: indexpage.py:53
+msgid ""
+"The name stands for <b>PO</b>-based <b>O</b>nline <b>T</b>ranslation / <b>L</"
+"b>ocalization <b>E</b>ngine, but you may need to read <a href=\"http://www."
+"thechestnut.com/flumps.htm\">this</a>."
+msgstr ""
+"El nombre quiere decir \"<b>PO</b>-based <b>O</b>nline <b>T</b>ranslation / "
+"<b>L</b>ocalization <b>E</b>ngine (Motor para la Traducción en Línea basado "
+"en PO), pero probablemente necesite leer <a href=\"http://www.thechestnut."
+"com/flumps.htm\">ésto</a>."
+
+#: indexpage.py:54
+msgid "Versions"
+msgstr "Versiones"
+
+#. l10n: If your language uses right-to-left layout and you leave the English untranslated, consider enclosing the necessary text with <span dir="ltr">.......</span> to help browsers to display it correctly
+#: indexpage.py:56
+#, fuzzy, python-format
+#, python-format
+msgid ""
+"This site is running:<br />Pootle %s<br />Translate Toolkit %s<br />jToolkit "
+"%s<br />Kid %s<br />ElementTree %s<br />Python %s (on %s/%s)"
+msgstr ""
+"Este sitio está ejecutando:<br />Pootle %s<br />Herramientas de Traducción "
+"(Toolkit) %s<br />jToolkit %s<br />Python %s (en %s/%s)"
+
+#: indexpage.py:74
+msgid "About this Pootle server"
+msgstr "Acerca de este servidor Pootle"
+
+#: indexpage.py:107
+#, python-format
+msgid "User Page for: %s"
+msgstr "Página de Usuario para: %s"
+
+#: indexpage.py:109
+msgid "Change options"
+msgstr "Cambiar opciones"
+
+#: indexpage.py:110
+msgid "Admin page"
+msgstr "Página de administración"
+
+#: indexpage.py:111
+msgid "Quick Links"
+msgstr "Vínculos Rápidos"
+
+#: indexpage.py:115
+msgid "Please click on 'Change options' and select some languages and projects"
+msgstr ""
+"Por favor haga click en 'Cambiar opciones' y seleccione algunos idiomas y "
+"proyectos"
+
+#: indexpage.py:164
+#, python-format
+msgid "%d project, average %d%% translated"
+msgid_plural "%d projects, average %d%% translated"
+msgstr[0] "%d proyecto, en promedio %d%% traducido"
+msgstr[1] "%d proyectos, en promedio %d%% traducido"
+
+#. l10n: The first parameter is the name of the installation
+#. l10n: The second parameter is the name of the project/language
+#. l10n: This is used as a page title. Most languages won't need to change this
+#: indexpage.py:170 indexpage.py:230
+#, fuzzy, python-format
+#, python-format
+msgid "%s: %s"
+msgstr "%s %s"
+
+#: indexpage.py:172 indexpage.py:232 pagelayout.py:40 pagelayout.py:140
+msgid "Admin"
+msgstr "Administración"
+
+#: indexpage.py:186
+msgid "Language Code"
+msgstr "Código del Idioma"
+
+#: indexpage.py:187
+msgid "Language Name"
+msgstr "Nombre del Idioma"
+
+#: indexpage.py:224
+#, python-format
+msgid "%d language, average %d%% translated"
+msgid_plural "%d languages, average %d%% translated"
+msgstr[0] "%d idioma, en promedio %d%% traducido"
+msgstr[1] "%d idiomas, en promedio %d%% traducido"
+
+#: indexpage.py:235
+#, fuzzy
+msgid "Language"
+msgstr "Idioma:"
+
+#. l10n: The first parameter is the name of the installation (like "Pootle")
+#: indexpage.py:314
+#, fuzzy, python-format
+#, python-format
+msgid "%s: Project %s, Language %s"
+msgstr "Pootle: Proyecto %s, Idioma %s"
+
+#. l10n: text next to search field
+#: indexpage.py:322 translatepage.py:121
+msgid "Search"
+msgstr "Búsqueda"
+
+#: indexpage.py:369
+msgid "Cannot upload file, no file attached"
+msgstr "No se puede enviar archivo, no se adjuntó archivo"
+
+#: indexpage.py:375
+msgid "Can only upload PO files and zips of PO files"
+msgstr "Sólo se pueden enviar archivos PO y archivos PO comprimidos"
+
+#: indexpage.py:483 indexpage.py:486 translatepage.py:199 translatepage.py:202
+msgid "Assign Strings"
+msgstr "Asignando Cadenas"
+
+#: indexpage.py:484 translatepage.py:201
+msgid "Assign Action"
+msgstr "Asignando Acción"
+
+#: indexpage.py:485 translatepage.py:200
+msgid "Assign to User"
+msgstr "Asignando al Usuario"
+
+#: indexpage.py:491
+msgid "goals"
+msgstr "metas"
+
+#: indexpage.py:491
+msgid "Enter goal name"
+msgstr "Introduzca el nombre de la meta"
+
+#: indexpage.py:491
+msgid "Add Goal"
+msgstr "Agregar Meta"
+
+#: indexpage.py:495 indexpage.py:497
+msgid "Upload File"
+msgstr "Enviar Archivo"
+
+#: indexpage.py:496
+msgid "Select file to upload"
+msgstr "Seleccionar archivo para enviar"
+
+#: indexpage.py:599
+msgid "Not in a goal"
+msgstr "No forma parte de una meta"
+
+#: indexpage.py:620
+msgid "Add User"
+msgstr "Agregar Usuario"
+
+#: indexpage.py:658
+msgid "PO file"
+msgstr "Archivo PO"
+
+#: indexpage.py:662
+msgid "XLIFF file"
+msgstr "Archivo XLIFF"
+
+#: indexpage.py:666
+msgid "Qt .ts file"
+msgstr "Archivo Qt .ts"
+
+#: indexpage.py:670
+msgid "CSV file"
+msgstr "Archivo CSV"
+
+#: indexpage.py:675
+msgid "MO file"
+msgstr "Archivo MO"
+
+#: indexpage.py:679
+msgid "Update"
+msgstr "Actualizar"
+
+#: indexpage.py:683 projects.py:141
+msgid "Commit"
+msgstr ""
+
+#: indexpage.py:720
+msgid "All Strings"
+msgstr "Todas las cadenas"
+
+#: indexpage.py:720 pagelayout.py:218
+msgid "Untranslated"
+msgstr "Sin traducir"
+
+#: indexpage.py:720
+msgid "Unassigned"
+msgstr "Sin asignar"
+
+#: indexpage.py:720
+msgid "Unassigned and Untranslated"
+msgstr "Sin asignar y sin traducir"
+
+#: indexpage.py:727
+msgid "Set Goal"
+msgstr "Asignar Meta"
+
+#: indexpage.py:733
+msgid "Assign To"
+msgstr "Asignar A"
+
+#: indexpage.py:762
+msgid "Show Editing Functions"
+msgstr ""
+
+#: indexpage.py:762
+#, fuzzy
+msgid "Show Statistics"
+msgstr "Mostrar Pistas"
+
+#: indexpage.py:763
+msgid "Show Tracks"
+msgstr "Mostrar Pistas"
+
+#: indexpage.py:763
+msgid "Hide Tracks"
+msgstr "Ocultar Pistas"
+
+#. l10n: "Checks" are quality checks that Pootle performs on translations to test for common mistakes
+#: indexpage.py:765
+msgid "Show Checks"
+msgstr "Mostrar Verificaciones"
+
+#: indexpage.py:765
+msgid "Hide Checks"
+msgstr "Ocultar Verificaciones"
+
+#: indexpage.py:766
+msgid "Show Goals"
+msgstr "Mostrar Metas"
+
+#: indexpage.py:766
+msgid "Hide Goals"
+msgstr "Ocultar Metas"
+
+#: indexpage.py:767
+msgid "Show Assigns"
+msgstr "Mostrar Asignaciones"
+
+#: indexpage.py:767
+msgid "Hide Assigns"
+msgstr "Ocultar Asignaciones"
+
+#: indexpage.py:776
+#, python-format
+msgid "All Goals: %s"
+msgstr "Todas las Metas: %s"
+
+#: indexpage.py:782
+msgid "Translate My Strings"
+msgstr "Traducir Mis Cadenas"
+
+#: indexpage.py:784
+msgid "View My Strings"
+msgstr "Ver Mis Cadenas"
+
+#: indexpage.py:789
+msgid "No strings assigned to you"
+msgstr "No tiene cadenas asignadas"
+
+#: indexpage.py:793
+msgid "Quick Translate My Strings"
+msgstr "Traducción Rápida de Mis Cadenas"
+
+#: indexpage.py:797
+msgid "No untranslated strings assigned to you"
+msgstr "No tiene cadenas sin traducir asignadas"
+
+#: indexpage.py:801
+msgid "Review Suggestions"
+msgstr "Revisar Sugerencias"
+
+#: indexpage.py:803
+msgid "View Suggestions"
+msgstr "Ver Sugerencias"
+
+#: indexpage.py:808
+msgid "Quick Translate"
+msgstr "Traducción Rápida"
+
+#: indexpage.py:810
+msgid "View Untranslated"
+msgstr "Ver No Traducidas"
+
+#: indexpage.py:814
+msgid "No untranslated items"
+msgstr "No hay elementos sin traducir"
+
+#: indexpage.py:817
+msgid "Translate All"
+msgstr "Traducir Todo"
+
+#: indexpage.py:832
+msgid "ZIP of goal"
+msgstr "ZIP de la Meta"
+
+#: indexpage.py:834
+msgid "ZIP of folder"
+msgstr "ZIP de la carpeta"
+
+#: indexpage.py:841
+msgid "Generate SDF"
+msgstr "Generar SDF"
+
+#: indexpage.py:894
+#, python-format
+msgid "%d string (%d%%) failed"
+msgid_plural "%d strings (%d%%) failed"
+msgstr[0] "%d cadena (%d%%) falló"
+msgstr[1] "%d cadenas (%d%%) fallaron"
+
+#: indexpage.py:924
+#, python-format
+msgid "%d/%d words (%d%%) assigned"
+msgstr "%d/%d palabras (%d%%) asignadas"
+
+#: indexpage.py:925 indexpage.py:927
+#, python-format
+msgid "[%d/%d strings]"
+msgstr "[%d/%d cadenas]"
+
+#: indexpage.py:926 pagelayout.py:204
+#, python-format
+msgid "%d/%d words (%d%%) translated"
+msgstr "%d/%d palabras (%d%%) traducido"
+
+#: pagelayout.py:37
+msgid "All projects"
+msgstr "Todos los Proyectos"
+
+#: pagelayout.py:38
+msgid "All languages"
+msgstr "Todos los Idiomas"
+
+#: pagelayout.py:39
+msgid "My account"
+msgstr "Mi cuenta"
+
+#: pagelayout.py:41
+msgid "Docs & help"
+msgstr "Documentos & Ayuda"
+
+#: pagelayout.py:42
+msgid "Log out"
+msgstr "Terminar Sesión"
+
+#: pagelayout.py:43
+msgid "Log in"
+msgstr "Iniciar sesión"
+
+#. l10n: Verb, as in "to register"
+#: pagelayout.py:45
+msgid "Register"
+msgstr "Registro"
+
+#: pagelayout.py:46
+msgid "Activate"
+msgstr "Activar"
+
+#: pagelayout.py:63
+#, fuzzy
+msgid "Pootle Logo"
+msgstr "Demo de Pootle"
+
+#: pagelayout.py:64
+#, fuzzy
+msgid "WordForge Translation Project"
+msgstr "<b>Traducción Actual:</b>"
+
+#: pagelayout.py:129
+msgid "All goals"
+msgstr "Todas las metas"
+
+#: pagelayout.py:200
+#, python-format
+msgid "%d/%d files"
+msgstr "%d/%d archivos"
+
+#: pagelayout.py:203
+#, python-format
+msgid "%d file"
+msgid_plural "%d files"
+msgstr[0] "%d archivo"
+msgstr[1] "%d archivos"
+
+#: pagelayout.py:205
+#, python-format
+msgid "%d/%d strings"
+msgstr "%d/%d cadenas"
+
+#: pagelayout.py:211 users.py:131
+msgid "Name"
+msgstr "Nombre"
+
+#: pagelayout.py:212
+#, fuzzy
+msgid "Translated"
+msgstr "Traducir"
+
+#: pagelayout.py:213
+#, fuzzy
+msgid "Translated percentage"
+msgstr "Traducir Mis Cadenas"
+
+#: pagelayout.py:214
+#, fuzzy
+msgid "Translated words"
+msgstr "Traducir"
+
+#: pagelayout.py:215
+msgid "Fuzzy"
+msgstr ""
+
+#: pagelayout.py:216
+msgid "Fuzzy percentage"
+msgstr ""
+
+#: pagelayout.py:217
+msgid "Fuzzy words"
+msgstr ""
+
+#: pagelayout.py:219
+#, fuzzy
+msgid "Untranslated percentage"
+msgstr "Sin traducir"
+
+#: pagelayout.py:220
+#, fuzzy
+msgid "Untranslated words"
+msgstr "Sin traducir"
+
+#: pagelayout.py:221
+#, fuzzy
+msgid "Total"
+msgstr "metas"
+
+#: pagelayout.py:222
+msgid "Total words"
+msgstr ""
+
+#: pagelayout.py:223
+msgid "Graph"
+msgstr ""
+
+#: pootle.py:226
+msgid "Login failed"
+msgstr ""
+
+#: pootle.py:270 pootle.py:296
+msgid "Redirecting to login..."
+msgstr "Redirigiendo para iniciar sesión"
+
+#: pootle.py:273
+msgid "Need to log in to access home page"
+msgstr "Necesita iniciar sesión para accesar a la página principal"
+
+#: pootle.py:299
+msgid "Need to log in to access admin page"
+msgstr "Necesita iniciar sesión para accesar a la página de administración"
+
+#: pootle.py:306
+msgid "Redirecting to home..."
+msgstr "Redirigiendo a la página principal..."
+
+#: pootle.py:309
+msgid "You do not have the rights to administer pootle."
+msgstr "No cuenta con los derechos necesarios para administrar pootle."
+
+#: projects.py:133
+msgid "View"
+msgstr "Ver"
+
+#: projects.py:134 translatepage.py:570
+msgid "Suggest"
+msgstr "Segerir"
+
+#: projects.py:135
+msgid "Translate"
+msgstr "Traducir"
+
+#: projects.py:136
+msgid "Review"
+msgstr "Revisar"
+
+#: projects.py:137
+msgid "Archive"
+msgstr "Archivar"
+
+#: projects.py:138
+msgid "Compile PO files"
+msgstr "Compilar archivos PO"
+
+#: projects.py:139
+msgid "Assign"
+msgstr "Asignar"
+
+#: projects.py:140
+msgid "Administrate"
+msgstr "Administrar"
+
+#: projects.py:197
+msgid "You cannot remove the \"nobody\" or \"default\" user"
+msgstr "No puede eliminar el usuario \"nobody\" o \"default\""
+
+#: projects.py:334 projects.py:394
+msgid "You do not have rights to alter goals here"
+msgstr "No tiene los derechos para alterar las metas aquí"
+
+#: projects.py:454
+msgid "You do not have rights to upload files here"
+msgstr "No tiene los derechos para enviar archivos aquí"
+
+#: projects.py:457
+msgid "You do not have rights to upload new files here"
+msgstr "No tiene los derechos para enviar nuevos archivos aquí"
+
+#: projects.py:466
+msgid "You do not have rights to update files here"
+msgstr "No tiene los derechos para actualizar archivos aquí"
+
+#: projects.py:536
+#, fuzzy
+msgid "You do not have rights to commit files here"
+msgstr "No tiene los derechos para enviar archivos aquí"
+
+#: projects.py:864 projects.py:905
+msgid "You do not have rights to alter assignments here"
+msgstr "No tiene los derechos para modificar asignaciones aquí"
+
+#: projects.py:1109
+msgid "You do not have rights to change translations here"
+msgstr "No tiene los derechos para cambiar las traducciones aquí"
+
+#: projects.py:1119
+msgid "You do not have rights to suggest changes here"
+msgstr "No tiene los derechos para segerir cambios aquí"
+
+#: projects.py:1135 projects.py:1158
+msgid "You do not have rights to review suggestions here"
+msgstr "No tiene los derechos para revisar las sugestiones aquí"
+
+#: users.py:36
+msgid "Login to Pootle"
+msgstr "Inisión de Sesión en Pootle"
+
+#: users.py:41
+msgid "Username:"
+msgstr "Nombre de usuario:"
+
+#: users.py:43
+msgid "Password:"
+msgstr "Contraseña:"
+
+#: users.py:44
+msgid "Language:"
+msgstr "Idioma:"
+
+#: users.py:53
+msgid "Default"
+msgstr "Por Defecto"
+
+#: users.py:65
+msgid "Please enter your registration details"
+msgstr "Por favor introduzca los detalles de su registro"
+
+#: users.py:68
+msgid "Pootle Registration"
+msgstr "Registro en Pootle"
+
+#: users.py:75 users.py:108
+msgid "Your requested username"
+msgstr "Su nombre de usuario solicitado"
+
+#: users.py:78
+msgid "Must be a valid email address"
+msgstr "Debe ser una dirección electrónica válida"
+
+#: users.py:81
+msgid "Your full name"
+msgstr "Su nombre completo"
+
+#: users.py:84
+msgid "Your desired password"
+msgstr "Su contraseña seleccionada"
+
+#: users.py:86
+msgid "Register Account"
+msgstr "Registrar Cuenta"
+
+#: users.py:95
+msgid "Please enter your activation details"
+msgstr "Por favor introduce sus detalles de activación"
+
+#: users.py:100
+msgid "Pootle Account Activation"
+msgstr "Activación de Cuentas Pootle"
+
+#: users.py:110
+msgid "Activation Code"
+msgstr "Código de Activación"
+
+#: users.py:111
+msgid "The activation code you received"
+msgstr "El código de activación que ha recibido"
+
+#: users.py:113
+msgid "Activate Account"
+msgstr "Activar Cuenta"
+
+#: users.py:123
+#, python-format
+msgid "Options for: %s"
+msgstr "Opciones para: %s"
+
+#: users.py:128
+msgid "Personal Details"
+msgstr "Detalles Personales"
+
+#: users.py:133
+msgid "Email"
+msgstr "Correo-e"
+
+#: users.py:135
+msgid "Translation Interface Configuration"
+msgstr "Configuración de la Interface de Traducción"
+
+#: users.py:136
+msgid "User Interface language"
+msgstr "Idioma de la Interfase con el Usuario"
+
+#: users.py:137
+msgid "My Projects"
+msgstr "Mis Proyectos"
+
+#: users.py:139
+msgid "My Languages"
+msgstr "Mis Idiomas"
+
+#: users.py:141
+msgid "Home page"
+msgstr "Página principal"
+
+#: users.py:175
+msgid "Input Height (in lines)"
+msgstr "Alto de la Entrada (en líneas)"
+
+#: users.py:175
+msgid "Input Width (in characters)"
+msgstr "Ancho de la Entrada (en carácteres)"
+
+#: users.py:176
+msgid "Number of rows in view mode"
+msgstr "Número de renglones en el modo de vista"
+
+#: users.py:177
+msgid "Number of rows in translate mode"
+msgstr "Número de renglones en el modo de traducción"
+
+#: users.py:230
+msgid "You need to be siteadmin to change users"
+msgstr "Necesita ser el administrador del sitio para cambiar usuarios"
+
+#: users.py:307
+msgid ""
+"You (or someone else) attempted to register an account with your username.\n"
+msgstr ""
+
+#: users.py:308
+msgid "We don't store your actual password but only a hash of it.\n"
+msgstr ""
+
+#: users.py:310
+#, python-format
+msgid "If you have a problem with registration, please contact %s.\n"
+msgstr ""
+
+#: users.py:312
+msgid ""
+"If you have a problem with registration, please contact the site "
+"administrator.\n"
+msgstr ""
+
+#: users.py:313
+msgid ""
+"That username already exists. An email will be sent to the registered email "
+"address.\n"
+msgstr ""
+
+#: users.py:315
+#, python-format
+msgid "Proceeding to <a href='%s'>login</a>\n"
+msgstr ""
+
+#: users.py:319
+#, python-format
+msgid "You must supply a valid password of at least %d characters."
+msgstr ""
+
+#: users.py:323
+msgid "A Pootle account has been created for you using this email address.\n"
+msgstr ""
+
+#: users.py:325
+msgid "To activate your account, follow this link:\n"
+msgstr ""
+
+#: users.py:331
+#, fuzzy, python-format
+#, python-format
+msgid ""
+"Your activation code is:\n"
+"%s\n"
+msgstr "Código de Activación"
+
+#: users.py:333
+msgid ""
+"If you are unable to follow the link, please enter the above code at the "
+"activation page.\n"
+msgstr ""
+
+#: users.py:334
+msgid ""
+"This message is sent to verify that the email address is in fact correct. If "
+"you did not want to register an account, you may simply ignore the message.\n"
+msgstr ""
+
+#: users.py:336
+#, python-format
+msgid ""
+"Account created. You will be emailed login details and an activation code. "
+"Please enter your activation code on the <a href='%s'>activation page</a>."
+msgstr ""
+
+#: users.py:338
+msgid "(Or simply click on the activation link in the email)"
+msgstr ""
+
+#: users.py:340
+#, fuzzy, python-format
+#, python-format
+msgid "Your user name is: %s\n"
+msgstr "Su nombre completo"
+
+#: users.py:342
+#, fuzzy, python-format
+#, python-format
+msgid "Your password is: %s\n"
+msgstr "Su contraseña seleccionada"
+
+#: users.py:343
+#, python-format
+msgid "Your registered email address is: %s\n"
+msgstr ""
+
+#: users.py:367
+msgid "Redirecting to Registration Page..."
+msgstr "Redirigiendo a la página de Registro"
+
+#: users.py:391
+msgid "Redirecting to login Page..."
+msgstr "Redirigiendo a la página de inicio de sesión..."
+
+#: users.py:394
+msgid "Your account has been activated! Redirecting to login..."
+msgstr "Su cuenta ha sido activada! Redirigiendo al inicio de sesión..."
+
+#: users.py:398
+#, fuzzy
+msgid "The activation information was not valid."
+msgstr "El vínculo de activación no es válido"
+
+#: users.py:399
+msgid "Activation Failed"
+msgstr "Falló la Activación"
+
+#: users.py:493
+msgid "Input height must be numeric"
+msgstr "La altura de entrada debe ser numérica"
+
+#: users.py:494
+msgid "Input width must be numeric"
+msgstr "El ancho de entrada debe ser numérico"
+
+#: users.py:495
+msgid "The number of rows displayed in view mode must be numeric"
+msgstr "El número de renglones mostrados en el modo de vista debe ser numérico"
+
+#: users.py:496
+msgid "The number of rows displayed in translate mode must be numeric"
+msgstr ""
+"El número de renglones mostradso en el modo de traducción debe ser numérico"
+
+#: translatepage.py:80
+#, python-format
+msgid ""
+"%d/%d translated\n"
+"(%d blank, %d fuzzy)"
+msgstr ""
+"%d/%d traducidas\n"
+"(%d en blanco, %d vagas)"
+
+#. l10n: first parameter: name of the installation (like "Pootle")
+#. l10n: second parameter: project name
+#. l10n: third parameter: target language
+#. l10n: fourth parameter: file name
+#: translatepage.py:96
+#, fuzzy, python-format
+#, python-format
+msgid "%s: translating %s into %s: %s"
+msgstr "Pootle: traduciendo %s en %s: %s"
+
+#: translatepage.py:110
+msgid "Original"
+msgstr "Original"
+
+#: translatepage.py:111
+msgid "Translation"
+msgstr "Traducción"
+
+#: translatepage.py:114
+msgid "Accept"
+msgstr "Aceptar"
+
+#: translatepage.py:115
+msgid "Reject"
+msgstr "Rechazar"
+
+#. l10n: This heading refers to related translations and terminology
+#: translatepage.py:117
+msgid "Related"
+msgstr ""
+
+#. l10n: "batch" refers to the set of translations that were reviewed
+#: translatepage.py:135
+msgid "End of batch"
+msgstr "Fin de la rutina"
+
+#: translatepage.py:137
+msgid "Click here to return to the index"
+msgstr "Haga click aquí para regresar al índice"
+
+#. l10n: noun (the start)
+#: translatepage.py:150 translatepage.py:153
+msgid "Start"
+msgstr "Iniciar"
+
+#. l10n: the parameter refers to the number of messages
+#: translatepage.py:157 translatepage.py:160
+#, python-format
+msgid "Previous %d"
+msgstr "Previos %d"
+
+#. l10n: the third parameter refers to the total number of messages in the file
+#: translatepage.py:162
+#, python-format
+msgid "Items %d to %d of %d"
+msgstr "Elementos %d a %d de %d"
+
+#. l10n: the parameter refers to the number of messages
+#: translatepage.py:167 translatepage.py:170
+#, python-format
+msgid "Next %d"
+msgstr "Siguiente %d"
+
+#. l10n: noun (the end)
+#: translatepage.py:173 translatepage.py:176
+msgid "End"
+msgstr "Fin"
+
+#. l10n: the parameter is the name of one of the quality checks, like "fuzzy"
+#: translatepage.py:192
+#, python-format
+msgid "checking %s"
+msgstr "verificando %s"
+
+#: translatepage.py:334
+#, python-format
+msgid "There are no items matching that search ('%s')"
+msgstr "No existen elmentos que cumplan con la búsquda ('%s')"
+
+#: translatepage.py:336
+msgid "You have finished going through the items you selected"
+msgstr "Ha terminado de revisar con los elementos que ha seleccionado"
+
+#: translatepage.py:534
+msgid "Singular"
+msgstr "Singular"
+
+#: translatepage.py:535
+msgid "Plural"
+msgstr "Plural"
+
+#. l10n: verb
+#: translatepage.py:549
+msgid "Edit"
+msgstr "Editar"
+
+#. l10n: verb
+#: translatepage.py:566
+msgid "Copy"
+msgstr "Copiar"
+
+#: translatepage.py:567 translatepage.py:741
+msgid "Skip"
+msgstr "Saltar"
+
+#. l10n: verb
+#: translatepage.py:569 translatepage.py:740
+msgid "Back"
+msgstr ""
+
+#: translatepage.py:571
+msgid "Submit"
+msgstr "Enviar"
+
+#. l10n: action that increases the height of the textarea
+#: translatepage.py:576
+msgid "Grow"
+msgstr "Crecer"
+
+#. l10n: action that decreases the height of the textarea
+#: translatepage.py:578
+msgid "Shrink"
+msgstr "Encoger"
+
+#. l10n: action that increases the width of the textarea
+#: translatepage.py:580
+msgid "Broaden"
+msgstr "Ensanchar"
+
+#. l10n: action that decreases the width of the textarea
+#: translatepage.py:582
+msgid "Narrow"
+msgstr "Estrechar"
+
+#. l10n: action that resets the size of the textarea
+#: translatepage.py:584
+msgid "Reset"
+msgstr "Restablecer"
+
+#: translatepage.py:602 translatepage.py:695 translatepage.py:729
+#: translatepage.py:762
+#, python-format
+msgid "Plural Form %d"
+msgstr "Forma Plural %d"
+
+#: translatepage.py:617
+msgid ""
+"Translation not possible because plural information for your language is not "
+"available. Please contact the site administrator."
+msgstr ""
+
+#: translatepage.py:699
+msgid "Current Translation:"
+msgstr "<b>Traducción Actual:</b>"
+
+#: translatepage.py:710
+#, python-format
+msgid "Suggestion %d by %s:"
+msgstr "Segerencia %d de %s:"
+
+#: translatepage.py:712
+#, python-format
+msgid "Suggestion %d:"
+msgstr "Sugerencia %d:"
+
+#: translatepage.py:715
+#, python-format
+msgid "Suggestion by %s:"
+msgstr "Segerencia de %s:"
+
+#: translatepage.py:717
+msgid "Suggestion:"
+msgstr "Sugerencia:"
+
+#: indexpage.py:731
+msgid "Select Multiple"
+msgstr "Selección Múltiple"
+
+#~ msgid "Pootle"
+#~ msgstr "Pootle"
+
+#~ msgid "Pootle: %s"
+#~ msgstr "Pootle: %s"
+
+#~ msgid ""
+#~ "<strong>Pootle</strong> is a simple web portal that should allow you to "
+#~ "<strong>translate</strong>!"
+#~ msgstr ""
+#~ "<strong>Pootle</strong> es un portal sencillo que le permite "
+#~ "<strong>traducir</strong>!"
+
+#~ msgid "parent folder"
+#~ msgstr "carpeta de nivel superior"
+
+#~ msgid "<h3 class=\"title\">Projects</h3>"
+#~ msgstr "<h3 class=\"title\">Proyectos</h3>"
+
+#~ msgid "%d files, %d/%d strings (%d%%) translated"
+#~ msgstr "%d archivos, %d/%d cadenas (%d%%) traducidas"
+
+#~ msgid "%s language"
+#~ msgstr "idioma %s"
+
+#~ msgid "%d strings (%d%%) failed"
+#~ msgstr "%d cadenas (%d%%) falladas"
+
+#~ msgid "this is a demo installation of pootle"
+#~ msgstr "este es una instlación de demostración de pootle"
+
+#~ msgid "current folder"
+#~ msgstr "carpeta actual"
+
+#~ msgid "Log In"
+#~ msgstr "Inciar Sesión"
+
+#~ msgid "login status"
+#~ msgstr "estado de la sesión"
+
+#~ msgid "project root"
+#~ msgstr "inicio del proyecto"
+
+#~ msgid "%s project"
+#~ msgstr "proyecto %s"
+
+#~ msgid "you do not have rights to suggest changes here"
+#~ msgstr "usted no tiene los derechos para segerir cambios aquí"
+
+#~ msgid "you do not have rights to change translations here"
+#~ msgstr ""
+#~ "usted no tiene los derechos para sugerir cambios en las traducciones"
+
+#~ msgid "%d/%d strings (%d%%) translated"
+#~ msgstr "%d/%d cadenas (%d%%) traducidas"
+
+#~ msgid "%d files, "
+#~ msgstr "%d archivos, "
+
+#~ msgid "<h3 class=\"title\">Languages</h3>"
+#~ msgstr "<h3 class=\"title\">Idiomas</h3>"
+
+#~ msgid "current file"
+#~ msgstr "archivo actual"
+
+#~ msgid "not logged in"
+#~ msgstr "sesión no iniciada"
+
+#~ msgid "Pootle Admin Page"
+#~ msgstr "Página de Administración de Pootle"
+
+#~ msgid "Pootle Languages Admin Page"
+#~ msgstr "Página de Administración de Idiomas de Pootle"
+
+#~ msgid "Pootle Projects Admin Page"
+#~ msgstr "Página de Administración de Proyectos de Pootle"
+
+#~ msgid "You do not have the rights to administer Pootle."
+#~ msgstr "No tiene los derechos para administrar Pootle."
+
+#~ msgid "Pootle User Admin Page"
+#~ msgstr "Página de Administración de Usuarios de Pootle"
+
+#~ msgid "suggest"
+#~ msgstr "sugerir"
+
+#~ msgid "Input Width"
+#~ msgstr "Ancho de la Entrada"
Added: src/branches/django-migration/Pootle/tests/test_utils_stats.py
===================================================================
--- src/branches/django-migration/Pootle/tests/test_utils_stats.py (rev 0)
+++ src/branches/django-migration/Pootle/tests/test_utils_stats.py 2007-04-02 12:42:16 UTC (rev 5338)
@@ -0,0 +1,168 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""tests for stats classes"""
+
+from py import test
+from Pootle.utils import stats
+from Pootle.path import path
+from translate.filters import checks
+from translate.storage import po
+import os
+try:
+ import cStringIO as StringIO
+except ImportError:
+ import StringIO
+
+
+# set up test PO
+testdir = os.sep.join(__file__.split(os.sep)[:-1])
+test_path = path(os.path.join(testdir, "sample.po"))
+test_po = test_path.translationstore
+
+class TestStats:
+ def test_classification(self):
+ posource = '''msgid "Simple String"\nmsgstr "Dimpled ring"\n'''
+ openedfile = StringIO.StringIO(posource)
+ po_obj = po.pofile(openedfile)
+
+ d = stats.enumerating_classify(checks.StandardChecker(), po_obj.units)
+
+ expected_result = {
+ 'acronyms': [],
+ 'escapes': [],
+ 'tabs': [],
+ 'unchanged': [],
+ 'blank': [],
+ 'validchars': [],
+ 'numbers': [],
+ 'printf': [],
+ 'accelerators': [],
+ 'total': [0],
+ 'doublewords': [],
+ 'newlines': [],
+ 'puncspacing': [],
+ 'functions': [],
+ 'simplecaps': [],
+ 'spellcheck': [],
+ 'doublequoting': [],
+ 'brackets': [],
+ 'untranslated': [],
+ 'endwhitespace': [],
+ 'long': [],
+ 'targetwordcount': [2],
+ 'notranslatewords': [],
+ 'compendiumconflicts': [],
+ 'filepaths': [],
+ 'startwhitespace': [],
+ 'variables': [],
+ 'doublespacing': [],
+ 'startpunc': [],
+ 'startcaps': [],
+ 'fuzzy': [],
+ 'purepunc': [],
+ 'kdecomments': [],
+ 'singlequoting': [],
+ 'emails': [],
+ 'musttranslatewords': [],
+ 'short': [],
+ 'endpunc': [],
+ 'xmltags': [],
+ 'has-suggestions': [],
+ 'urls': [],
+ 'translated': [0],
+ 'sentencecount': [],
+ 'simpleplurals': [],
+ 'sourcewordcount': [2]
+ }
+ for key in d.iterkeys():
+ assert d[key] == expected_result[key]
+
+
+ def test_classification_two(self):
+ data = stats.enumerating_classify(checks.StandardChecker(), test_po.units)
+
+ expected_result = {
+ 'check-untranslated': [100, 107, 154, 155, 156, 160, 161, 162, 216, 217, 218, 219, 220, 221, 222, 223, 224, 226, 227, 228, 229, 232, 248, 264, 272],
+ 'check-unchanged': [244, 259, 260],
+ 'acronyms': [],
+ 'check-doublespacing': [62],
+ 'escapes': [],
+ 'tabs': [],
+ 'check-startpunc': [80, 145, 243, 273],
+ 'unchanged': [],
+ 'blank': [100, 107, 154, 155, 156, 160, 161, 162, 216, 217, 218, 219, 220, 221, 222, 223, 224, 226, 227, 228, 229, 232, 248, 264, 272, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306],
+ 'validchars': [],
+ 'numbers': [],
+ 'printf': [],
+ 'accelerators': [],
+ 'check-endpunc': [0, 79, 163, 225, 230, 231, 233, 236, 273],
+ 'check-xmltags': [0, 66, 145, 273],
+ 'total': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306],
+ 'doublewords': [],
+ 'newlines': [],
+ 'puncspacing': [],
+ 'functions': [],
+ 'simplecaps': [],
+ 'spellcheck': [],
+ 'doublequoting': [],
+ 'brackets': [],
+ 'check-simplecaps': [0, 6, 14, 96, 136, 137, 139, 140, 152, 159, 190, 225, 243],
+ 'untranslated': [],
+ 'endwhitespace': [],
+ 'long': [],
+ 'targetwordcount': [37, 3, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 4, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 1, 3, 3, 3, 3, 3, 3, 2, 2, 4, 4, 3, 1, 3, 1, 3, 2, 5, 2, 2, 4, 8, 3, 2, 4, 4, 16, 13, 11, 3, 3, 5, 1, 1, 2, 3, 41, 20, 24, 1, 13, 5, 5, 2, 3, 2, 13, 6, 6, 2, 1, 3, 3, 6, 6, 1, 5, 1, 9, 10, 2, 2, 3, 1, 6, 2, 2, 4, 6, 2, 2, 2, 3, 2, 2, 1, 0, 3, 2, 2, 5, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 3, 3, 4, 5, 6, 2, 2, 2, 3, 5, 2, 4, 4, 2, 4, 4, 4, 2, 4, 3, 3, 2, 3, 2, 2, 1, 1, 3, 2, 3, 2, 2, 2, 2, 1, 1, 3, 1, 0, 0, 0, 2, 2, 1, 0, 0, 0, 4, 9, 10, 6, 9, 1, 1, 1, 1, 1, 3, 1, 1, 8, 9, 8, 9, 8, 8, 8, 9, 8, 9, 5, 3, 1, 1, 2, 8, 3, 5, 6, 3, 3, 2, 7, 4, 3, 7, 2, 3, 2, 1, 6, 7, 2, 2, 2, 6, 6, 8, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 3, 0, 6, 9, 11, 7, 3, 7, 7, 13, 13, 7, 6, 1, 1, 1, 1, 0, 4, 7, 1, 2, 6, 2, 1, 2, 9, 10, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 3, 0, 2, 4, 2, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ 'notranslatewords': [],
+ 'check-emails': [0],
+ 'compendiumconflicts': [],
+ 'check-doublequoting': [64],
+ 'filepaths': [],
+ 'startwhitespace': [],
+ 'variables': [],
+ 'check-endwhitespace': [0, 225, 230, 231],
+ 'check-filepaths': [66],
+ 'doublespacing': [],
+ 'startpunc': [],
+ 'startcaps': [],
+ 'fuzzy': [66, 74, 79, 80, 108, 144, 145, 151, 152, 153, 157, 158, 159, 181, 225, 230, 231, 236, 243],
+ 'purepunc': [],
+ 'kdecomments': [],
+ 'singlequoting': [],
+ 'emails': [],
+ 'musttranslatewords': [],
+ 'short': [],
+ 'endpunc': [],
+ 'xmltags': [],
+ 'check-sentencecount': [0, 163, 233, 236],
+ 'check-brackets': [0, 64, 66],
+ 'check-newlines': [0, 225, 230, 231],
+ 'has-suggestions': [],
+ 'urls': [],
+ 'check-startcaps': [0, 80, 145, 159, 243, 273],
+ 'translated': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 146, 147, 148, 149, 150, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 233, 234, 235, 237, 238, 239, 240, 241, 242, 244, 245, 246, 247, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 265, 266, 267, 268, 269, 270, 271, 273, 274, 275, 276, 277, 278],
+ 'sentencecount': [],
+ 'simpleplurals': [],
+ 'sourcewordcount': [0, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 2, 1, 2, 3, 2, 2, 2, 3, 2, 1, 4, 2, 3, 1, 3, 1, 3, 2, 4, 2, 2, 3, 10, 3, 2, 4, 3, 11, 11, 10, 2, 1, 4, 1, 1, 2, 2, 48, 22, 17, 1, 13, 4, 4, 2, 2, 2, 11, 5, 5, 2, 1, 2, 2, 5, 5, 1, 5, 1, 6, 10, 2, 2, 3, 1, 3, 2, 2, 4, 4, 2, 2, 2, 3, 2, 2, 1, 1, 2, 1, 1, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 4, 6, 2, 2, 2, 2, 3, 2, 3, 3, 2, 4, 4, 4, 2, 4, 2, 2, 2, 3, 2, 2, 1, 1, 2, 3, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 4, 8, 8, 4, 9, 1, 1, 1, 1, 1, 3, 1, 1, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 3, 1, 1, 1, 1, 5, 2, 3, 6, 3, 3, 2, 5, 3, 2, 5, 2, 3, 2, 1, 3, 3, 2, 2, 2, 4, 4, 6, 6, 8, 12, 12, 10, 12, 14, 3, 11, 12, 7, 5, 17, 29, 21, 10, 5, 4, 6, 5, 5, 9, 6, 2, 5, 5, 11, 11, 6, 6, 1, 1, 1, 1, 1, 3, 7, 1, 2, 6, 2, 1, 2, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 17, 2, 4, 2, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ 'check-printf': [66, 80, 225, 230, 231, 243],
+ 'check-doublewords': [50, 74]
+ }
+
+ for key in data.iterkeys():
+ assert data[key] == expected_result[key]
+
+class TestFilter:
+ def test_filter(self):
+
+ next, unit = test_path.filter(['translated'],1)
+ assert next == 65
+ next, unit = test_path.filter(['translated'],next)
+ assert next == 73
+
+ def test_iterfilter(self):
+ result = []
+
+ for c in test_path.iterfilter(['translated']):
+ result.append(c[0])
+
+ assert result == [65, 73, 78, 79, 99, 106, 107, 143, 144, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 180, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 235, 242, 247, 263, 271]
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|