From 24432f3b211929f00c883df5eddeaf4a8bb0f3e2 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Wed, 28 May 2014 20:12:33 +1000 Subject: [PATCH] Fixed translate-man.sh for no top ps the script errored when top or ps translations didnt exist this minor fix skips those if they dont exist. --- man-po/template-man-ps.pot | 2 +- man-po/template-man-top.pot | 2 +- man-po/template-man.pot | 2 +- translate-man.sh | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/man-po/template-man-ps.pot b/man-po/template-man-ps.pot index b1a731a9..f9afd56c 100644 --- a/man-po/template-man-ps.pot +++ b/man-po/template-man-ps.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2014-05-28 19:20+1000\n" +"POT-Creation-Date: 2014-05-28 20:02+1000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/man-po/template-man-top.pot b/man-po/template-man-top.pot index 0a3c0211..6a579bf3 100644 --- a/man-po/template-man-top.pot +++ b/man-po/template-man-top.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2014-05-28 19:20+1000\n" +"POT-Creation-Date: 2014-05-28 20:02+1000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/man-po/template-man.pot b/man-po/template-man.pot index 42856649..a338f711 100644 --- a/man-po/template-man.pot +++ b/man-po/template-man.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2014-05-28 19:20+1000\n" +"POT-Creation-Date: 2014-05-28 20:02+1000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/translate-man.sh b/translate-man.sh index 1252feb9..1b89056d 100755 --- a/translate-man.sh +++ b/translate-man.sh @@ -44,6 +44,10 @@ for lang in *.po po4a-translate -f man -m ../vmstat.8 -p ${lang} -l ${lang%.*}/man8/vmstat.8 po4a-translate -f man -m ../w.1 -p ${lang} -l ${lang%.*}/man1/w.1 po4a-translate -f man -m ../watch.1 -p ${lang} -l ${lang%.*}/man1/watch.1 - po4a-translate -f man -m ../ps/ps.1 -p ps/${lang} -l ${lang%.*}/man1/ps.1 - po4a-translate -f man -m ../top/top.1 -p top/${lang} -l ${lang%.*}/man1/top.1 + if [ -f ps/${lang} ] ; then + po4a-translate -f man -m ../ps/ps.1 -p ps/${lang} -l ${lang%.*}/man1/ps.1 + fi + if [ -f top/${lang} ] ; then + po4a-translate -f man -m ../top/top.1 -p top/${lang} -l ${lang%.*}/man1/top.1 + fi done -- 2.40.0