Skip to content

Commit f8d11e0

Browse files
committed
Translate to English
1 parent 28df74a commit f8d11e0

File tree

12 files changed

+70
-69
lines changed

12 files changed

+70
-69
lines changed

README.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
# vba helpers
1+
# VBA helpers
22

3-
## 1. Описание
4-
`vba helpers` - это небольшая коллекция кусочков [VBA](https://ru.wikipedia.org/wiki/Visual_Basic_for_Applications) кода (хелперов) в формате `.bas` файлов.
3+
## 1. Description
4+
This is a free collection of small [VBA](https://en.wikipedia.org/wiki/Visual_Basic_for_Applications) code pieces indended to help solve common Excel programming cases.
55

6-
`helper` - вспомогательная процедура / функция.
6+
`helper` - utillity procedure / function.
77

8-
Хелперы хранятся в [API репозитории](https://github.com/akzhar/vba-helpers-api/tree/main/data/code).
8+
All the helpers stored as `.bas` files [here](https://github.com/akzhar/vba-helpers-api/tree/main/data).
99

10-
## 2. Ссылки
11-
- [Опубликованное приложение](https://vba-helpers.herokuapp.com)
12-
- [API репозиторий](https://github.com/akzhar/vba-helpers-api)
10+
## 2. Links
11+
- [VBA helpers application](https://vba-helpers.herokuapp.com)
12+
- [VBA helpers API repository](https://github.com/akzhar/vba-helpers-api)
1313

14-
## 3. Описание функционала
15-
Веб интерфейс позволяей найти и применить нужный хелпер в своем макросе.
14+
## 3. Functionality
15+
App allows you to easily find the helper what you need.
1616

17-
5 способов найти хелпер:
18-
- [искать по заголовку хелпера](https://vba-helpers.herokuapp.com/search?type=t)
19-
- [искать по категории хелпера](https://vba-helpers.herokuapp.com/search?type=k)
20-
- [искать по ключевой фразе](https://vba-helpers.herokuapp.com/search?type=k)
21-
- [искать по имени хелпера](https://vba-helpers.herokuapp.com/search?type=n)
22-
- [искать по ID хелпера](https://vba-helpers.herokuapp.com/search?type=i)
17+
5 ways to search helpers:
2318

24-
## 4. Установка зависимостей
25-
Находясь в корневой папке проекта, выполните команду `npm i`
19+
- [search by title](https://vba-helpers.herokuapp.com/search?type=t)
20+
- [search by category](https://vba-helpers.herokuapp.com/search?type=k)
21+
- [search by keywords](https://vba-helpers.herokuapp.com/search?type=k)
22+
- [search by name](https://vba-helpers.herokuapp.com/search?type=n)
23+
- [search by ID](https://vba-helpers.herokuapp.com/search?type=i)
2624

27-
## 5. Запуск приложения в dev режиме
28-
Находясь в корневой папке проекта, выполните команду `npm run start`
25+
## 4. Install dependencies
26+
`git clone repo_url``cd ./repo-folder``npm install`
27+
28+
## 5. Build and run the app
29+
`cd ./repo-folder``npm run start`

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="ru">
2+
<html lang="en">
33
<head>
44
<meta charset="utf-8">
55
<base href="/">

src/components/About/About.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@ import { AboutLinks } from '@consts/const';
55

66
const About: React.FC = () => (
77
<section className="about">
8-
<Header id="about" text="Что это такое?"/>
8+
<Header id="about" text="What is it?"/>
99
<p>
10-
При написании макросов для <b>Excel</b> часто
11-
возникает потребность выделить часть кода в отдельные
12-
функции / процедуры с целью последующего переиспользования
13-
в других местах. Например, код для сортировки /
14-
фильтрации массивов разумно вынести в отдельные ф-ции /
15-
процедуры с целью последующего переиспользования в других
16-
макросах. Подобный подход разгружает основные модули от
17-
избыточных конструкций, упрощает отладку и поддержку кода.
18-
Такие кусочки <a href={AboutLinks.WIKI_VBA} target="_blank" rel="noreferrer">VBA</a> кода
19-
со временем копятся, возникакет потребность их где-то хранить.
10+
When writing macros
11+
for <b>Excel</b> using <a href={AboutLinks.WIKI_VBA} target="_blank" rel="noreferrer">VBA</a> often
12+
there is a need to separate a part of the code into separate
13+
functions/procedures for further reuse
14+
in other places. For example, it is reasonable to put the code for sorting/
15+
filtering arrays into separate functions/
16+
procedures for further reuse in other
17+
macros. This approach simplifies debugging and code support.
18+
Over time there is a need to store such pieces of code somewhere.
2019
</p>
2120
<p>
22-
<b>vba helpers</b> - это небольшая коллекция таких кусочков
23-
кода (хелперов) в формате <b>.bas</b> файлов. Хелперы хранятся
24-
в <a href={AboutLinks.GIT_REPO} target="_blank" rel="noreferrer">git репозитории</a>,
25-
а веб интерфейс позволяет найти и применить нужный хелпер в своем макросе.
21+
<b>vba helpers</b> - is a free collection of small code pieces
22+
indended to help solve common Excel programming cases.
23+
All the helpers stored as <b>.bas</b> files
24+
in the <a href={AboutLinks.GIT_REPO} target="_blank" rel="noreferrer">git repository</a> and
25+
this site allows you to easily find the helper what you need.
2626
</p>
2727
<dl>
2828
<dt>helper *</dt>
29-
<dd>вспомогательная процедура / функция</dd>
29+
<dd>utillity procedure / function</dd>
3030
</dl>
3131
<p>
32-
Каждый хелпер выполняет определенную узкую задачу.
33-
Все хелперы разделены на категории.
32+
Each helper performs a specific task.
33+
All helpers are divided into categories.
3434
</p>
3535
</section>
3636
);

src/components/Categories/Categories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const Categories: React.FC = () => {
2424

2525
return (
2626
<section className="categories">
27-
<Header id="categories" text="Категории хелперов" />
27+
<Header id="categories" text="Helpers categories" />
2828
<>
2929
{ isLoading
3030
?
@@ -45,7 +45,7 @@ const Categories: React.FC = () => {
4545
})}
4646
</ul>
4747
:
48-
<p className="categories__empty-msg">Не найдено ни одной категории</p>
48+
<p className="categories__empty-msg">Sorry, no category was found</p>
4949
)
5050
}
5151
</>

src/components/Contacts/Contacts.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import TelegramLink from './TelegramLink';
88

99
const Contacts: React.FC = () => (
1010
<section className="contacts">
11-
<Header id="contacts" text="Контакты" />
11+
<Header id="contacts" text="Contacts" />
1212
<p>
13-
Баги и замечания приветствуются на <IssuesLink />.<br/>
14-
По остальным вопросам доступен в Telegram <TelegramLink />
13+
Log your ideas and issues on <IssuesLink />.<br/>
14+
Feel free to touch me in <TelegramLink />.
1515
</p>
1616
<ul>
1717
<li>

src/components/Contacts/TelegramLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import { ContactLinks } from '@consts/const';
44

55
const TelegramLink: React.FC = () => (
6-
<a href={ContactLinks.TELEGRAM} target="_blank" rel="noreferrer" title="Write to @akzhario">@akzhario</a>
6+
<a href={ContactLinks.TELEGRAM} target="_blank" rel="noreferrer" title="Write to @akzhario">Telegram</a>
77
);
88

99
export default TelegramLink;

src/components/HelperItem/HelperItem.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ const HelperItem: React.FC<THelperItemProps> = ({helper, open: isOpen}) => {
3838
<div className="helper__links">
3939
<a href={`${HelperLinks.VIEW}/${helper.file}`} target="_blank" rel="noreferrer">
4040
<svg width="12" height="12"><use xlinkHref="#eye" /></svg>
41-
<span>Смотреть код</span>
41+
<span>View code</span>
4242
</a>
4343
<a href={`${HelperLinks.RAW}/${helper.file}`} target="_blank" rel="noreferrer">
4444
<svg width="12" height="12"><use xlinkHref="#script" /></svg>
45-
<span>{`Файл ${helper.file.slice(helper.file.indexOf('.'))}`}</span>
45+
<span>{`File ${helper.file.slice(helper.file.indexOf('.'))}`}</span>
4646
</a>
4747
</div>
4848
</div>
4949
<div className="helper__column">
50-
<h3 className="helper__header">Описание</h3>
50+
<h3 className="helper__header">Description</h3>
5151
<p
5252
className="helper__description"
5353
dangerouslySetInnerHTML={
@@ -59,7 +59,7 @@ const HelperItem: React.FC<THelperItemProps> = ({helper, open: isOpen}) => {
5959
</div>
6060
</div>
6161
<div className="helper__example">
62-
<h3 className="helper__header">Пример использования</h3>
62+
<h3 className="helper__header">Usage example</h3>
6363
{
6464
helper.usage.length
6565
?
@@ -79,7 +79,7 @@ const HelperItem: React.FC<THelperItemProps> = ({helper, open: isOpen}) => {
7979
</div>
8080
</pre>
8181
:
82-
'Нет'
82+
'N/a'
8383
}
8484
</div>
8585
</details>

src/components/SearchForm/SearchForm.sass

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
border: none
1919

2020
@media(min-width: $width-mobile)
21-
width: 76%
21+
width: 86%
2222

2323
&__type
2424
display: none
@@ -56,15 +56,15 @@
5656
font-style: italic
5757
color: $color-grey-light
5858

59-
&__hints
59+
&__methods
6060
min-width: 160px
6161
margin: 0
6262
padding: 10px 10px
6363
color: $color-grey
6464
list-style: none
6565

6666
@media(min-width: $width-mobile)
67-
width: 24%
67+
width: 16%
6868
padding: 10px 20px
6969

7070
& li

src/components/SearchForm/SearchForm.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import ActionCreator from '@store/actions';
1010
import { TState } from '@store/reducer';
1111

1212
export const SearchTypeToHint: { [key: string]: string } = {
13-
t: 'искать по заголовку хелпера',
14-
c: 'искать по категории хелпера',
15-
k: 'искать по ключевой фразе',
16-
n: 'искать по имени хелпера',
17-
i: 'искать по ID хелпера'
13+
t: 'search by title',
14+
c: 'search by category',
15+
k: 'search by keywords',
16+
n: 'search by name',
17+
i: 'search by id'
1818
};
1919

2020
export const INITIAL_SEARCH_TYPE = 'k';
@@ -180,7 +180,7 @@ const SearchForm: React.FC = () => {
180180
onChange={dbInputChangeHandler}
181181
/>
182182
</fieldset>
183-
<ul className="search__hints">
183+
<ul className="search__methods">
184184
{searchTypes.map((type: string) => {
185185
const hint = SearchTypeToHint[type];
186186
return (
@@ -191,7 +191,7 @@ const SearchForm: React.FC = () => {
191191
</li>
192192
)})}
193193
<li>
194-
<button data-testid="search-submit" type="submit" className="button"><b>Enter</b> - искать</button>
194+
<button data-testid="search-submit" type="submit" className="button"><b>Enter</b> - search</button>
195195
</li>
196196
</ul>
197197
</form>

src/components/SearchMethods/SearchMethods.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const SearchMethods: React.FC = () => (
1313
<section className="search-methods">
1414
<Header
1515
id="search-methods"
16-
text={`${searchTypes.length} ${getPlural(searchTypes.length, 'способ', 'способа', 'способов')} найти хелпер`}
16+
text={`${searchTypes.length} ${getPlural(searchTypes.length, 'way', 'ways', 'ways')} to search helpers`}
1717
/>
1818
<ol>
1919
{searchTypes.map(type => (

src/consts/const.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export const AppRoutes: TLinks = {
66
};
77

88
export const AboutLinks: TLinks = {
9-
WIKI_VBA: 'https://ru.wikipedia.org/wiki/Visual_Basic_for_Applications',
10-
GIT_REPO: 'https://github.com/akzhar/vba-helpers-api/tree/main/data/code'
9+
WIKI_VBA: 'https://en.wikipedia.org/wiki/Visual_Basic_for_Applications',
10+
GIT_REPO: 'https://github.com/akzhar/vba-helpers-api/tree/main/data'
1111
};
1212

1313
export const ContactLinks: TLinks = {

src/store/actions.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,17 @@ const ActionCreator = {
121121
dispatch({ type: ActionTypes.SET_HELPERS_ITEMS, payload: helpers });
122122

123123
if(helpers.length) {
124-
const verb = getPlural(helpers.length, 'Найден', 'Найдено', 'Найдено');
125-
const noun = getPlural(helpers.length, 'хелпер', 'хелпера', 'хелперов');
126-
dispatch(ActionCreator.setInfoMessage({ label: '😊', text: `${verb} ${helpers.length} ${noun}` }));
124+
const noun = getPlural(helpers.length, 'helper', 'helpers', 'helpers');
125+
dispatch(ActionCreator.setInfoMessage({ label: '😊', text: `${helpers.length} ${noun} found` }));
127126
} else {
128-
dispatch(ActionCreator.setWarnMessage({ label: '😭', text: 'Хелперы не найдены' }));
127+
dispatch(ActionCreator.setWarnMessage({ label: '😭', text: 'No helper was found' }));
129128
}
130129

131130
})
132131
.catch((err) => {
133-
console.error('Ошибка получения хелперов: ', err);
134-
dispatch(ActionCreator.setWarnMessage({ label: '😭', text: 'Ошибка получения хелперов' }));
132+
const errMessage = 'Error when getting helpers';
133+
console.error(errMessage, err);
134+
dispatch(ActionCreator.setWarnMessage({ label: '😭', text: errMessage }));
135135
})
136136
.finally(() => {
137137
dispatch(ActionCreator.setHelpersIsLoading({ flag: false }));

0 commit comments

Comments
 (0)