Code

Merge branch 'js/maint-all-implies-HEAD' into maint
[git.git] / git-gui / po / po2msg.sh
index c63248e3752b8b479f75ad2fe772dd40f684be54..1e9f992528153fa62c167db8f8e8c184e7df86bd 100644 (file)
@@ -11,8 +11,8 @@ proc u2a {s} {
        foreach i [split $s ""] {
                scan $i %c c
                if {$c<128} {
-                       # escape '[', '\' and ']'
-                       if {$c == 0x5b || $c == 0x5d} {
+                       # escape '[', '\', '$' and ']'
+                       if {$c == 0x5b || $c == 0x5d || $c == 0x24} {
                                append res "\\"
                        }
                        append res $i
@@ -127,7 +127,26 @@ foreach file $files {
 }
 
 if {$show_statistics} {
-       puts [concat "$translated_count translated messages, " \
-               "$fuzzy_count fuzzy ones, " \
-               "$not_translated_count untranslated ones."]
+       set str ""
+
+       append str  "$translated_count translated message"
+       if {$translated_count != 1} {
+               append str s
+       }
+
+       if {$fuzzy_count > 1} {
+               append str  ", $fuzzy_count fuzzy translation"
+               if {$fuzzy_count != 1} {
+                       append str s
+               }
+       }
+       if {$not_translated_count > 0} {
+               append str  ", $not_translated_count untranslated message"
+               if {$not_translated_count != 1} {
+                       append str s
+               }
+       }
+
+       append str  .
+       puts $str
 }