diff --git a/lang/lang-import.sh b/lang/lang-import.sh index a7991543..df8920d9 100755 --- a/lang/lang-import.sh +++ b/lang/lang-import.sh @@ -29,7 +29,7 @@ # Add Community language support # Use `git rev-list --count HEAD lang-import.sh` # to get Build Nr -# 14 Jan. 2022, 3d-gussner, Replace German UTF-8 '' to HD44780 A00 ROM '' +# 14 Jan. 2022, 3d-gussner, Replace German UTF-8 'äöÿÿ' to HD44780 A00 ROM 'äöÿÿ' # 28 Jan. 2022, 3d-gussner, Run lang-check and output `xx-output.txt` file to review # translations # new argruments `--information` `--import-check` @@ -81,52 +81,52 @@ sed -i 's/ \\n/ /g;s/\\n/ /g' $LNG'_filtered.po' #replace in czech translation if [ "$LNG" = "cz" ]; then - #replace '' with 'z' + #replace 'ž' with 'z' sed -i 's/\xc5\xbe/z/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'ì' with 'e' sed -i 's/\xc4\x9b/e/g' $LNG'_filtered.po' - #replace '' with 'i' + #replace 'í' with 'i' sed -i 's/\xc3\xad/i/g' $LNG'_filtered.po' - #replace '' with 'r' + #replace 'ø' with 'r' sed -i 's/\xc5\x99/r/g' $LNG'_filtered.po' - #replace '' with 'c' + #replace 'è' with 'c' sed -i 's/\xc4\x8d/c/g' $LNG'_filtered.po' - #replace '' with 'a' + #replace 'á' with 'a' sed -i 's/\xc3\xa1/a/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' fi #replace in german translation https://en.wikipedia.org/wiki/German_orthography if [ "$LNG" = "de" ]; then -#replace UTF-8 '' to HD44780 A00 '' - #replace '' with 'A00 ROM ' +#replace UTF-8 'äöüß' to HD44780 A00 'äöüß' + #replace 'ä' with 'A00 ROM ä' sed -i 's/\xc3\xa4/\\xe1/g' $LNG'_filtered.po' - #replace '' with 'A00 ROM ' + #replace 'Ä' with 'A00 ROM ä' sed -i 's/\xc3\x84/\\xe1/g' $LNG'_filtered.po' - #replace '' with 'A00 ROM ' + #replace 'ü' with 'A00 ROM ü' sed -i 's/\xc3\xbc/\\xf5/g' $LNG'_filtered.po' - #replace '' with 'A00 ROM ' + #replace 'Ü' with 'A00 ROM ü' sed -i 's/\xc3\x9c/\\xf5/g' $LNG'_filtered.po' - #replace '' with 'A00 ROM ' + #replace 'ö' with 'A00 ROM ö' sed -i 's/\xc3\xb6/\\xef/g' $LNG'_filtered.po' - #replace '' with 'A00 ROM ' + #replace 'Ö' with 'A00 ROM ö' sed -i 's/\xc3\x96/\\xef/g' $LNG'_filtered.po' - #replace '' with 'A00 ROM ' + #replace 'ß' with 'A00 ROM ß' sed -i 's/\xc3\x9f/\\xe2/g' $LNG'_filtered.po' fi #replace in spain translation if [ "$LNG" = "es" ]; then - #replace '' with 'a' + #replace 'á' with 'a' sed -i 's/\xc3\xa1/a/g' $LNG'_filtered.po' - #replace '' with '?' + #replace '¿' with '?' sed -i 's/\xc2\xbf/?/g' $LNG'_filtered.po' - #replace '' with 'o' + #replace 'ó' with 'o' sed -i 's/\xc3\xb3/o/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' - #replace '' with 'i' + #replace 'í' with 'i' sed -i 's/\xc3\xad/i/g' $LNG'_filtered.po' #replace '!' with '!' sed -i 's/\xc2\xa1/!/g' $LNG'_filtered.po' @@ -136,145 +136,175 @@ fi #replace in french translation https://en.wikipedia.org/wiki/French_orthography if [ "$LNG" = "fr" ]; then - #replace '' with 'a' (right) + #replace 'á' with 'a' (right) sed -i 's/\xc3\xa1/a/g' $LNG'_filtered.po' - #replace '' with 'A' (right) + #replace 'Á' with 'A' (right) sed -i 's/\xc3\x81/A/g' $LNG'_filtered.po' - #replace '' with 'a' (left) + #replace 'à' with 'a' (left) sed -i 's/\xc3\xa0/a/g' $LNG'_filtered.po' - #replace '' with 'A' (left) + #replace 'À' with 'A' (left) sed -i 's/\xc3\x80/A/g' $LNG'_filtered.po' - #replace '' with 'e' (right) + #replace 'é' with 'e' (right) sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' - #replace '' with 'E' (right) + #replace 'É' with 'E' (right) sed -i 's/\xc3\x89/E/g' $LNG'_filtered.po' - #replace '' with 'e' (left) + #replace 'è' with 'e' (left) sed -i 's/\xc3\xa8/e/g' $LNG'_filtered.po' - #replace '' with 'E' (left) + #replace 'È' with 'E' (left) sed -i 's/\xc3\x88/E/g' $LNG'_filtered.po' fi #replace in italian translation if [ "$LNG" = "it" ]; then - #replace '' with 'e' (left) + #replace 'é' with 'e' (left) sed -i 's/\xc3\xa8/e/g' $LNG'_filtered.po' - #replace '' with 'a' (left) + #replace 'á' with 'a' (left) sed -i 's/\xc3\xa0/a/g' $LNG'_filtered.po' - #replace '' with 'o' (left) + #replace 'ó' with 'o' (left) sed -i 's/\xc3\xb2/o/g' $LNG'_filtered.po' - #replace '' with 'u' (left) + #replace 'ú' with 'u' (left) sed -i 's/\xc3\xb9/u/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' - #replace '' with 'E' (left) + #replace 'É' with 'E' (left) sed -i 's/\xc3\x88/E/g' $LNG'_filtered.po' fi #replace in dutch translation according to https://nl.wikipedia.org/wiki/Accenttekens_in_de_Nederlandse_spelling if [ "$LNG" = "nl" ]; then - #replace '' with 'e' + #replace 'ë' with 'e' sed -i 's/\xc3\xab/e/g' $LNG'_filtered.po' - #replace '' with 'i' + #replace 'ï' with 'i' sed -i 's/\xc3\xaf/i/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' - #replace '' with 'e' (left) + #replace 'è' with 'e' (left) sed -i 's/\xc3\xa8/e/g' $LNG'_filtered.po' - #replace '' with 'o' (left) + #replace 'ö' with 'o' (left) sed -i 's/\xc3\xb6/o/g' $LNG'_filtered.po' - #replace '' with 'e' (left) + #replace 'ê' with 'e' (left) sed -i 's/\xc3\xaa/e/g' $LNG'_filtered.po' - #replace '' with 'u' (left) + #replace 'ü' with 'u' (left) sed -i 's/\xc3\xbc/u/g' $LNG'_filtered.po' - #replace '' with 'c' (left) + #replace 'ç' with 'c' (left) sed -i 's/\xc3\xa7/c/g' $LNG'_filtered.po' - #replace '' with 'a' (left) + #replace 'á' with 'a' (left) sed -i 's/\xc3\xa1/a/g' $LNG'_filtered.po' - #replace '' with 'a' (left) + #replace 'à' with 'a' (left) sed -i 's/\xc3\xa0/a/g' $LNG'_filtered.po' - #replace '' with 'a' (left) + #replace 'ä' with 'a' (left) sed -i 's/\xc3\xa4/a/g' $LNG'_filtered.po' - #replace '' with 'u' (left) + #replace 'û' with 'u' (left) sed -i 's/\xc3\xbc/u/g' $LNG'_filtered.po' - #replace '' with 'i' (left) + #replace 'î' with 'i' (left) sed -i 's/\xc3\xae/i/g' $LNG'_filtered.po' - #replace '' with 'i' (left) + #replace 'í' with 'i' (left) sed -i 's/\xc3\xad/i/g' $LNG'_filtered.po' - #replace '' with 'o' (left) + #replace 'ô' with 'o' (left) sed -i 's/\xc3\xb4/o/g' $LNG'_filtered.po' - #replace '' with 'u' (left) + #replace 'ú' with 'u' (left) sed -i 's/\xc3\xba/u/g' $LNG'_filtered.po' - #replace '' with 'n' (left) + #replace 'ñ' with 'n' (left) sed -i 's/\xc3\xb1/n/g' $LNG'_filtered.po' - #replace '' with 'a' (left) + #replace 'â' with 'a' (left) sed -i 's/\xc3\xa2/a/g' $LNG'_filtered.po' - #replace '' with 'A' (left) + #replace 'Å' with 'A' (left) sed -i 's/\xc3\x85/A/g' $LNG'_filtered.po' fi if [ "$LNG" = "sv" ]; then -#repace '' with 'Aa' +#repace 'Å' with 'Aa' sed -i 's/\xc3\x85/Aa/g' $LNG'_filtered.po' -#repace '' with 'aa' +#repace 'å' with 'aa' sed -i 's/\xc3\xA5/aa/g' $LNG'_filtered.po' fi if [ "$LNG" = "da" ]; then -#repace '' with 'Aa' +#repace 'Å' with 'Aa' sed -i 's/\xc3\x85/Aa/g' $LNG'_filtered.po' -#repace '' with 'aa' +#repace 'å' with 'aa' sed -i 's/\xc3\xA5/aa/g' $LNG'_filtered.po' fi if [ "$LNG" = "sl" ]; then - #replace '' with 'e' + #replace 'ë' with 'e' sed -i 's/\xc3\xab/e/g' $LNG'_filtered.po' - #replace '' with 'a' (left) + #replace 'ä' with 'a' (left) sed -i 's/\xc3\xa4/a/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' fi -if [ "$LNG" = "hu" ]; then - #replace '' with 'e' - sed -i 's/\xc3\xab/e/g' $LNG'_filtered.po' - #replace '' with 'a' - sed -i 's/\xc3\xa4/a/g' $LNG'_filtered.po' - #replace '' with 'e' +if [ "$LNG" = "hu" ]; then # See https://www.fileformat.info/info/charset/UTF-8/list.htm + #replace 'Á' with 'A'(acute) + sed -i 's/\xc3\x81/A/g' $LNG'_filtered.po' + #replace 'á' with 'a' + sed -i 's/\xc3\xa1/a/g' $LNG'_filtered.po' + #replace 'É' with 'E' (acute) + sed -i 's/\xc3\x89/E/g' $LNG'_filtered.po' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' + #replace 'Í' with 'I' (acute) + sed -i 's/\xc3\x8d/I/g' $LNG'_filtered.po' + #replace 'i̇́' with 'i' + sed -i 's/\xc3\xad/i/g' $LNG'_filtered.po' + #replace 'Ó' with 'O' (acute) + sed -i 's/\xc3\x93/O/g' $LNG'_filtered.po' + #replace 'ó' with 'o' + sed -i 's/\xc3\xb3/o/g' $LNG'_filtered.po' + #replace 'Ö' with 'O' (diaresis) + sed -i 's/\xc3\x96/O/g' $LNG'_filtered.po' + #replace 'ö' with 'o' + sed -i 's/\xc3\xb6/o/g' $LNG'_filtered.po' + #replace 'Ő' with 'O' (double acute) + sed -i 's/\xc5\x90/O/g' $LNG'_filtered.po' + #replace 'ő' with 'o' + sed -i 's/\xc5\x91/o/g' $LNG'_filtered.po' + #replace 'Ú' with 'U' (acute) + sed -i 's/\xc3\x9a/U/g' $LNG'_filtered.po' + #replace 'ú' with 'u' + sed -i 's/\xc3\xba/u/g' $LNG'_filtered.po' + #replace 'Ü' with 'U' (diaersis) + sed -i 's/\xc3\x9c/U/g' $LNG'_filtered.po' + #replace 'ü' with 'u' + sed -i 's/\xc3\xbc/u/g' $LNG'_filtered.po' + #replace 'Ű' with 'U' (double acute) + sed -i 's/\xc5\xb0/U/g' $LNG'_filtered.po' + #replace 'ű' with 'u' + sed -i 's/\xc5\xb1/u/g' $LNG'_filtered.po' fi if [ "$LNG" = "lb" ]; then - #replace '' with 'e' + #replace 'ë' with 'e' sed -i 's/\xc3\xab/e/g' $LNG'_filtered.po' - #replace '' with 'a' + #replace 'ä' with 'a' sed -i 's/\xc3\xa4/a/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' fi if [ "$LNG" = "hr" ]; then - #replace '' with 'e' + #replace 'ë' with 'e' sed -i 's/\xc3\xab/e/g' $LNG'_filtered.po' - #replace '' with 'a' + #replace 'ä' with 'a' sed -i 's/\xc3\xa4/a/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' fi if [ "$LNG" = "lt" ]; then - #replace '' with 'e' + #replace 'ë' with 'e' sed -i 's/\xc3\xab/e/g' $LNG'_filtered.po' - #replace '' with 'a' + #replace 'ä' with 'a' sed -i 's/\xc3\xa4/a/g' $LNG'_filtered.po' - #replace '' with 'e' + #replace 'é' with 'e' sed -i 's/\xc3\xa9/e/g' $LNG'_filtered.po' fi #replace in polish translation #if [ "$LNG" = "pl" ]; then #fi -#check for nonasci characters excpet HD44780 ROM A00 '' +#check for nonasci characters excpet HD44780 ROM A00 'äöüß' if grep --color='auto' -P -n '[^\x00-\x7F]' $LNG'_filtered.po' >nonascii.txt; then exit fi