diff options
author | Florian Jung <flo@windfisch.org> | 2011-09-27 16:08:57 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-09-27 16:08:57 +0000 |
commit | e9e38901f1b0c8b0d4c11f6de37abf7ff6c7234f (patch) | |
tree | 6db56ee33fda6adce28afc456c4fd84b56180453 /muse2/find_manual_plural.sh | |
parent | 5c2eaaf143f517e1a4d52e243a761e479aeb3e5b (diff) | |
parent | d52fac00567bb85944188f3c946b86b2a420819c (diff) |
merged with trunk
Diffstat (limited to 'muse2/find_manual_plural.sh')
-rwxr-xr-x | muse2/find_manual_plural.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/muse2/find_manual_plural.sh b/muse2/find_manual_plural.sh new file mode 100755 index 00000000..3e77f304 --- /dev/null +++ b/muse2/find_manual_plural.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# this script tries to find all "bad" code like +# (number > 1 ? tr ("tracks") : tr("track")) +# that is, all manual plural diversifications +# you should replace them by: +# tr("processed %n track(s)", "", number) +# the "" is a translator comment. you may write what you want +# +# you have to create appropriate translations for this (even for +# english!). linguist will ask you for the singular, plural, +# and in some language even paucal form then. +# +# this script is not perfect. it misses some "bad" things, and +# finds some "good" things. + +{ +find . -iname '*.cpp' -print0 | xargs -0 grep -E '[^:]: *tr *\("[^"]*".*\)' +find . -iname '*.cpp' -print0 | xargs -0 grep -E '\? *tr *\("[^"]*".*\)' +} | sort | uniq |