Move Dutch language parts

Not create community languages with `lang-build.sh all` the `lang-community.sh` will call it.
Add templates for future community languages
This commit is contained in:
3d-gussner 2021-03-01 08:28:08 +01:00
parent 6ebdb004ab
commit 779c8d0a78
7 changed files with 65 additions and 14 deletions

View File

@ -158,16 +158,27 @@ else
./update_lang.sh fr 2>./update_lang_fr.out 1>/dev/null
if [ $? -eq 0 ]; then echo 'OK' >&2; else echo 'NG!' >&2; finish 1; fi
fi
if [ -e lang_nl.bin ]; then
echo -n " Dutch : " >&2
./update_lang.sh nl 2>./update_lang_nl.out 1>/dev/null
if [ $? -eq 0 ]; then echo 'OK' >&2; else echo 'NG!' >&2; fi
fi
if [ -e lang_pl.bin ]; then
echo -n " Polish : " >&2
./update_lang.sh pl 2>./update_lang_pl.out 1>/dev/null
if [ $? -eq 0 ]; then echo 'OK' >&2; else echo 'NG!' >&2; finish 1; fi
fi
#Community language support
#Dutch
if [ -e lang_nl.bin ]; then
echo -n " Dutch : " >&2
./update_lang.sh nl 2>./update_lang_nl.out 1>/dev/null
if [ $? -eq 0 ]; then echo 'OK' >&2; else echo 'NG!' >&2; fi
fi
#Use the 6 lines below as a template and replace 'qr' and 'New language'
#New language
# if [ -e lang_qr.bin ]; then
# echo -n " New language : " >&2
# ./update_lang.sh qr 2>./update_lang_qr.out 1>/dev/null
# if [ $? -eq 0 ]; then echo 'OK' >&2; else echo 'NG!' >&2; fi
# fi
# echo "skipped" >&2
fi
@ -177,9 +188,15 @@ if [ -e lang_cz.bin ]; then cat lang_cz.bin >> lang.bin; fi
if [ -e lang_de.bin ]; then cat lang_de.bin >> lang.bin; fi
if [ -e lang_es.bin ]; then cat lang_es.bin >> lang.bin; fi
if [ -e lang_fr.bin ]; then cat lang_fr.bin >> lang.bin; fi
if [ -e lang_nl.bin ]; then cat lang_nl.bin >> lang.bin; fi
if [ -e lang_it.bin ]; then cat lang_it.bin >> lang.bin; fi
if [ -e lang_pl.bin ]; then cat lang_pl.bin >> lang.bin; fi
#Community language support
# Dutch
if [ -e lang_nl.bin ]; then cat lang_nl.bin >> lang.bin; fi
#Use the 2 lines below as a template and replace 'qr'
## New language
#if [ -e lang_qr.bin ]; then cat lang_qr.bin >> lang.bin; fi
#convert lang.bin to lang.hex
echo -n " converting to hex..." >&2

View File

@ -36,7 +36,6 @@ rm_if_exists firmware_de.hex
rm_if_exists firmware_es.hex
rm_if_exists firmware_fr.hex
rm_if_exists firmware_it.hex
rm_if_exists firmware_nl.hex
rm_if_exists firmware_pl.hex
rm_if_exists progmem.out
rm_if_exists textaddr.out
@ -50,6 +49,13 @@ rm_if_exists update_lang_nl.out
rm_if_exists update_lang_pl.out
rm_if_exists lang.bin
rm_if_exists lang.hex
#Community language support
#Dutch
rm_if_exists firmware_nl.hex
#Use the 2 lines below as a template and replace 'qr'
##New language
#rm_if_exists firmware_qr.hex
echo -n "fw-clean.sh finished" >&2
if [ $result -eq 0 ]; then

View File

@ -64,9 +64,15 @@ cat lang_add.txt | sed 's/^/"/;s/$/"/' | while read new_s; do
insert_xx "$new_s" 'de'
insert_xx "$new_s" 'es'
insert_xx "$new_s" 'fr'
insert_xx "$new_s" 'nl'
insert_xx "$new_s" 'it'
insert_xx "$new_s" 'pl'
#Community language support
#Dutch
insert_xx "$new_s" 'nl'
#Use the 2 lines below as a template and replace 'qr'
##New language
# insert_xx "$new_s" 'qr'
fi
done

View File

@ -42,8 +42,13 @@ lang_code_hex_data()
*es*) echo '\x73\x65' ;;
*fr*) echo '\x72\x66' ;;
*it*) echo '\x74\x69' ;;
*nl*) echo '\x6c\x6e' ;;
*pl*) echo '\x6c\x70' ;;
#Community language support
#Dutch
*nl*) echo '\x6c\x6e' ;;
#Use the 2 lines below as a template and replace 'qr' and `\x71\x72`
##New language
# *qr*) echo '\x71\x72' ;;
esac
echo '??'
}
@ -134,9 +139,9 @@ if [ "$1" = "all" ]; then
generate_binary 'de'
generate_binary 'es'
generate_binary 'fr'
generate_binary 'nl'
generate_binary 'it'
generate_binary 'pl'
#DO NOT add Community languages here
else
generate_binary $1
fi

View File

@ -45,8 +45,14 @@ clean_lang de
clean_lang es
clean_lang fr
clean_lang it
clean_lang nl
clean_lang pl
#Community language support
#Dutch
clean_lang nl
#Use the 2 lines below as a template and replace 'qr'
##New language
#clean_lang_qr
echo -n "lang-clean.sh finished" >&2
if [ $result -eq 0 ]; then

View File

@ -20,9 +20,14 @@ if [ "$LNG" = "all" ]; then
./lang-export.sh de
./lang-export.sh es
./lang-export.sh fr
./lang-export.sh nl
./lang-export.sh it
./lang-export.sh pl
#Community language support
#Dutch
./lang-export.sh nl
#Use the 2 lines below as a template and replace 'qr' and 'New language'
##New language
# ./lang-export.sh qr
exit 0
fi
@ -47,9 +52,14 @@ else
*de*) echo "German" ;;
*es*) echo "Spanish" ;;
*fr*) echo "French" ;;
*nl*) echo "Dutch" ;;
*it*) echo "Italian" ;;
*it*) echo "Italian" ;;
*pl*) echo "Polish" ;;
#Community language support
#Dutch
*nl*) echo "Dutch" ;;
#Use the 2 lines below as a template and replace 'qr' and 'New language'
##New language
# *qr*) echo "New language" ;;
esac)
# unknown language - error
if [ -z "LNGNAME" ]; then

View File

@ -15,6 +15,7 @@ if [ "$LNG" = "all" ]; then
./lang-import.sh fr
./lang-import.sh it
./lang-import.sh pl
#DO NOT add Community languages here !!!
exit 0
fi