Skip to content

Commit

Permalink
Merge pull request #16 from PetroSilenius/add-ru-locale
Browse files Browse the repository at this point in the history
Add Russian translations
  • Loading branch information
PetroSilenius authored Apr 10, 2022
2 parents d793a39 + 832ad68 commit beac926
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Add a new locale to [next.config.js](next.config.js). The locale format [ISO 639

Add a `json` file with the name of the locale to [lang](lang). Copy the `json` content from [en.json](lang/en.json) and translate the text content for the new language.

The reaction counts are stored in Firebase [Firestore Database](https://cloud.google.com/firestore). The reactions are prefetched on server and refetched in the browser once a change to the database occurs.
Add a translation for the new language to existing languages by using the locale format as the json key.

## Tech Stack 💻

Expand All @@ -46,6 +46,8 @@ The user interface of the application is styled using [tailwindcss](https://tail

The data is stored in json files under [data](data) and [lang](lang). This allows saving the data in a transparent way compared to a CMS or database. It also allows collaboration on those data sources without much prerequisites.

The reaction counts are stored in Firebase [Firestore Database](https://cloud.google.com/firestore). The reactions are prefetched on server and refetched in the browser once a change to the database occurs.

## How to run

### Installation
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"about": "What's this about?",
"fi": "Finnish",
"en": "English",
"ru": "Russian",
"give_help": "Give help",
"give_description": "Search and vote on the causes seen most valuable by the community",
"seek_help": "Seek help",
Expand Down
3 changes: 2 additions & 1 deletion lang/fi.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"main_heading": "Auta Ukrainalaisia",
"main_description": "Hae tietoa miten voit antaa apua Ukrainalaisille tai etsiä tukea",
"main_description": "Hae tietoa miten voit antaa apua ukrainalaisille tai etsiä tukea",
"main_description2": "Yhteisön rakentama yhteisölle",
"suggest": "Ehdota",
"about": "Mistä on kyse?",
"fi": "Suomi",
"en": "Englanti",
"ru": "Venäjä",
"give_help": "Anna apua",
"give_description": "Etsi ja äänestä yhteisön mielestä hyödyllisimpiä kohteita",
"seek_help": "Etsi tukea",
Expand Down
43 changes: 43 additions & 0 deletions lang/ru.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"main_heading": "Содействие украинцам",
"main_description": "Поиск информации о том, как предоставить помощь украинцам и как получить помощь",
"main_description2": "Создано и поддерживается сообществом, в интересах сообщества",
"suggest": "Внести предложение",
"about": "В чем цель проекта?",
"fi": "Финский",
"en": "Английский",
"ru": "Русский",
"give_help": "Предоставить помощь",
"give_description": "Поиск самых насущных направлений помощи и голосование по ним",
"seek_help": "Попросить о помощи",
"seek_description": "Получить помощь по самым насущным направлениям и проголосовать за них",
"transport": "Транспорт",
"activities": "Мероприятия",
"shelter": "Проживание",
"donations": "Пожертвования",
"necessities": "Предметы первой необходимости",
"unicef": "UNICEF",
"unicef_description": "Жизненно важная помощь детям и их семьям.",
"red_cross_ua": "Украинский Красный Крест",
"red_cross_ua_description": "Работа по организации медицинской помощи, спасения и поиска пропавших.",
"army_ukraine": "Украинская армия",
"army_ukraine_description": "Счет в Центральном Банке для сбора средств на нужды Вооруженных Сил Украины",
"humanitarian_assistance": "Гуманитарная помощь",
"humanitarian_assistance_description": "Счет в Центральном Банке для гуманитарной помощи",
"airbnb": "Airbnb",
"airbnb_description": "Поможем разместить 100,000 беженцев из Украины",
"prykhystok": "ПPИXИCTOK",
"prykhystok_description": "Помогает нуждающимся найти убежище",
"icanhelp_host": "icanhelp.host",
"icanhelp_host_description": "Помогает спасающися от войны людям найти безопасное место",
"sucho": "SUCHO",
"sucho_description": "Спасение культурного наследия онлайн силами волонтеров",
"helppeopleleave": "Выезд из Украины",
"helppeopleleave_description": "Волонтеры помогают людям выехать из Украины",
"trainline": "Железнодорожные и автобусные билеты",
"trainline_description": "Список бесплатных железнодорожных и автобусных компаний",
"hire_ukrainian": "Поиск работы",
"hire_ukrainian_description": "Связь украинских соискателей и рекрутеров",
"first_aid": "Первая помощь",
"first_aid_description": "Телеграм-бот для получения инструкций по оказанию первой помощи"
}
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const nextConfig = {
reactStrictMode: true,
i18n: {
locales: ["fi", "en"],
locales: ["fi", "en", "ru"],
defaultLocale: "en",
},
};
Expand Down

0 comments on commit beac926

Please sign in to comment.