Skip to content
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
7 changes: 6 additions & 1 deletion frontend/src/locale/IntlProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
import { createIntl, createIntlCache } from "react-intl";
import langEn from "./lang/en.json";
import langRu from "./lang/ru.json";
import langList from "./lang/lang-list.json";

// first item of each array should be the language code,
// not the country code
// Remember when adding to this list, also update check-locales.js script
const localeOptions = [["en", "en-US"]];
const localeOptions = [["en", "en-US"], ["ru", "ru-RU"]];

const loadMessages = (locale?: string): typeof langList & typeof langEn => {
const thisLocale = locale || "en";
switch (thisLocale.slice(0, 2)) {
case "ru":
return Object.assign({}, langList, langRu);
default:
return Object.assign({}, langList, langEn);
}
};

const getFlagCodeForLocale = (locale?: string) => {
switch (locale) {
case "ru":
return "RU";
default:
return "EN";
}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locale/lang/lang-list.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"locale-en-US": "English"
"locale-en-US": "English",
"locale-ru-RU": "Русский"
}
215 changes: 215 additions & 0 deletions frontend/src/locale/lang/ru.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
{
"access-list": "Список доступа",
"access-list.access-count": "{count} {count, plural, one {правило} few {правила} many {правил} other {правила}}",
"access-list.auth-count": "{count} {count, plural, one {пользователь} few {пользователя} many {пользователей} other {пользователя}}",
"access-list.help-rules-last": "When at least 1 rule exists, this deny all rule will be added last",
"access-list.help.rules-order": "Note that the allow and deny directives will be applied in the order they are defined.",
"access-list.pass-auth": "Pass Auth to Upstream",
"access-list.public": "Публично доступен",
"access-list.public.subtitle": "Без аутентификации",
"access-list.satisfy-any": "Любое совпадение",
"access-list.subtitle": "{users} {users, plural, one {User} other {Users}}, {rules} {rules, plural, one {Rule} other {Rules}} - Created: {date}",
"access-lists": "Списки доступа",
"action.add": "Добавить",
"action.add-location": "Добавить маршрут",
"action.close": "Закрыть",
"action.delete": "Удалить",
"action.disable": "Выключить",
"action.download": "Скачать",
"action.edit": "Изменить",
"action.enable": "Включить",
"action.permissions": "Разрешения",
"action.renew": "Продлить",
"action.view-details": "Просмотреть детали",
"auditlogs": "Журнал аудита",
"cancel": "Отменить",
"certificate": "Сертификат",
"certificate.custom-certificate": "Сертификат",
"certificate.custom-certificate-key": "Ключ сертификата",
"certificate.custom-intermediate": "Промежуточный сертификат",
"certificate.in-use": "Используется",
"certificate.none.subtitle": "Сертификат не назначен",
"certificate.none.subtitle.for-http": "Этот хост не будет использовать HTTPS",
"certificate.none.title": "Нет",
"certificate.not-in-use": "Не используется",
"certificate.renew": "Продлить сертификат",
"certificates": "Сертификаты",
"certificates.custom": "Свой сертификат",
"certificates.custom.warning": "Файлы ключей, защищённые паролем, не поддерживаются.",
"certificates.dns.credentials": "Credentials File Content",
"certificates.dns.credentials-note": "This plugin requires a configuration file containing an API token or other credentials for your provider",
"certificates.dns.credentials-warning": "This data will be stored as plaintext in the database and in a file!",
"certificates.dns.propagation-seconds": "Propagation Seconds",
"certificates.dns.propagation-seconds-note": "Leave empty to use the plugins default value. Number of seconds to wait for DNS propagation.",
"certificates.dns.provider": "DNS-провайдер",
"certificates.dns.warning": "This section requires some knowledge about Certbot and its DNS plugins. Please consult the respective plugins documentation.",
"certificates.http.reachability-404": "There is a server found at this domain but it does not seem to be Nginx Proxy Manager. Please make sure your domain points to the IP where your NPM instance is running.",
"certificates.http.reachability-failed-to-check": "Failed to check the reachability due to a communication error with site24x7.com.",
"certificates.http.reachability-not-resolved": "There is no server available at this domain. Please make sure your domain exists and points to the IP where your NPM instance is running and if necessary port 80 is forwarded in your router.",
"certificates.http.reachability-ok": "Your server is reachable and creating certificates should be possible.",
"certificates.http.reachability-other": "There is a server found at this domain but it returned an unexpected status code {code}. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.",
"certificates.http.reachability-wrong-data": "There is a server found at this domain but it returned an unexpected data. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.",
"certificates.http.test-results": "Результаты проверки",
"certificates.http.warning": "These domains must be already configured to point to this installation.",
"certificates.request.subtitle": "через Let's Encrypt",
"certificates.request.title": "Получить новый сертификат",
"column.access": "Доступ",
"column.authorization": "Авторизация",
"column.authorizations": "Авторизации",
"column.custom-locations": "Свои маршруты",
"column.destination": "Назначение",
"column.details": "Детали",
"column.email": "Email",
"column.event": "Событие",
"column.expires": "Истекает",
"column.http-code": "Access",
"column.incoming-port": "Входящий порт",
"column.name": "Имя",
"column.protocol": "Протокол",
"column.provider": "Провайдер",
"column.roles": "Роли",
"column.rules": "Правила",
"column.satisfy": "Совпадение",
"column.satisfy-all": "Все",
"column.satisfy-any": "Любое",
"column.scheme": "Схема",
"column.source": "Источник",
"column.ssl": "SSL",
"column.status": "Статус",
"created-on": "Создан: {date}",
"dashboard": "Обзор",
"dead-host": "404-хост",
"dead-hosts": "404-хосты",
"dead-hosts.count": "{count} {count, plural, one {404-хост} few {404-хоста} many {404-хостов} other {404-хоста}}",
"disabled": "Выключен",
"domain-names": "Домены",
"domain-names.max": "Максимум доменов: {count}",
"domain-names.placeholder": "Начните ввод, чтобы добавить домен...",
"domain-names.wildcards-not-permitted": "Wildcard'ы не разрешены для этого типа",
"domain-names.wildcards-not-supported": "Wildcard'ы не поддерживаются этим CA",
"domains.force-ssl": "Всегда SSL",
"domains.hsts-enabled": "Поддержка HSTS",
"domains.hsts-subdomains": "Поддомены HSTS",
"domains.http2-support": "Поддержка HTTP/2",
"domains.use-dns": "Использовать DNS Challenge",
"email-address": "Email-адрес",
"empty-search": "Ничего не найдено",
"empty-subtitle": "Почему бы не создать его?",
"enabled": "Включен",
"error.access.at-least-one": "Either one Authorization or one Access Rule is required",
"error.access.duplicate-usernames": "Authorization Usernames must be unique",
"error.invalid-auth": "Неверный email или пароль",
"error.invalid-domain": "Неверный домен: {domain}",
"error.invalid-email": "Неверный email-адрес",
"error.max-character-length": "Maximum length is {max} character{max, plural, one {} other {s}}",
"error.max-domains": "Слишком много доменов, максимум {max}",
"error.maximum": "Максимум {max}",
"error.min-character-length": "Minimum length is {min} character{min, plural, one {} other {s}}",
"error.minimum": "Минимум {min}",
"error.passwords-must-match": "Пароли должны совпадать",
"error.required": "Обязательное поле",
"expires.on": "Истекает: {date}",
"footer.github-fork": "Fork me on Github",
"host.flags.block-exploits": "Блокировать известные эксплойты",
"host.flags.cache-assets": "Кэшировать ресурсы",
"host.flags.preserve-path": "Сохранять путь",
"host.flags.protocols": "Протоколы",
"host.flags.websockets-upgrade": "Поддержка WebSocket",
"host.forward-port": "Порт перенаправления",
"host.forward-scheme": "Схема",
"hosts": "Хосты",
"http-only": "Только HTTP",
"lets-encrypt": "Let's Encrypt",
"lets-encrypt-via-dns": "Let's Encrypt через DNS",
"lets-encrypt-via-http": "Let's Encrypt через HTTP",
"loading": "Загрузка…",
"login.title": "Авторизация",
"nginx-config.label": "Своя Nginx-конфигурация",
"nginx-config.placeholder": "# Введите здесь свою Nginx-конфигурацию, будьте осторожны!",
"no-permission-error": "You do not have access to view this.",
"notfound.action": "Вернуться на главную",
"notfound.content": "Извините, но страница, которую вы ищете, не найдена",
"notfound.title": "Упс… Вы попали на страницу ошибки",
"notification.error": "Ошибка",
"notification.object-deleted": "{object} удален",
"notification.object-disabled": "{object} выключен",
"notification.object-enabled": "{object} включен",
"notification.object-renewed": "{object} продлен",
"notification.object-saved": "{object} сохранен",
"notification.success": "Успешно",
"object.actions-title": "{object} #{id}",
"object.add": "Добавить {object}",
"object.delete": "Удалить {object}",
"object.delete.content": "Вы уверены, что хотите удалить {object}?",
"object.edit": "Изменить {object}",
"object.empty": "{objects} отстутствуют",
"object.event.created": "{object} создан",
"object.event.deleted": "{object} удален",
"object.event.disabled": "{object} выключен",
"object.event.enabled": "{object} включен",
"object.event.renewed": "{object} продлен",
"object.event.updated": "{object} обновлен",
"offline": "Офлайн",
"online": "Онлайн",
"options": "Параметры",
"password": "Пароль",
"password.generate": "Сгенерировать случайный пароль",
"password.hide": "Скрыть пароль",
"password.show": "Показать пароль",
"permissions.hidden": "Скрыто",
"permissions.manage": "Управление",
"permissions.view": "Только просмотр",
"permissions.visibility.all": "Все элементы",
"permissions.visibility.title": "Видимость элементов",
"permissions.visibility.user": "Созданные элементы",
"proxy-host": "Прокси-хост",
"proxy-host.forward-host": "Хост / IP перенаправления",
"proxy-hosts": "Прокси-хосты",
"proxy-hosts.count": "{count} {count, plural, one {прокси-хост} few {прокси-хоста} many {прокси-хостов} other {прокси-хоста}}",
"public": "Публичный",
"redirection-host": "Редирект-хост",
"redirection-host.forward-domain": "Домен перенаправления",
"redirection-hosts": "Редирект-хосты",
"redirection-hosts.count": "{count} {count, plural, one {редирект-хост} few {редирект-хоста} many {редирект-хостов} other {редирект-хоста}}",
"role.admin": "Администратор",
"role.standard-user": "Обычный пользователь",
"save": "Сохранить",
"setting": "Настройка",
"settings": "Настройки",
"settings.default-site": "Страница по умолчанию",
"settings.default-site.404": "404-страница",
"settings.default-site.444": "Нет ответа (444)",
"settings.default-site.congratulations": "Страница поздравления",
"settings.default-site.description": "Что показывать, когда Nginx получает неизвестный хост",
"settings.default-site.html": "Свой HTML",
"settings.default-site.html.placeholder": "<!-- Введите здесь свой HTML-контент -->",
"settings.default-site.redirect": "Перенаправление",
"setup.preamble": "Начните с создания учётной записи администратора.",
"setup.title": "Добро пожаловать!",
"sign-in": "Войти",
"ssl-certificate": "SSL-сертификат",
"stream": "Поток",
"stream.forward-host": "Хост перенаправления",
"stream.incoming-port": "Входящий порт",
"streams": "Потоки",
"streams.count": "{count} {count, plural, one {поток} few {потока} many {потоков} other {потока}}",
"streams.tcp": "TCP",
"streams.udp": "UDP",
"test": "Проверить",
"user": "Пользователь",
"user.change-password": "Изменить пароль",
"user.confirm-password": "Повторите пароль",
"user.current-password": "Текущий пароль",
"user.edit-profile": "Изменить профиль",
"user.full-name": "Полное имя",
"user.login-as": "Войти как {name}",
"user.logout": "Выйти",
"user.new-password": "Новый пароль",
"user.nickname": "Псевдоним",
"user.set-password": "Задать пароль",
"user.set-permissions": "Set Permissions for {name}",
"user.switch-dark": "Включить тёмную тему",
"user.switch-light": "Включить светлую тему",
"username": "Логин",
"users": "Пользователи"
}