diff --git a/.editorconfig b/.editorconfig index 59d9a3a..c5cf666 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,7 @@ indent_style = space indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true +max_line_length = 120 [*.ts] quote_type = single diff --git a/README.md b/README.md index aa26065..fd3feeb 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,13 @@ export class AppModule { } ## Localization -AngularTouchKeyboard is localized in 7 keyboard-specific locales: +AngularTouchKeyboard is localized in 8 keyboard-specific locales: * `en-US` English (United States) (default) * `en-UK` English (United Kingdom) * `fa-IR` Persian (Iran) * `he-IL` Hebrew (Israel) +* `hu-HU` Hungarian (Magyar) * `ka-GE` Georgian (Georgia) * `ru-RU` Russian (Russia) * `sv-SE` Swedish (Sweden) diff --git a/angular.json b/angular.json index 1624df5..36e4444 100644 --- a/angular.json +++ b/angular.json @@ -134,5 +134,8 @@ } } } + }, + "cli": { + "analytics": false } } \ No newline at end of file diff --git a/projects/ngx-touch-keyboard/src/lib/Locale/hu-HU/index.ts b/projects/ngx-touch-keyboard/src/lib/Locale/hu-HU/index.ts new file mode 100644 index 0000000..cc76295 --- /dev/null +++ b/projects/ngx-touch-keyboard/src/lib/Locale/hu-HU/index.ts @@ -0,0 +1,200 @@ +import { Layout, Display, Locale } from '../type'; +import { fnDisplay } from '../constants'; + +const layouts: Layout = { + text_alphabetic: [ + ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'ö', 'ü', 'ó'], + ['q', 'w', 'e', 'r', 't', 'z', 'u', 'i', 'o', 'p', 'ő', 'ú'], + ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'é', 'á', 'ű'], + [ + '{shift}', + 'í', + 'y', + 'x', + 'c', + 'v', + 'b', + 'n', + 'm', + ',', + '.', + '-', + '{backspace}', + ], + ['{symbolic}', '{space}', '{done}'], + ], + text_shift: [ + ['§', "'", '"', '+', '!', '%', '/', '=', '(', ')', 'Ö', 'Ü', 'Ó'], + ['Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', 'O', 'P', 'Ő', 'Ú'], + ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'É', 'Á', 'Ű'], + [ + '{shift}', + 'Í', + 'Y', + 'X', + 'C', + 'V', + 'B', + 'N', + 'M', + '?', + ':', + '_', + '{backspace}', + ], + ['{symbolic}', '{space}', '{done}'], + ], + text_numeric: [ + ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], + ['-', '/', ':', ';', '(', ')', '$', '&', '@', '"'], + ['{symbolic}', '.', ',', '?', '!', "'", '{backspace}'], + ['{alphabetic}', '{space}', '{done}'], + ], + text_symbolic: [ + ['~', 'ˇ', '^', '˘', '°', '˛', '`', '˙', '´', '˝', '¨', '¸'], + ['\\', '|', 'Ä', '€', 'Í', '÷', '×', '+', '-'], + ['ä', 'đ', 'Đ', '[', ']', 'í', 'ł', 'Ł', '$', 'ß', '¤'], + ['<', '>', '#', '&', '@', '{', '}', ';', '*', '{backspace}'], + ['{alphabetic}', '{space}', '{done}'], + ], + search_alphabetic: [ + ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'ö', 'ü', 'ó'], + ['q', 'w', 'e', 'r', 't', 'z', 'u', 'i', 'o', 'p', 'ő', 'ú'], + ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'é', 'á', 'ű'], + [ + '{shift}', + 'í', + 'y', + 'x', + 'c', + 'v', + 'b', + 'n', + 'm', + ',', + '.', + '-', + '{backspace}', + ], + ['{symbolic}', '{space}', '{done}'], + ], + search_shift: [ + ['§', "'", '"', '+', '!', '%', '/', '=', '(', ')', 'Ö', 'Ü', 'Ó'], + ['Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', 'O', 'P', 'Ő', 'Ú'], + ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'É', 'Á', 'Ű'], + [ + '{shift}', + 'Í', + 'Y', + 'X', + 'C', + 'V', + 'B', + 'N', + 'M', + '?', + ':', + '_', + '{backspace}', + ], + ['{symbolic}', '{space}', '{done}'], + ], + search_numeric: [ + ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], + ['-', '/', ':', ';', '(', ')', '$', '&', '@', '"'], + ['{symbolic}', '.', ',', '?', '!', "'", '{backspace}'], + ['{alphabetic}', '{space}', '{done}'], + ], + search_symbolic: [ + ['~', 'ˇ', '^', '˘', '°', '˛', '`', '˙', '´', '˝', '¨', '¸'], + ['\\', '|', 'Ä', '€', 'Í', '÷', '×', '+', '-'], + ['ä', 'đ', 'Đ', '[', ']', 'í', 'ł', 'Ł', '$', 'ß', '¤'], + ['<', '>', '#', '&', '@', '{', '}', ';', '*', '{backspace}'], + ['{alphabetic}', '{space}', '{done}'], + ], + email_alphabetic: [ + ['q', 'w', 'e', 'r', 't', 'z', 'u', 'i', 'o', 'p'], + ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'], + ['{shift}', 'y', 'x', 'c', 'v', 'b', 'n', 'm', '{backspace}'], + ['{numeric}', '@', '{space}', '.', '{done}'], + ], + email_shift: [ + ['Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', 'O', 'P'], + ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], + ['{shift}', 'Y', 'X', 'C', 'V', 'B', 'N', 'M', '{backspace}'], + ['{numeric}', '@', '{space}', '.', '{done}'], + ], + email_numeric: [ + ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], + ['$', '!', '~', '&', '=', '#', '[', ']'], + ['{symbolic}', '.', '_', '-', '+', '{backspace}'], + ['{alphabetic}', '@', '{space}', '.', '{done}'], + ], + email_symbolic: [ + ['`', '|', '{', '}', '?', '%', '^', '*', '/', "'"], + ['$', '!', '~', '&', '=', '#', '[', ']'], + ['{numeric}', '.', '_', '-', '+', '{backspace}'], + ['{alphabetic}', '@', '{space}', '.', '{done}'], + ], + url_alphabetic: [ + ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], + ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'], + ['{shift}', 'z', 'x', 'c', 'v', 'b', 'n', 'm', '{backspace}'], + ['{numeric}', '/', '.com', '.', '{done}'], + ], + url_shift: [ + ['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], + ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'], + ['{shift}', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '{backspace}'], + ['{numeric}', '/', '.com', '.', '{done}'], + ], + url_numeric: [ + ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], + ['@', '&', '%', '?', ',', '=', '[', ']'], + ['{symbolic}', '_', ':', '-', '+', '{backspace}'], + ['{alphabetic}', '/', '.com', '.', '{done}'], + ], + url_symbolic: [ + ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], + ['*', '$', '#', '!', "'", '^', '[', ']'], + ['{numeric}', '~', ';', '(', ')', '{backspace}'], + ['{alphabetic}', '/', '.com', '.', '{done}'], + ], + numeric_default: [ + ['1', '2', '3'], + ['4', '5', '6'], + ['7', '8', '9'], + ['0', '{backspace}'], + ], + decimal_default: [ + ['1', '2', '3'], + ['4', '5', '6'], + ['7', '8', '9'], + ['.', '0', '{backspace}'], + ], + tel_default: [ + ['1', '2', '3', '*'], + ['4', '5', '6', '#'], + ['7', '8', '9', '+'], + ['0', '{backspace}'], + ], +}; + +const display: Display = { + '{done}': fnDisplay.DONE, + '{shift}': fnDisplay.SHIFT, + '{backspace}': fnDisplay.BACKSPACE, + '{space}': fnDisplay.SPACE, + '{alphabetic}': 'ABC', + '{numeric}': '123', + '{symbolic}': '#+=', +}; + +const locale: Locale = { + code: 'hu-HU', + dir: 'ltr', + layouts: layouts, + display: display, +}; + +export default locale; diff --git a/projects/ngx-touch-keyboard/src/lib/Locale/index.ts b/projects/ngx-touch-keyboard/src/lib/Locale/index.ts index 71477ba..2b07d44 100644 --- a/projects/ngx-touch-keyboard/src/lib/Locale/index.ts +++ b/projects/ngx-touch-keyboard/src/lib/Locale/index.ts @@ -2,6 +2,7 @@ export { default as enGB } from './en-GB'; export { default as enUS } from './en-US'; export { default as faIR } from './fa-IR'; export { default as heIL } from './he-IL'; +export { default as huHU } from './hu-HU'; export { default as kaGE } from './ka-GE'; export { default as ruRU } from './ru-RU'; export { default as svSE } from './sv-SE'; diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 4dde9bf..67878c3 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -21,6 +21,7 @@ export class AppComponent { { value: 'en-GB', name: 'English (UK)' }, { value: 'fa-IR', name: 'Persian' }, { value: 'he-IL', name: 'Hebrew' }, + { value: 'hu-HU', name: 'Hungarian' }, { value: 'ka-GE', name: 'Georgian' }, { value: 'ru-RU', name: 'Russian' }, { value: 'sv-SE', name: 'Swedish' },