Skip to content

add the hungarian language #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,8 @@
}
}
}
},
"cli": {
"analytics": false
}
}
200 changes: 200 additions & 0 deletions projects/ngx-touch-keyboard/src/lib/Locale/hu-HU/index.ts
Original file line number Diff line number Diff line change
@@ -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;
1 change: 1 addition & 0 deletions projects/ngx-touch-keyboard/src/lib/Locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
1 change: 1 addition & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down