Skip to content
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

feat(i18n): add Belarusian translation #6421

Merged
merged 1 commit into from
Jan 19, 2024
Merged
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
3 changes: 1 addition & 2 deletions projects/addon-commerce/enums/currency-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,12 @@ export enum TuiCurrencyCode {
Baht = '764',

/**
*
* Belarusian ruble
*
* @description Numeric code: 933
* @description Alphabetic code: BYN
* @description Countries and territories: Belarus
* @description Currency symbol: Rbl
* @description Currency symbol: Br
*/
BelarusianRuble = '933',

Expand Down
8 changes: 8 additions & 0 deletions projects/addon-commerce/enums/currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ export enum TuiCurrency {
*/
Baht = 'THB',

/**
* Belarusian ruble
*
* @description Numeric code: 933
* @description Alphabetic code: BYN
* @description Countries and territories: Belarus
* @description Currency symbol: Br
*/
BelarusianRuble = 'BYN',

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ export class TuiLanguageSwitcherComponent {
readonly language = new FormControl(tuiCapitalizeFirstLetter(this.switcher.language));

readonly flags = new Map<TuiLanguageName, TuiCountryIsoCode>([
['belarusian', TuiCountryIsoCode.BY],
['chinese', TuiCountryIsoCode.CN],
['dutch', TuiCountryIsoCode.NL],
['english', TuiCountryIsoCode.GB],
['french', TuiCountryIsoCode.FR],
['german', TuiCountryIsoCode.DE],
['italian', TuiCountryIsoCode.IT],
['kazakh', TuiCountryIsoCode.KZ],
['malay', TuiCountryIsoCode.MY],
['polish', TuiCountryIsoCode.PL],
['portuguese', TuiCountryIsoCode.PT],
['russian', TuiCountryIsoCode.RU],
['spanish', TuiCountryIsoCode.ES],
['turkish', TuiCountryIsoCode.TR],
['ukrainian', TuiCountryIsoCode.UA],
['kazakh', TuiCountryIsoCode.KZ],
['malay', TuiCountryIsoCode.MY],
['vietnamese', TuiCountryIsoCode.VN],
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {tuiLanguageSwitcher} from '@taiga-ui/i18n/switch';
// ...
tuiLanguageSwitcher(async (language: TuiLanguageName): Promise<unknown> => {
switch (language) {
case `belarusian`:
return import(`@taiga-ui/i18n/languages/belarusian`);
case `chinese`:
return import(`@taiga-ui/i18n/languages/chinese`);
case `dutch`:
Expand Down
1 change: 1 addition & 0 deletions projects/i18n/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Supported languages:
| -------------------- | :---------------------: |
| English (by default) | TUI_ENGLISH_LANGUAGE |
| Russian | TUI_RUSSIAN_LANGUAGE |
| Belarusian | TUI_BELARUSIAN_LANGUAGE |
| Spanish | TUI_SPANISH_LANGUAGE |
| German | TUI_GERMAN_LANGUAGE |
| Turkish | TUI_TURKISH_LANGUAGE |
Expand Down
1 change: 1 addition & 0 deletions projects/i18n/interfaces/language-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export type TuiLanguageName =
| string
| 'belarusian'
| 'chinese'
| 'dutch'
| 'english'
Expand Down
6 changes: 6 additions & 0 deletions projects/i18n/languages/belarusian/addon-commerce.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {TuiLanguageCommerce} from '@taiga-ui/i18n/interfaces';

export const TUI_BELARUSIAN_LANGUAGE_ADDON_COMMERCE: TuiLanguageCommerce = {
cardNumber: ['Нумар', 'Нумар карты'],
cardExpiry: ['Тэрмін', 'Тэрмін дзеяння'],
};
67 changes: 67 additions & 0 deletions projects/i18n/languages/belarusian/addon-editor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import {TuiLanguageEditor} from '@taiga-ui/i18n/interfaces';

export const TUI_BELARUSIAN_LANGUAGE_ADDON_EDITOR: TuiLanguageEditor = {
colorSelectorModeNames: ['Колер', 'Градыент'],
toolbarTools: {
undo: 'Адрабіць',
redo: 'Узнавіць',
font: 'Шрыфт',
fontStyle: 'Стыль шрыфту',
fontSize: 'Памер шрыфту',
bold: 'Тлусты',
italic: 'Курсіў',
underline: 'Падкрэслены',
strikeThrough: 'Закрэслены',
justify: 'Выраўноўванне',
justifyLeft: 'Выраўнаваць па левым краі',
justifyCenter: 'Выраўнаваць па цэнтры',
justifyRight: 'Выраўнаваць па правым краі',
justifyFull: 'Выраўнаваць па шырыні',
list: 'Спіс',
indent: 'Павялічыць водступ',
outdent: 'Паменшыць водступ',
unorderedList: 'Маркіраваны спіс',
orderedList: 'Нумараваны спіс',
quote: 'Цытата',
foreColor: 'Колер тэксту',
hiliteColor: 'Колер вылучэння',
backColor: 'Колер фону',
clear: 'Ачысціць фарматаванне',
link: 'Спасылка',
attach: 'Далучыць файл',
tex: 'TeX',
code: 'Код',
image: 'Відарыс',
insertHorizontalRule: 'Гарызантальная лінія',
superscript: 'Надрадковы',
subscript: 'Падрадковы',
insertTable: 'Табліца',
insertGroup: 'Група',
hiliteGroup: 'Колер групы',
removeGroup: 'Выдаліць групу',
insertAnchor: 'Якар',
mergeCells: 'Аб’яднаць ячэйкі',
splitCells: 'Раз’яднаць ячэйкі',
rowsColumnsManaging: 'Кіраванне радкамі і слупкамі',
cellColor: 'Колер ячэйкі',
setDetails: 'Акардэон',
removeDetails: 'Выдаліць акардэон',
},
editorEditLink: {
urlExample: 'example.com',
anchorExample: 'Ідэнтыфікатар_якара',
},
editorTableCommands: [
['Дадаць слупок злева', 'Дадаць слупок справа'],
['Дадаць радок зверху', 'Дадаць радок знізу'],
['Выдаліць слупок', 'Выдаліць радок'],
],
editorCodeOptions: ['Inline-код', 'Блок кода'],
editorFontOptions: {
small: 'Малы',
normal: 'Звычайны',
large: 'Вялікі',
title: 'Загаловак',
subtitle: 'Падзагаловак',
},
};
12 changes: 12 additions & 0 deletions projects/i18n/languages/belarusian/addon-preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {TuiLanguagePreview} from '@taiga-ui/i18n/interfaces';

export const TUI_BELARUSIAN_LANGUAGE_ADDON_PREVIEW: TuiLanguagePreview = {
previewTexts: {
rotate: 'Павярнуць',
},
zoomTexts: {
zoomIn: 'Павялічыць',
zoomOut: 'Паменшыць',
reset: 'Скінуць маштаб',
},
};
10 changes: 10 additions & 0 deletions projects/i18n/languages/belarusian/addon-table.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {TuiLanguageTable} from '@taiga-ui/i18n/interfaces';

export const TUI_BELARUSIAN_LANGUAGE_ADDON_TABLE: TuiLanguageTable = {
showHideText: 'Паказаць/Схаваць',
paginationTexts: {
pages: 'Старонак',
linesPerPage: 'Радкоў на старонку',
of: 'з',
},
};
18 changes: 18 additions & 0 deletions projects/i18n/languages/belarusian/belarusian.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {TuiLanguage} from '@taiga-ui/i18n/interfaces';

import {TUI_BELARUSIAN_LANGUAGE_ADDON_COMMERCE} from './addon-commerce';
import {TUI_BELARUSIAN_LANGUAGE_ADDON_EDITOR} from './addon-editor';
import {TUI_BELARUSIAN_LANGUAGE_ADDON_PREVIEW} from './addon-preview';
import {TUI_BELARUSIAN_LANGUAGE_ADDON_TABLE} from './addon-table';
import {TUI_BELARUSIAN_LANGUAGE_CORE} from './core';
import {TUI_BELARUSIAN_LANGUAGE_KIT} from './kit';

export const TUI_BELARUSIAN_LANGUAGE: TuiLanguage = {
name: 'belarusian',
...TUI_BELARUSIAN_LANGUAGE_CORE,
...TUI_BELARUSIAN_LANGUAGE_KIT,
...TUI_BELARUSIAN_LANGUAGE_ADDON_COMMERCE,
...TUI_BELARUSIAN_LANGUAGE_ADDON_TABLE,
...TUI_BELARUSIAN_LANGUAGE_ADDON_EDITOR,
...TUI_BELARUSIAN_LANGUAGE_ADDON_PREVIEW,
};
26 changes: 26 additions & 0 deletions projects/i18n/languages/belarusian/core.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {TuiLanguageCore} from '@taiga-ui/i18n/interfaces';

import {TUI_BELARUSIAN_LANGUAGE_COUNTRIES} from './countries';

export const TUI_BELARUSIAN_LANGUAGE_CORE: TuiLanguageCore = {
months: [
'Студзень',
'Люты',
'Сакавік',
'Красавік',
'Май',
'Чэрвень',
'Ліпень',
'Жнівень',
'Верасень',
'Кастрычнік',
'Лістапад',
'Снежань',
],
close: 'Закрыць',
nothingFoundMessage: 'Нічога не знойдзена',
defaultErrorMessage: 'Недапушчальнае значэнне',
spinTexts: ['Папярэдні', 'Наступны'],
shortWeekDays: ['Пн', 'Аў', 'Ср', 'Чц', 'Пт', 'Сб', 'Нд'],
countries: TUI_BELARUSIAN_LANGUAGE_COUNTRIES,
};
Loading
Loading