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: added ru_RU lang #970

Merged
merged 2 commits into from Apr 9, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -200,7 +200,7 @@ Markdown 输出的 HTML 所展现的外观。内置 light,dark,wechat 3 套
| minHeight | 编辑区域最小高度 | - |
| width | 编辑器总宽度,支持 % | 'auto' |
| placeholder | 输入区域为空时的提示 | '' |
| lang | 多语言:en_US, ja_JP, ko_KR, zh_CN | 'zh_CN' |
| lang | 多语言:en_US, ja_JP, ko_KR, ru_RU, zh_CN | 'zh_CN' |
| input(value: string) | 输入后触发 | - |
| focus(value: string) | 聚焦后触发 | - |
| blur(value: string) | 失焦后触发 | - |
Expand Down
2 changes: 1 addition & 1 deletion README_en_US.md
Expand Up @@ -177,7 +177,7 @@ Can be filled with element `id` or element itself` HTMLElement`
| minHeight | Editing area minimum height | - |
| width | Total editor width, supports % | 'auto' |
| placeholder | Tips when the input area is empty | '' |
| lang | i18n: en_US, ja_JP, ko_KR, zh_CN | 'zh_CN' |
| lang | i18n: en_US, ja_JP, ko_KR, ru_RU, zh_CN | 'zh_CN' |
| input | Trigger after input (value: string) | - |
| focus | Trigger after focusing (value: string) | - |
| blur | Trigger after out of focus (value: string) | - |
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -67,7 +67,7 @@ class Vditor extends VditorMethod {
const getOptions = new Options(options);
const mergedOptions = getOptions.merge();

if (!["en_US", "ja_JP", "ko_KR", "zh_CN"].includes(mergedOptions.lang)) {
if (!["en_US", "ja_JP", "ko_KR", "ru_RU", "zh_CN"].includes(mergedOptions.lang)) {
throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");
}

Expand Down
79 changes: 79 additions & 0 deletions src/ts/i18n/index.ts
Expand Up @@ -236,6 +236,85 @@ export const i18n: II18n = {
"uploading": "업로드중...",
"wysiwyg": "위지위그",
},
ru_RU: {
"alignCenter": "Выровнять по центру",
"alignLeft": "Выровнять по левому краю",
"alignRight": "Выровнять по правому краю",
"alternateText": "Альтернативный текст",
"bold": "Полужирный текст",
"both": "Редактор с предпросмотром",
"check": "Список задач",
"close": "Закрыть",
"code": "Блок кода",
"code-theme": "Тема отображения блока кода",
"column": "Количество столбцов",
"comment": "Комментарий",
"confirm": "Подтвердить",
"content-theme": "Тема отображения контента",
"copied": "Скопировано",
"copy": "Копировать",
"delete-column": "Удалить столбец",
"delete-row": "Удалить строку",
"devtools": "Граф документа",
"down": "Переместить вниз",
"downloadTip": "Браузер не поддерживает функции загрузки",
"edit": "Редактирование",
"edit-mode": "Переключить режим редактирования",
"emoji": "Смайлы",
"export": "Экспорт",
"fileTypeError": "Ошибка типа файла",
"footnoteRef": "Сноска",
"fullscreen": "Переключиться на полный экран",
"generate": "Генерация",
"headings": "Заголовки",
"help": "Помощь",
"imageURL": "Ссылка на картинку",
"indent": "Отступ",
"info": "Информация о редакторе",
"inline-code": "Встроенный код ",
"insert-after": "Вставить линию после этой строки",
"insert-before": "Вставить линию перед этой строкой",
"insertColumnLeft": "Вставить столбец слева",
"insertColumnRight": "Вставить столбец справа",
"insertRowAbove": "Вставить строку сверху",
"insertRowBelow": "Вставить строку снизу",
"instantRendering": "Мгновенный рендеринг",
"italic": "Курсив",
"language": "Синтаксис",
"line": "Линия",
"link": "Ссылка",
"linkRef": "Вставить ссылку",
"list": "Список",
"more": "Дополнительно",
"nameEmpty": "Имя пустое",
"ordered-list": "Упорядоченный список",
"outdent": "Выступ",
"outline": "Содержание",
"over": "Над",
"performanceTip": "Предварительный просмотр в реальном времени требует ${x}мс, вы можете закрыть его",
"preview": "Предпросмотр",
"quote": "Цитата",
"record": "Начать запись/Завершить запись",
"record-tip": "Устройство не поддерживает запись",
"recording": "Запись...",
"redo": "Вернуть",
"remove": "Удалить",
"row": "Количество строк",
"spin": "Прокрутка",
"splitView": "Разделенный просмотр",
"strike": "Зачеркнутый текст",
"table": "Таблица",
"textIsNotEmpty": "Текст (непустой)",
"title": "Заголовок",
"tooltipText": "Текст всплывающей подсказки",
"undo": "Отменить",
"up": "Переместить вверх",
"update": "Обновить",
"upload": "Загрузить изображение или файл",
"uploadError": "Ошибка загрузки",
"uploading": "Загрузка...",
"wysiwyg": "Редактор WYSIWYG",
},
zh_CN: {
"alignCenter": "居中",
"alignLeft": "居左",
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Expand Up @@ -227,6 +227,7 @@ interface II18n {
en_US: IObject;
ja_JP: IObject;
ko_KR: IObject;
ru_RU: IObject;
zh_CN: IObject;
}

Expand Down