X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-gui%2Fpo%2Fpo2msg.sh;h=1e9f992528153fa62c167db8f8e8c184e7df86bd;hb=8abc61880d34f7a85928d7ca95cb1165b2aca1df;hp=c63248e3752b8b479f75ad2fe772dd40f684be54;hpb=4eb39e9bcccc54eb23af8a7e2676c63e5bf32866;p=git.git diff --git a/git-gui/po/po2msg.sh b/git-gui/po/po2msg.sh index c63248e37..1e9f99252 100644 --- a/git-gui/po/po2msg.sh +++ b/git-gui/po/po2msg.sh @@ -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 }