/usr/share/cmake/fcitx/getdescpo is in fcitx-libs-dev 1:4.2.8.3-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | #!/bin/sh
filename=desc.po
indir=$1
outdir=$2
cd "$outdir"
rm -f "$outdir/$filename"; touch "$outdir/$filename"
cat > "$outdir/$filename" <<EOF
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n"
"POT-Creation-Date: 2010-11-17 11:48+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
EOF
cd $indir
descfiles=`find "$indir" -name ".hg" -prune -or -name "test" -prune -or -iname "*.desc" | grep desc`
# Extract Description
for f in $descfiles
do
awk '/^[\t ]*Description=/ { print "\n#: '$f':" NR"\n" "msgid \"" substr($0, 13)"\"\n" "msgstr \"\""}' "$f" >> "$outdir/$filename"
done
# Extract LongDescription
for f in $descfiles
do
awk '/^[\t ]*LongDescription=/ { print "\n#: '$f':" NR"\n" "msgid \"" substr($0, 17)"\"\n" "msgstr \"\""}' "$f" >> "$outdir/$filename"
done
# Extract Group Name
grep -nH '^\[' $descfiles | grep -v 'DescriptionFile' | awk ' "^[" { split($0, a, ":"); split(a[3], b, "/"); print substr(b[1], 2); }' | sort | uniq | awk '{ print "# unknown\nmsgid \""$0"\"\nmsgstr \"\"\n"; }' >> "$outdir/$filename"
# Extract Enum Name
grep -h 'Enum[0-9]\+' $descfiles | sed -e 's/Enum[0-9]\+=//g' | sort | uniq | awk '{ print "#: unknown\nmsgid \""$0"\"\nmsgstr \"\"\n"; }' >> "$outdir/$filename"
confinfiles=`find "$indir" -iname "*.conf.in"`
for f in $confinfiles
do
awk '/SubConfig=.*/ {
value=substr($0,11);
split(value,a,",");
for (item in a) {
i = index(a[item],":");
if (substr(a[item], i + 1) != "domain")
{
print "#: unknown\nmsgid \""substr(a[item],0, index(a[item],":") -1)"\"\nmsgstr \"\"\n"
}
}
}' $f >> "$outdir/$filename"
done
|