summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3470ada)
raw | patch | inline | side by side (parent: 3470ada)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 23 Jan 2008 04:52:07 +0000 (23:52 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 23 Jan 2008 04:52:07 +0000 (23:52 -0500) |
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>
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>
po/po2msg.sh | patch | blob | history |
diff --git a/po/po2msg.sh b/po/po2msg.sh
index c63248e3752b8b479f75ad2fe772dd40f684be54..b7c4bf3fdffb3d04b8c01b25e99a706e499de0d1 100644 (file)
--- a/po/po2msg.sh
+++ b/po/po2msg.sh
}
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
}