Skip to content

Commit

Permalink
git-gui: Make the statistics of po2msg match those of msgfmt
Browse files Browse the repository at this point in the history
The strings we were showing from po2msg didn't exactly match those
of msgfmt's --statistics output so we didn't show quite the same
results when building git-gui's message files.  Now we're closer
to what msgfmt shows (at least for an en_US locale) so the make
output matches.

I noticed that the fuzzy translation count is off by one for the
current po/zh_cn.po file.  Not sure why and I'm not going to try
and debug it at this time as the po2msg is strictly a fallback,
users building from source really should prefer msgfmt.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Shawn O. Pearce committed Jan 23, 2008
1 parent 3470ada commit 2cd9ad2
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions po/po2msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 2cd9ad2

Please sign in to comment.