summaryrefslogtreecommitdiff
path: root/scripts/find-lang.sh
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-10-14 12:42:47 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-10-14 12:42:47 +0300
commit5656af9cf31c053ad97815692a0c0736c7e4bc42 (patch)
tree118e81f21292b1f2b5e76f562131644c5a5ce84a /scripts/find-lang.sh
parent52de2160183593ae515f08eeed9d62d0b05a37d2 (diff)
downloadrpm-5656af9cf31c053ad97815692a0c0736c7e4bc42.tar.gz
find-lang localized man page support (Ville Skyttä)
Diffstat (limited to 'scripts/find-lang.sh')
-rwxr-xr-xscripts/find-lang.sh21
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