Merge pull request #3386 from ingbrzy/MK3_3.11.0
Add SK language translation
This commit is contained in:
commit
f1ff5907f4
11 changed files with 5030 additions and 5 deletions
|
@ -68,6 +68,7 @@
|
|||
#define COMMUNITY_LANG_GROUP1_RO // Community Romanian language
|
||||
#define COMMUNITY_LANG_GROUP1_HU // Community Hungarian language
|
||||
#define COMMUNITY_LANG_GROUP1_HR // Community Croatian language
|
||||
#define COMMUNITY_LANG_GROUP1_SK // Community Slovak language
|
||||
//#define COMMUNITY_LANG_GROUP1_SV // Community Swedish language
|
||||
//#define COMMUNITY_LANG_GROUP1_DA // Community Danish language
|
||||
//#define COMMUNITY_LANG_GROUP1_SL // Community Slovanian language
|
||||
|
|
|
@ -221,6 +221,9 @@ const char* lang_get_name_by_code(uint16_t code)
|
|||
#ifdef COMMUNITY_LANG_GROUP1_DA
|
||||
case LANG_CODE_DA: return _n("Dansk"); //community Danish contribution
|
||||
#endif // COMMUNITY_LANG_GROUP1_DA
|
||||
#ifdef COMMUNITY_LANG_GROUP1_SK
|
||||
case LANG_CODE_SK: return _n("Slovencina"); //community Slovak contribution
|
||||
#endif // COMMUNITY_LANG_GROUP1_SK
|
||||
#ifdef COMMUNITY_LANG_GROUP1_SL
|
||||
case LANG_CODE_SL: return _n("Slovenscina"); //community Slovanian contribution
|
||||
#endif // COMMUNITY_LANG_GROUP1_SL
|
||||
|
|
|
@ -119,6 +119,9 @@ typedef struct
|
|||
#ifdef COMMUNITY_LANG_GROUP1_LT
|
||||
#define LANG_CODE_LT 0x6C74 //!<'lt'
|
||||
#endif // COMMUNITY_LANG_GROUP1_LT
|
||||
#ifdef COMMUNITY_LANG_GROUP1_SK
|
||||
#define LANG_CODE_SK 0x736b //!<'sk'
|
||||
#endif // COMMUNITY_LANG_GROUP1_SK
|
||||
#ifdef COMMUNITY_LANG_GROUP1_RO
|
||||
#define LANG_CODE_RO 0x726F //!<'ro'
|
||||
#endif // COMMUNITY_LANG_GROUP1_RO
|
||||
|
|
|
@ -4,11 +4,11 @@ We will use Dutch as an example here.
|
|||
|
||||
## Prepare Prusa Firmware
|
||||
|
||||
QR = palceholder for language in upper case
|
||||
QR = placeholder for language in upper case
|
||||
|
||||
qr = placehodler for language in lower case
|
||||
|
||||
AB = palceholder for hexadecial
|
||||
AB = placeholder for hexadecial
|
||||
|
||||
Files needs to be modified
|
||||
- `../Firmware/language.h`
|
||||
|
@ -174,7 +174,7 @@ https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
|||
|
||||
## Prepare language part
|
||||
|
||||
To prepare the acutal language translation files we need create the `lang_en_qr.txt` file.
|
||||
To prepare the actual language translation files we need create the `lang_en_qr.txt` file.
|
||||
1. Copy and `lang_en.txt` as `lang_en_qr.txt`
|
||||
2. run `../lang/lang-export.sh`
|
||||
3. copy `../lang/po/Firmware_qr.po` file to `../lang/po/new/qr.po`
|
||||
|
@ -191,4 +191,4 @@ To prepare the acutal language translation files we need create the `lang_en_qr.
|
|||
|
||||
|
||||
|
||||
##
|
||||
##
|
||||
|
|
|
@ -107,6 +107,8 @@ lang_code_hex_data()
|
|||
*sv*) echo '\x76\x73' ;;
|
||||
#Danish
|
||||
*da*) echo '\x61\x64' ;;
|
||||
#Slovak
|
||||
*sk*) echo '\x6b\x73' ;;
|
||||
#Slovanian
|
||||
*sl*) echo '\x6c\x73' ;;
|
||||
#Hungarian
|
||||
|
|
|
@ -342,7 +342,7 @@ def main():
|
|||
usage="%(prog)s lang")
|
||||
parser.add_argument(
|
||||
"lang", nargs='?', default="en", type=str,
|
||||
help="Check lang file (en|cs|da|de|es|fr|hr|hu|lb|lt|nl|it|pl|ro|sl|sv)")
|
||||
help="Check lang file (en|cs|da|de|es|fr|hr|hu|lb|lt|nl|it|pl|ro|sk|sl|sv)")
|
||||
parser.add_argument(
|
||||
"--no-warning", action="store_true",
|
||||
help="Disable warnings")
|
||||
|
|
|
@ -85,6 +85,8 @@ else
|
|||
*sv*) echo "Swedish" ;;
|
||||
#Danish
|
||||
*da*) echo "Danish" ;;
|
||||
#Slovak
|
||||
*sk*) echo "Slovak" ;;
|
||||
#Slovanian
|
||||
*sl*) echo "Slovanian" ;;
|
||||
#Hugarian
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
# 28 Jan. 2022, 3d-gussner, Run lang-check and output `xx-output.txt` file to review
|
||||
# translations
|
||||
# new argruments `--information` `--import-check`
|
||||
# 11 Jan. 2022, ingbrzy, Add Slovak letters
|
||||
# 11 Feb. 2022, 3d-gussner, Change to python3
|
||||
#############################################################################
|
||||
# Config:
|
||||
|
@ -351,6 +352,72 @@ fi
|
|||
#if [ "$LNG" = "pl" ]; then
|
||||
#fi
|
||||
|
||||
#replace in slovak translation
|
||||
if [ "$LNG" = "sk" ]; then
|
||||
#replace 'Á' with 'A'
|
||||
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 'a'
|
||||
sed -i 's/\xc3\xa4/a/g' $LNG'_filtered.po'
|
||||
#replace 'Č' with 'C'
|
||||
sed -i 's/\xc4\x8c/C/g' $LNG'_filtered.po'
|
||||
#replace 'č' with 'c'
|
||||
sed -i 's/\xc4\x8d/c/g' $LNG'_filtered.po'
|
||||
#replace 'Ď' with 'D'
|
||||
sed -i 's/\xc4\x8e/D/g' $LNG'_filtered.po'
|
||||
#replace 'ď' with 'd'
|
||||
sed -i 's/\xc4\x8f/d/g' $LNG'_filtered.po'
|
||||
#replace 'É' with 'E'
|
||||
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'
|
||||
sed -i 's/\xc3\x8d/I/g' $LNG'_filtered.po'
|
||||
#replace 'í' with 'i'
|
||||
sed -i 's/\xc3\xad/i/g' $LNG'_filtered.po'
|
||||
#replace 'ľ' with 'l'
|
||||
sed -i 's/\xc4\xbe/l/g' $LNG'_filtered.po'
|
||||
#replace 'Ľ' with 'L'
|
||||
sed -i 's/\xc4\xbd/L/g' $LNG'_filtered.po'
|
||||
#replace 'Ň' with 'N'
|
||||
sed -i 's/\xc5\x87/N/g' $LNG'_filtered.po'
|
||||
#replace 'ň' with 'n'
|
||||
sed -i 's/\xc5\x88/n/g' $LNG'_filtered.po'
|
||||
#replace 'Ó' with 'O'
|
||||
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'
|
||||
sed -i 's/\xc3\xb4/o/g' $LNG'_filtered.po'
|
||||
#replace 'Ô' with 'O'
|
||||
sed -i 's/\xc3\x94/O/g' $LNG'_filtered.po'
|
||||
#replace 'ŕ' with 'r'
|
||||
sed -i 's/\xc5\x95/r/g' $LNG'_filtered.po'
|
||||
#replace 'Ŕ' with 'R'
|
||||
sed -i 's/\xc5\x94/R/g' $LNG'_filtered.po'
|
||||
#replace 'Š' with 'S'
|
||||
sed -i 's/\xc5\xa0/S/g' $LNG'_filtered.po'
|
||||
#replace 'š' with 's'
|
||||
sed -i 's/\xc5\xa1/s/g' $LNG'_filtered.po'
|
||||
#replace 'Ť' with 'T'
|
||||
sed -i 's/\xc5\xa4/T/g' $LNG'_filtered.po'
|
||||
#replace 'ť' with 't'
|
||||
sed -i 's/\xc5\xa5/t/g' $LNG'_filtered.po'
|
||||
#replace 'Ú' with 'U'
|
||||
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 'Y'
|
||||
sed -i 's/\xc3\x9d/Y/g' $LNG'_filtered.po'
|
||||
#replace 'ý' with 'y'
|
||||
sed -i 's/\xc3\xbd/y/g' $LNG'_filtered.po'
|
||||
#replace 'Ž' with 'Z'
|
||||
sed -i 's/\xc5\xbd/Z/g' $LNG'_filtered.po'
|
||||
#replace 'ž' with 'z'
|
||||
sed -i 's/\xc5\xbe/z/g' $LNG'_filtered.po'
|
||||
fi
|
||||
|
||||
#replace UTF-8 'μ' to HD44780 A00 'μ'
|
||||
#replace 'μ' with 'A00 ROM μ'
|
||||
sed -i 's/\xce\xbc/\\xe4/g' $LNG'_filtered.po'
|
||||
|
|
1403
lang/lang_en_sk.txt
Normal file
1403
lang/lang_en_sk.txt
Normal file
File diff suppressed because it is too large
Load diff
1772
lang/po/Firmware_sk.po
Normal file
1772
lang/po/Firmware_sk.po
Normal file
File diff suppressed because it is too large
Load diff
1772
lang/po/new/sk.po
Normal file
1772
lang/po/new/sk.po
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue