[Python-apps-commits] r7236 - in packages/writetype/trunk/debian/patches (translations.patch)

miriam at users.alioth.debian.org miriam at users.alioth.debian.org
Sun Jun 26 11:51:56 UTC 2011


    Date: Sunday, June 26, 2011 @ 11:51:55
  Author: miriam
Revision: 7236

Improved translations

Modified:
  packages/writetype/trunk/debian/patches/translations.patch

Modified: packages/writetype/trunk/debian/patches/translations.patch
===================================================================
--- packages/writetype/trunk/debian/patches/translations.patch	2011-06-26 11:38:45 UTC (rev 7235)
+++ packages/writetype/trunk/debian/patches/translations.patch	2011-06-26 11:51:55 UTC (rev 7236)
@@ -18,7 +18,7 @@
  	printf "aboutrevno = `bzr revno`" > writetype/revno.py
 --- /dev/null
 +++ writetype-1.2.130/translations/qt_es.ts
-@@ -0,0 +1,724 @@
+@@ -0,0 +1,759 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!DOCTYPE TS><TS version="1.1">
 +<context>
@@ -506,6 +506,41 @@
 +        <source>Add to dictionary</source>
 +        <translation>Añadir al diccionario</translation>
 +    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="390"/>
++        <source>Sentence starts without a capital letter</source>
++        <translation>La frase no empieza por una letra mayúscula</translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="394"/>
++        <source>No space after punctuation</source>
++        <translation>Falta un espacio tras el signo de puntuación</translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="398"/>
++        <source>Too many spaces</source>
++        <translation>Hay demasiados espacios</translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="402"/>
++        <source>Spaces before punctuation</source>
++        <translation>Hay espacios antes del signo de puntuación</translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="410"/>
++        <source>Use 'an' instead of 'a'</source>
++        <translation>Usar 'an' en vez de 'a'</translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="418"/>
++        <source>Use 'a' instead of 'an'</source>
++        <translation>Usar 'a' en vez de 'an'</translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="422"/>
++        <source>Word repeated</source>
++        <translation>La palabra está repetida</translation>
++    </message>
 +</context>
 +<context>
 +    <name>WriteTypeMain</name>
@@ -771,6 +806,69 @@
                  self.connect(addToDictionary, SIGNAL("triggered()"), lambda targ=text: self.addToDictionary(targ))
                  menu.addAction(addToDictionary)
          
+@@ -382,43 +383,43 @@
+ 
+     corrections = [
+         {
+-            "description": "Sentence starts without a capital letter",
++            "description": QCoreApplication.translate("SpellCheckEdit","Sentence starts without a capital letter"),
+             "re": re.compile(u'([.?!])([\s]*)([a-z])'),
+             "fix": lambda m: m.group(1) + m.group(2) + m.group(3).capitalize() },
+         {
+-            "description": "Sentence starts without a capital letter",
++            "description": QCoreApplication.translate("SpellCheckEdit","Sentence starts without a capital letter"),
+             "re": re.compile(u'^[a-z]'),
+             "fix": lambda m: m.group(0).capitalize() },
+         {
+-            "description": "No space after punctuation",
++            "description": QCoreApplication.translate("SpellCheckEdit","No space after punctuation"),
+             "re": re.compile(u'([.?!,])([A-Za-z])'),
+             "fix": u'\\1 \\2' },
+         {
+-            "description": "Too many spaces", 
++            "description": QCoreApplication.translate("SpellCheckEdit","Too many spaces"), 
+             "re": re.compile(u'([^[.?!"\'])[ ]{2,}([A-Za-z])'), #This accounts for the fact that many people (myself included) use two spaces after punctuation.  However, there is a bug here that makes two spaces after a quote acceptable.  Unless it gets reported, I don't care.
+             "fix": u'\\1 \\2' },
+         {
+-            "description": "Spaces before punctuation",
++            "description": QCoreApplication.translate("SpellCheckEdit","Spaces before punctuation"),
+             "re": re.compile(u'[ ]+([.?!])'),
+             "fix": u'\\1' },
+         {
+-            "description": "Use 'an' instead of 'a'",
++            "description": QCoreApplication.translate("SpellCheckEdit","Use 'an' instead of 'a'"),
+             "re": re.compile(u' ([Aa]) ([AEIOUaeiou])'),
+             "fix": ' \\1n \\2' },
+         {
+-            "description": "Use 'an' instead of 'a'",
++            "description": QCoreApplication.translate("SpellCheckEdit","Use 'an' instead of 'a'"),
+             "re": re.compile(u'^([Aa]) ([AEIOUaeiou])'),
+             "fix": '\\1n \\2' },
+         {
+-            "description": "Use 'a' instead of 'an'",
++            "description": QCoreApplication.translate("SpellCheckEdit","Use 'a' instead of 'an'"),
+             "re": re.compile(u' ([Aa])n ([BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz])'),
+             "fix": ' \\1 \\2' },
+         {
+-            "description": "Use 'a' instead of 'an'",
++            "description": QCoreApplication.translate("SpellCheckEdit","Use 'a' instead of 'an'"),
+             "re": re.compile(u'^([Aa])n ([BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz])'),
+             "fix": '\\1 \\2' },
+         {
+-            "description": "Word repeated",
++            "description": QCoreApplication.translate("SpellCheckEdit","Word repeated"),
+             "re": re.compile(u' ([a-z]+) \\1([ .!?,:;])', re.IGNORECASE),
+             "fix": ' \\1\\2' }]
+     
+@@ -466,7 +467,7 @@
+             for word_object in re.finditer(rule["re"], text):
+                 if int(word_object.start()) <= pos and pos <= int(word_object.end()):
+                     results.append({
+-                        "description": rule["description"],
++                        "description": QCoreApplication.translate("SpellCheckEdit",rule["description"]),
+                         "left": word_object.start(),
+                         "right": word_object.end(),
+                         "text": word_object.group(0),
 --- writetype-1.2.130.orig/translations/writetype.ts
 +++ writetype-1.2.130/translations/writetype.ts
 @@ -21,7 +21,7 @@
@@ -1033,7 +1131,7 @@
          <location filename="mainwindow.py" line="510"/>
          <source>Check for Updates</source>
          <translation type="unfinished"></translation>
-@@ -474,6 +474,37 @@
+@@ -474,6 +474,72 @@
      </message>
  </context>
  <context>
@@ -1048,6 +1146,41 @@
 +        <source>Add to dictionary</source>
 +        <translation type="unfinished"></translation>
 +    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="390"/>
++        <source>Sentence starts without a capital letter</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="394"/>
++        <source>No space after punctuation</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="398"/>
++        <source>Too many spaces</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="402"/>
++        <source>Spaces before punctuation</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="410"/>
++        <source>Use 'an' instead of 'a'</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="418"/>
++        <source>Use 'a' instead of 'an'</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="422"/>
++        <source>Word repeated</source>
++        <translation type="unfinished"></translation>
++    </message>
 +</context>
 +<context>
 +    <name>WriteTypeMain</name>
@@ -1071,7 +1204,7 @@
      <name>distractionFree</name>
      <message>
          <location filename="distractionFree.py" line="32"/>
-@@ -519,6 +550,11 @@
+@@ -519,6 +585,11 @@
          <translation type="unfinished"></translation>
      </message>
      <message>
@@ -1083,7 +1216,7 @@
          <location filename="settingsDialog.py" line="227"/>
          <source>Try to guess misspellings</source>
          <translation type="unfinished"></translation>
-@@ -549,6 +585,11 @@
+@@ -549,6 +620,11 @@
          <translation type="unfinished"></translation>
      </message>
      <message>
@@ -1095,7 +1228,7 @@
          <location filename="settingsDialog.py" line="234"/>
          <source>Auto-correction settings</source>
          <translation type="unfinished"></translation>
-@@ -559,6 +600,11 @@
+@@ -559,6 +635,11 @@
          <translation type="unfinished"></translation>
      </message>
      <message>
@@ -1107,7 +1240,7 @@
          <location filename="settingsDialog.py" line="237"/>
          <source>Default Font:</source>
          <translation type="unfinished"></translation>
-@@ -594,6 +640,16 @@
+@@ -594,6 +675,16 @@
          <translation type="unfinished"></translation>
      </message>
      <message>
@@ -1124,7 +1257,7 @@
          <location filename="settingsDialog.py" line="246"/>
          <source>Other</source>
          <translation type="unfinished"></translation>
-@@ -613,31 +669,6 @@
+@@ -613,31 +704,6 @@
          <source>Cancel</source>
          <translation type="unfinished"></translation>
      </message>
@@ -1305,7 +1438,7 @@
          <source>WriteType was unable to save the log file.  Please check the file extension, ensure that the selected file is writable, and try again.</source>
          <translation type="unfinished"></translation>
      </message>
-@@ -533,6 +533,37 @@
+@@ -533,6 +533,72 @@
      </message>
  </context>
  <context>
@@ -1320,6 +1453,41 @@
 +        <source>Add to dictionary</source>
 +        <translation type="unfinished"></translation>
 +    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="390"/>
++        <source>Sentence starts without a capital letter</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="394"/>
++        <source>No space after punctuation</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="398"/>
++        <source>Too many spaces</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="402"/>
++        <source>Spaces before punctuation</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="410"/>
++        <source>Use 'an' instead of 'a'</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="418"/>
++        <source>Use 'a' instead of 'an'</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="422"/>
++        <source>Word repeated</source>
++        <translation type="unfinished"></translation>
++    </message>
 +</context>
 +<context>
 +    <name>WriteTypeMain</name>
@@ -1489,7 +1657,7 @@
          <source>WriteType was unable to save the log file.  Please check the file extension, ensure that the selected file is writable, and try again.</source>
          <translation type="unfinished"></translation>
      </message>
-@@ -484,6 +484,37 @@
+@@ -484,6 +484,72 @@
      </message>
  </context>
  <context>
@@ -1504,6 +1672,41 @@
 +        <source>Add to dictionary</source>
 +        <translation type="unfinished"></translation>
 +    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="390"/>
++        <source>Sentence starts without a capital letter</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="394"/>
++        <source>No space after punctuation</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="398"/>
++        <source>Too many spaces</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="402"/>
++        <source>Spaces before punctuation</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="410"/>
++        <source>Use 'an' instead of 'a'</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="418"/>
++        <source>Use 'a' instead of 'an'</source>
++        <translation type="unfinished"></translation>
++    </message>
++    <message>
++        <location filename="spellCheckEdit.py" line="422"/>
++        <source>Word repeated</source>
++        <translation type="unfinished"></translation>
++    </message>
 +</context>
 +<context>
 +    <name>WriteTypeMain</name>




More information about the Python-apps-commits mailing list