Paste #9re4VVCNtRWhQrdY7uza
=== modified file 'scripts/translators.sh'
| 4 | 4 | |
|---|---|---|
| 5 | 5 | get_languages() { |
| 6 | 6 | if [ "$generated" = yes ];then |
| 7 | ||
| 7 | languages=$(cat po/LINGUAS) | |
| 8 | 8 | elif [ -n $language ];then |
| 9 | ||
| 9 | languages=$language | |
| 10 | 10 | else |
| 11 | ||
| 11 | languages=$(basename -s.po $CURDIR/*.po) | |
| 12 | 12 | fi |
| 13 | 13 | } |
| 14 | 14 | |
| … | ||
| 18 | 18 | for lang in $languages;do |
| 19 | 19 | mkdir -p $CURDIR/mo/$lang/LC_MESSAGES/ |
| 20 | 20 | msgfmt -o $CURDIR/mo/$lang/LC_MESSAGES/xubuntu-docs.mo $CURDIR/$lang.po |
| 21 | |
|
| 21 | translators=$(TEXTDOMAINDIR=$CURDIR/mo/ LANGUAGE=$lang gettext -d xubuntu-docs -s 'translator-credits' | \ | |
| 22 | 22 | sed -e 's@^ @\t<listitem><para>@' -e '/launchpad.net/s@$@)</para></listitem>@' \ |
| 23 | -e 's@https://launchpad.net/~@(@' -e /Launchpad\ Contributions/d -e /^translator-credits$/d | |
| 24 | done | sort | uniq | |
| 23 | -e 's@https://launchpad.net/~@(@' -e /Launchpad\ Contributions/d -e /^translator-credits$/d | sort -u) | |
| 24 | done | |
| 25 | if [ "$translators" = "" ];then | |
| 26 | echo "<listitem><para>No translations found</para></listitem>" | |
| 27 | else | |
| 28 | echo "$translators" | |
| 29 | fi | |
| 25 | 30 | echo "</itemizedlist>" |
| 26 | 31 | rm -rf $CURDIR/mo/ |
| 27 | 32 | } |
| … | ||
| 36 | 41 | |
| 37 | 42 | while getopts ":gl:" Option |
| 38 | 43 | do |
| 39 | ||
| 44 | case ${Option} in | |
| 40 | 45 | g) generated=yes;; |
| 41 | 46 | l) language=${OPTARG};; |
| 42 | 47 | *) echo "Please specify an argument.";; |