[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Boomerang translation?
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2008-09-01 21:57:19
Message-ID: 200809012357.23191.caslav.ilic () gmx ! net
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


These messages are not being fuzzied, but you stepped onto a bug in
Lokalize. It reads out whether the message is fuzzy by searching for
", fuzzy" substring anywhere in the comments, so if you look closely:

  #. i18n: ectx: property (toolTip), widget (QSlider, fuzzynessSlider) 
  #: rc.cpp:21
  msgid "..."

you'll notice the said substring in the #. i18n: ... comment. So just don't
touch these messages until Lokalize is fixed.

Hopefully Nick is reading this, so I attach a patch proposal.

-- 
Chusslove Illich (Часлав Илић)
Serbian KDE translation team

["lokalize-fuzzyfix-01.diff" (text/x-diff)]

Index: src/catalog/gettext/catalogitem.cpp
===================================================================
--- src/catalog/gettext/catalogitem.cpp	(revision 855984)
+++ src/catalog/gettext/catalogitem.cpp	(working copy)
@@ -185,9 +185,11 @@
     return d->_pluralFormType==Gettext;
 }
 
+const char *fuzzyRegExpStr = "((?:^|\n)#(?:,[^,]*)*),\\s*fuzzy";
+
 bool CatalogItem::isFuzzy() const
 {
-    return d->_comment.contains( QRegExp(",\\s*fuzzy") );
+    return d->_comment.contains( QRegExp(fuzzyRegExpStr) );
 }
 
 bool CatalogItem::isUntranslated() const
@@ -346,7 +348,7 @@
 {
     QString& comment=d->_comment;
 
-    comment.remove( QRegExp(",\\s*fuzzy"));
+    comment.replace( QRegExp(fuzzyRegExpStr), "\\1" );
 
     // remove empty comment lines
     comment.remove( QRegExp("\n#\\s*$") );

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic