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

List:       kde-commits
Subject:    KDE/kdesdk/scripts
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2011-05-11 19:48:57
Message-ID: 20110511194857.83AC2AC86E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1231430 by aacid:

Properly extract comment and extracomment


 M  +5 -2      extractrc  


--- trunk/KDE/kdesdk/scripts/extractrc #1231429:1231430
@@ -275,12 +275,14 @@
 
        if ( ($tag, $attr) = $string =~ /<$text_string/o )
        {
-         my ($attr_comment) = $attr =~ /\w*comment=\"([^\"]*)\"/ if $attr;
+         my ($attr_comment) = $attr =~ /\bcomment=\"([^\"]*)\"/ if $attr;
          $context = $attr_comment if $attr_comment;
-         my ($attr_context) = $attr =~ /\w*context=\"([^\"]*)\"/ if $attr;
+         my ($attr_context) = $attr =~ /\bcontext=\"([^\"]*)\"/ if $attr;
          $context = $attr_context if $attr_context;
          # It is unlikely that both attributes 'context' and 'comment'
          # will be present, but if so happens, 'context' has priority.
+         my ($attr_extracomment) = $attr =~ /\bextracomment=\"([^\"]*)\"/ if $attr;
+         push @comments, "i18n: $attr_extracomment" if $attr_extracomment;
 
          my ($attr_notr) = $attr =~ /\bnotr=\"([^\"]*)\"/ if $attr;
          $notr = $attr_notr if $attr_notr;
@@ -294,6 +296,7 @@
        }
        else
        {
+         @comments = ();
          $string = "";
        }
      }
[prev in list] [next in list] [prev in thread] [next in thread] 

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