Add SK language

This commit is contained in:
ingbrzy 2022-02-10 19:01:04 +01:00
parent 42ac9c0ec3
commit 834cc24e6c
8 changed files with 1422 additions and 5 deletions

View File

@ -221,6 +221,9 @@ const char* lang_get_name_by_code(uint16_t code)
#ifdef COMMUNITY_LANG_GROUP1_DA #ifdef COMMUNITY_LANG_GROUP1_DA
case LANG_CODE_DA: return _n("Dansk"); //community Danish contribution case LANG_CODE_DA: return _n("Dansk"); //community Danish contribution
#endif // COMMUNITY_LANG_GROUP1_DA #endif // COMMUNITY_LANG_GROUP1_DA
#ifdef COMMUNITY_LANG_GROUP1_SK
case LANG_CODE_SK: return _n("Slovenčina"); //community Slovak contribution
#endif // COMMUNITY_LANG_GROUP1_SK
#ifdef COMMUNITY_LANG_GROUP1_SL #ifdef COMMUNITY_LANG_GROUP1_SL
case LANG_CODE_SL: return _n("Slovenscina"); //community Slovanian contribution case LANG_CODE_SL: return _n("Slovenscina"); //community Slovanian contribution
#endif // COMMUNITY_LANG_GROUP1_SL #endif // COMMUNITY_LANG_GROUP1_SL

View File

@ -119,6 +119,9 @@ typedef struct
#ifdef COMMUNITY_LANG_GROUP1_LT #ifdef COMMUNITY_LANG_GROUP1_LT
#define LANG_CODE_LT 0x6C74 //!<'lt' #define LANG_CODE_LT 0x6C74 //!<'lt'
#endif // COMMUNITY_LANG_GROUP1_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 #ifdef COMMUNITY_LANG_GROUP1_RO
#define LANG_CODE_RO 0x726F //!<'ro' #define LANG_CODE_RO 0x726F //!<'ro'
#endif // COMMUNITY_LANG_GROUP1_RO #endif // COMMUNITY_LANG_GROUP1_RO

View File

@ -4,11 +4,11 @@ We will use Dutch as an example here.
## Prepare Prusa Firmware ## Prepare Prusa Firmware
QR = palceholder for language in upper case QR = placeholder for language in upper case
qr = placehodler for language in lower case qr = placehodler for language in lower case
AB = palceholder for hexadecial AB = placeholder for hexadecial
Files needs to be modified Files needs to be modified
- `../Firmware/language.h` - `../Firmware/language.h`
@ -174,7 +174,7 @@ https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
## Prepare language part ## 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` 1. Copy and `lang_en.txt` as `lang_en_qr.txt`
2. run `../lang/lang-export.sh` 2. run `../lang/lang-export.sh`
3. copy `../lang/po/Firmware_qr.po` file to `../lang/po/new/qr.po` 3. copy `../lang/po/Firmware_qr.po` file to `../lang/po/new/qr.po`

View File

@ -106,6 +106,8 @@ lang_code_hex_data()
*sv*) echo '\x76\x73' ;; *sv*) echo '\x76\x73' ;;
#Danish #Danish
*da*) echo '\x61\x64' ;; *da*) echo '\x61\x64' ;;
#Slovak
*sk*) echo '\x6b\x73' ;;
#Slovanian #Slovanian
*sl*) echo '\x6c\x73' ;; *sl*) echo '\x6c\x73' ;;
#Hungarian #Hungarian

View File

@ -342,7 +342,7 @@ def main():
usage="%(prog)s lang") usage="%(prog)s lang")
parser.add_argument( parser.add_argument(
"lang", nargs='?', default="en", type=str, "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( parser.add_argument(
"--no-warning", action="store_true", "--no-warning", action="store_true",
help="Disable warnings") help="Disable warnings")

View File

@ -85,6 +85,8 @@ else
*sv*) echo "Swedish" ;; *sv*) echo "Swedish" ;;
#Danish #Danish
*da*) echo "Danish" ;; *da*) echo "Danish" ;;
#Slovak
*sk*) echo "Slovakian" ;;
#Slovanian #Slovanian
*sl*) echo "Slovanian" ;; *sl*) echo "Slovanian" ;;
#Hugarian #Hugarian

View File

@ -350,6 +350,10 @@ fi
#if [ "$LNG" = "pl" ]; then #if [ "$LNG" = "pl" ]; then
#fi #fi
#replace in slovak translation
#if [ "$LNG" = "sk" ]; then
#fi
#replace UTF-8 'μ' to HD44780 A00 'μ' #replace UTF-8 'μ' to HD44780 A00 'μ'
#replace 'μ' with 'A00 ROM μ' #replace 'μ' with 'A00 ROM μ'
sed -i 's/\xce\xbc/\\xe4/g' $LNG'_filtered.po' sed -i 's/\xce\xbc/\\xe4/g' $LNG'_filtered.po'

1403
lang/lang_en_sk.txt Normal file

File diff suppressed because it is too large Load Diff