Skip to content

Commit

Permalink
refactor(lang): translated russian text to english (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
WynieCronje authored Jan 27, 2021
1 parent c875a81 commit a6546e1
Show file tree
Hide file tree
Showing 65 changed files with 810 additions and 808 deletions.
6 changes: 3 additions & 3 deletions projects/addon-doc/src/utils/transliterate-keyboard-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ const MAP: Record<string, string> = {
};

/**
* Транслитирует текст, ошибочно набранный в русской раскладке, в английскую
* @param string строка с символами русской раскладки
* @return строка с символами английской раскладки
* Translates text mistakenly typed in the Russian layout into English
* @param string string with Russian layout characters
* @return string with English layout characters
*/
export function transliterateKeyboardLayout(string: string): string {
let newStr = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
tuiIconButton
type="button"
size="s"
title="Вставить ссылку"
title="Insert link"
icon="tuiIconCheckCircleLarge"
class="button"
shape="rounded"
Expand All @@ -40,7 +40,7 @@
tuiIconButton
type="button"
size="s"
title="Изменить ссылку"
title="Change link"
icon="tuiIconEditLarge"
class="button"
shape="rounded"
Expand All @@ -51,7 +51,7 @@
tuiIconButton
type="button"
size="s"
title="Удалить ссылку"
title="Remove link"
icon="tuiIconTrashLarge"
class="button"
shape="rounded"
Expand Down
12 changes: 6 additions & 6 deletions projects/addon-editor/components/toolbar/toolbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,34 +93,34 @@ export class TuiToolbarComponent {
{
size: '2',
px: 13,
name: 'Небольшой',
name: 'Small',
},
{
size: '3',
px: 15,
name: 'Обычный',
name: 'Normal',
},
{
size: '4',
px: 17,
name: 'Крупный',
name: 'Large',
},
{
size: '5',
px: 24,
family: 'var(--tui-font-heading)',
name: 'Подзаголовок',
name: 'Subtitle',
},
{
size: '6',
px: 30,
family: 'var(--tui-font-heading)',
name: 'Заголовок',
name: 'Title',
},
];

// TODO: i18n
readonly codesOptions: readonly string[] = ['Код в тексте', 'Код в блоке'];
readonly codesOptions: readonly string[] = ['Code in the text', 'Code in block'];

@ViewChildren('button')
private readonly buttons: QueryList<TuiButtonComponent> = EMPTY_QUERY;
Expand Down
36 changes: 18 additions & 18 deletions projects/addon-editor/components/toolbar/toolbar.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Текст"
tuiHint="Color: Текст"
appearance="icon"
shape="rounded"
class="color color_text"
Expand All @@ -468,7 +468,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Белый"
tuiHint="Color: Белый"
appearance="icon"
shape="rounded"
class="color color_white"
Expand All @@ -479,7 +479,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Primary"
tuiHint="Color: Primary"
appearance="icon"
shape="rounded"
class="color color_primary"
Expand All @@ -492,7 +492,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Pinkie"
tuiHint="Color: Pinkie"
appearance="icon"
shape="rounded"
class="color color_pinkie"
Expand All @@ -503,7 +503,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Amethyst"
tuiHint="Color: Amethyst"
appearance="icon"
shape="rounded"
class="color color_amethyst"
Expand All @@ -514,7 +514,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Helio"
tuiHint="Color: Helio"
appearance="icon"
shape="rounded"
class="color color_helio"
Expand All @@ -527,7 +527,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Picton"
tuiHint="Color: Picton"
appearance="icon"
shape="rounded"
class="color color_picton"
Expand All @@ -538,7 +538,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Puerto Rico"
tuiHint="Color: Puerto Rico"
appearance="icon"
shape="rounded"
class="color color_puertorico"
Expand All @@ -549,7 +549,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Feijoa"
tuiHint="Color: Feijoa"
appearance="icon"
shape="rounded"
class="color color_feijoa"
Expand Down Expand Up @@ -597,7 +597,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Прозрачный"
tuiHint="Color: Transparent"
icon="tuiIconTransparentLarge"
shape="rounded"
appearance="icon"
Expand All @@ -609,7 +609,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Primary"
tuiHint="Color: Primary"
appearance="icon"
shape="rounded"
class="color color_primary"
Expand All @@ -620,7 +620,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Tan"
tuiHint="Color: Tan"
appearance="icon"
shape="rounded"
class="color color_tan"
Expand All @@ -633,7 +633,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Pinkie"
tuiHint="Color: Pinkie"
appearance="icon"
shape="rounded"
class="color color_pinkie"
Expand All @@ -644,7 +644,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Amethyst"
tuiHint="Color: Amethyst"
appearance="icon"
shape="rounded"
class="color color_amethyst"
Expand All @@ -655,7 +655,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Helio"
tuiHint="Color: Helio"
appearance="icon"
shape="rounded"
class="color color_helio"
Expand All @@ -668,7 +668,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Picton"
tuiHint="Color: Picton"
appearance="icon"
shape="rounded"
class="color color_picton"
Expand All @@ -679,7 +679,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Puerto Rico"
tuiHint="Color: Puerto Rico"
appearance="icon"
shape="rounded"
class="color color_puertorico"
Expand All @@ -690,7 +690,7 @@
tuiIconButton
type="button"
size="xs"
tuiHint="Цвет: Feijoa"
tuiHint="Color: Feijoa"
appearance="icon"
shape="rounded"
class="color color_feijoa"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('TuiDesignMode directive', () => {
});

// TODO: Understand why this doesn't work
xit('работает туда', () => {
xit('works there', () => {
const documentRef = contentDocument();

if (documentRef) {
Expand All @@ -47,7 +47,7 @@ describe('TuiDesignMode directive', () => {
expect(testComponent.model).toBe(html);
});

it('работает сюда', done => {
it('works here', done => {
testComponent.model = html;
fixture.detectChanges();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('MobileCalendar', () => {
.find(item => item.classes['cell_today'])!.nativeElement;
}

it('кнопка назад испускает событие cancel', () => {
it('the back button emits a cancel event', () => {
pageObject
.getByAutomationId('tui-mobile-calendar__cancel')!
.nativeElement.click();
Expand All @@ -104,8 +104,8 @@ describe('MobileCalendar', () => {
).toBe('Choose range');
});

describe('кнопка "Готово" испускает', () => {
it('событие confirm с выбранным днём', done => {
describe('when the done button emits', () => {
it('confirm event with selected day', done => {
setTimeout(() => {
fixture.detectChanges();
getToday().click();
Expand All @@ -120,7 +120,7 @@ describe('MobileCalendar', () => {
}, 100);
});

it('событие confirm с выбранным интервалом', done => {
it('confirm event at selected interval', done => {
setTimeout(() => {
fixture.detectChanges();
testComponent.single = false;
Expand All @@ -139,7 +139,7 @@ describe('MobileCalendar', () => {
}, 100);
});

it('событие confirm с выбранным интервалом с разными датами', fakeAsync(() => {
it('confirm event with selected interval with different dates', fakeAsync(() => {
testComponent.single = false;
fixture.autoDetectChanges();
tick(500);
Expand All @@ -159,7 +159,7 @@ describe('MobileCalendar', () => {
expect(value.isSingleDay).toBe(false);
}));

it('событие cancel, если значение null', fakeAsync(() => {
it('cancel event if null', fakeAsync(() => {
testComponent.component.value = null;
pageObject
.getByAutomationId('tui-mobile-calendar__confirm')!
Expand All @@ -171,7 +171,7 @@ describe('MobileCalendar', () => {
});

// :hidethepain:
it('Выбор года прокручивает месяцы', done => {
it('Year selection scrolls through months', done => {
setTimeout(() => {
testComponent.component.setYear(1950);
fixture.detectChanges();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('TableBarsHost', () => {
}
});

it('Слушает сервис для добавления tableBar', done => {
it('Listens to service for adding tableBar', done => {
component.service.bar$.pipe(take(1)).subscribe(bar => {
expect(bar && bar.content).toBe(title);
done();
Expand All @@ -72,7 +72,7 @@ describe('TableBarsHost', () => {
service.open(title).pipe(take(1)).subscribe();
});

it('tableBar удаляются по unsubscribe', done => {
it('tableBar removed by unsubscribe', done => {
component.service.bar$.pipe(skip(1), take(1)).subscribe(bar => {
expect(bar).toBe(null);
done();
Expand All @@ -84,37 +84,37 @@ describe('TableBarsHost', () => {
.subscribe();
});

it('по умолчанию tableBar темный', () => {
it('the default tableBar is dark', () => {
service.open(title).pipe(take(1)).subscribe();

fixture.detectChanges();

expect(getBar().nativeElement.classList.contains('bar_light')).toBe(false);
});

it('при mode: light tableBar светлый', () => {
it('pi mode: light tableBar light', () => {
service.open(title, {mode: 'onDark'}).pipe(take(1)).subscribe();
fixture.detectChanges();

expect(getBar().nativeElement.classList.contains('bar_light')).toBe(true);
});

it('по умолчанию кнопки закрытия нет', () => {
it('there is no close button by default', () => {
service.open(title).pipe(take(1)).subscribe();

fixture.detectChanges();

expect(getCloseButton()).toBeNull();
});

it('при hasCloseButton: true tableBar кнопка закрытия есть', () => {
it('when hasCloseButton: true tableBar there is a close button', () => {
service.open(title, {hasCloseButton: true}).pipe(take(1)).subscribe();
fixture.detectChanges();

expect(getCloseButton()).not.toBeNull();
});

it('нажатие closeButton удаляет текущий tableBar', done => {
it('pressing closeButton removes the current tableBar', done => {
service.bar$.pipe(skip(1), take(1)).subscribe(bar => {
expect(bar).toBe(null);
done();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ describe('Calendar', () => {
fixture.detectChanges();
});

it('Выбор года изначально не виден', () => {
it('Year selection is not initially visible', () => {
expect(pageObject.getByAutomationId(`${testContext.prefix}year`)).toBeNull();
});

it('Выбор месяца изначально виден', () => {
it('Month selection is initially visible', () => {
expect(
pageObject.getByAutomationId(`${testContext.prefix}pagination`),
).not.toBeNull();
});

it('Выбор дня изначально виден', () => {
it('Day selection is initially visible', () => {
expect(
pageObject.getByAutomationId(`${testContext.prefix}calendar`),
).not.toBeNull();
Expand Down
Loading

0 comments on commit a6546e1

Please sign in to comment.