Skip to content

Commit

Permalink
Tweaked translate_acx (5.3.7)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmid committed Apr 9, 2014
1 parent ae42aaa commit 40bde4c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config_5.4.3
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ HACKNAME=loc_cz
HACKLANG=cs
DEVICE=paperwhite2
VERSION=5.4.3
RELEASE=r6
RELEASE=r7
INSTALLKUG=yes
README=cti-me
2 changes: 1 addition & 1 deletion config_5.4.4
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ HACKNAME=loc_cz
HACKLANG=cs
DEVICE=paperwhite
VERSION=5.4.4
RELEASE=r3
RELEASE=r4
INSTALLKUG=yes
README=cti-me
Binary file modified kindle_loc.sqlite
Binary file not shown.
4 changes: 3 additions & 1 deletion signing/sign.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/bash

java -jar widgetsigner.jar -w "$1" -s 0 -k author.p12 -a 'HomebrewActiveContentExtensions' -p ''
BASE=$(dirname "$(readlink -f "$0")")
java -jar $BASE/widgetsigner.jar -w "$1" -s 0 -k $BASE/author.p12 -a 'HomebrewActiveContentExtensions' -p ''
11 changes: 8 additions & 3 deletions translate_acx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ do
while read src tran
do
tran=$(sed 's|&|\\&|g' <<<"$tran")
[ -n "$tran" ] && sed -i "s|'$src'|'$tran'|g; s|"'"'"$src"'"'"|"'"'"$tran"'"'"|g;" "$jsfile.native"
[ -n "$tran" ] && sed -i "s|:[[:space:]]*'$src'|: '$tran'|g; s|:[[:space:]]*"'"'"$src"'"'"|: "'"'"$tran"'"'"|g;" "$jsfile.native"
done < <(sqlite3 -separator " " $root/../kindle_loc.sqlite "select src,tran from trans where file='""$jsfile""' and ver='""$VER""' ;")
IFS=$OLDIFS
native2ascii "$jsfile.native" "$jsfile"
rm -f "$jsfile.native"
done < <(find $orig -path '*/locales/en-gb/*.js' -exec bash -c 'js={}; mv -f {} {}.ee; js-beautify -o {} {}.ee; rm -f {}.ee' \; -print)
done < <(find $orig \( -path '*/locales/en-gb/*.js' -or -path '*/endactions.acx/Strings.js' \) -exec bash -c 'js={}; mv -f {} {}.ee; js-beautify -o {} {}.ee; rm -f {}.ee' \; -print)
cd $root/../build/acx
while read xml
do
Expand All @@ -57,7 +57,12 @@ do
while read src tran
do
tran=$(sed 's|&|&amp;|g' <<<"$tran")
[ -n "$tran" ] && sed -i "s|\"en-gb\">$src</name>|\"en-gb\">$tran</name>|g;" "$xml"
if [ "$VER" == "5.3.7" ]
then
[ -n "$tran" ] && sed -i "s|>$src</name>|>$tran</name>|g;s|<description>$src</description>|<description>$tran</description>|g;" "$xml"
else
[ -n "$tran" ] && sed -i "s|\"en-gb\">$src</name>|\"en-gb\">$tran</name>|g;" "$xml"
fi
done < <(sqlite3 -separator " " $root/../kindle_loc.sqlite "select src,tran from trans where file='""$xml""' and ver='""$VER""' ;")
IFS=$OLDIFS
done < <(find $orig -path '*/config.xml' -print)
Expand Down

0 comments on commit 40bde4c

Please sign in to comment.