]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Fix bug in fixup-migrate-gettext.rb and improve output.
authorPetter Reinholdtsen <pere@hungry.com>
Wed, 21 Feb 2018 23:32:14 +0000 (23:32 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Thu, 22 Feb 2018 18:12:09 +0000 (18:12 +0000)
fixup-migrate-gettext.rb

index 506030d66b7300aea7a2dab1f3bc9478675e4e42..b2d9c7ca28c4f6326bda2080e3a3528e666eae79 100755 (executable)
@@ -88,6 +88,9 @@ class PoStr
     if '' != @type
       print "#. type:%s\n" % [@type]
     end
+    if @location
+      print "#: %s:%s\n" % [@location[:file], @location[:line]]
+    end
     if fuzzy?
       print "#, fuzzy\n"
       if '' != prevstr()
@@ -135,13 +138,14 @@ strings.each do |entry|
       entry.status = ''
       #print "# clear fuzzy (space)\n"
       c = c + 1
+      entry.output
       next
     end
 
     # Rewrite title strings, which lost '#' at the front
     if entry.prevclean.gsub(/^#+ +/, '') == entry.srcclean
+      # FIXME Not safe to clear fuzzy flag, might have bogus translation
       entry.status = ''
-      # FIXME
       if entry.dest[0].gsub!(/^#+ +/, '') ||
          ('' == entry.dest[0] && entry.dest[1].gsub!(/^#+ +/, ''))
         #print "cleared fuzzy (title)\n"