diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-10-14 12:42:47 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-10-14 12:42:47 +0300 |
commit | 5656af9cf31c053ad97815692a0c0736c7e4bc42 (patch) | |
tree | 118e81f21292b1f2b5e76f562131644c5a5ce84a /scripts/find-lang.sh | |
parent | 52de2160183593ae515f08eeed9d62d0b05a37d2 (diff) | |
download | rpm-5656af9cf31c053ad97815692a0c0736c7e4bc42.tar.gz rpm-5656af9cf31c053ad97815692a0c0736c7e4bc42.tar.bz2 rpm-5656af9cf31c053ad97815692a0c0736c7e4bc42.zip |
find-lang localized man page support (Ville Skyttä)
Diffstat (limited to 'scripts/find-lang.sh')
-rwxr-xr-x | scripts/find-lang.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh index 624ed88a1..6ada65d4e 100755 --- a/scripts/find-lang.sh +++ b/scripts/find-lang.sh @@ -32,6 +32,7 @@ to \$3. Additional options: --with-gnome find GNOME help files --with-kde find KDE help files + --with-man find localized man pages --all-name match all package/domain names --without-mo do not find locale files EOF @@ -54,6 +55,7 @@ shift GNOME=# KDE=# +MAN=# MO= MO_NAME=$NAME.lang ALL_NAME=# @@ -69,6 +71,10 @@ while test $# -gt 0 ; do KDE= shift ;; + --with-man ) + MAN= + shift + ;; --without-mo ) MO=# shift @@ -130,6 +136,21 @@ s:^\([^%].*\):: s:%lang(C) :: /^$/d' >> $MO_NAME +find $TOP_DIR -type d|sed ' +s:'"$TOP_DIR"':: +'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\):: +'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1: +s:^\([^%].*\):: +s:%lang(C) :: +/^$/d' >> $MO_NAME + +find $TOP_DIR -type f -o -type l|sed ' +s:'"$TOP_DIR"':: +'"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1: +s:^\([^%].*\):: +s:%lang(C) :: +/^$/d' >> $MO_NAME + if ! grep -q / $MO_NAME; then echo "No translations found for ${NAME} in ${TOP_DIR}" exit 1 |