New ML support - new translation of 'de' and 'es'
+merging script merge_lang.sh
This commit is contained in:
parent
d6ccaa7c08
commit
5cf60a1493
1873
lang/po_new/de.po
Normal file
1873
lang/po_new/de.po
Normal file
File diff suppressed because it is too large
Load Diff
1708
lang/po_new/es.po
Normal file
1708
lang/po_new/es.po
Normal file
File diff suppressed because it is too large
Load Diff
28
lang/po_new/merge_lang.sh
Normal file
28
lang/po_new/merge_lang.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
|
||||
LANG=$1
|
||||
if [ -z "$LANG" ]; then exit -1; fi
|
||||
|
||||
#convert '\\e' sequencies to 'x1b' and '\\' to '\'
|
||||
cat $LANG.po | sed 's/\\\\e/\\x1b/g;s/\\\\/\\/g' > $LANG'_filtered.po'
|
||||
|
||||
#join lines with multi-line string constants
|
||||
cat $LANG'_filtered.po' | sed ':a;N;$!ba;s/\x22\n\x22//g' > $LANG'_new.po'
|
||||
|
||||
#generate dictionary
|
||||
cat ../lang_en.txt | sed 's/\\/\\\\/g' | while read -r s; do
|
||||
/bin/echo -e "$s"
|
||||
if [ "${s:0:1}" = "\"" ]; then
|
||||
# /bin/echo -e "$s"
|
||||
s=$(/bin/echo -e "$s")
|
||||
s2=$(grep -F -A1 -B0 "$s" "$LANG"_new.po | tail -n1 | sed 's/^msgstr //')
|
||||
if [ -z "$s2" ]; then
|
||||
echo '"\x00"'
|
||||
else
|
||||
echo "$s2"
|
||||
fi
|
||||
# echo
|
||||
fi
|
||||
done > lang_$LANG.txt
|
Loading…
Reference in New Issue
Block a user