add translation for "Syntax" selector.
This commit is contained in:
parent
b461169f2c
commit
090c5326f2
1
src/translations/en.js
vendored
1
src/translations/en.js
vendored
|
@ -144,6 +144,7 @@ module.exports = {
|
||||||
|
|
||||||
// Key Value Secret Editor Page
|
// Key Value Secret Editor Page
|
||||||
kv_sec_edit_title: "K/V Edit",
|
kv_sec_edit_title: "K/V Edit",
|
||||||
|
kv_sec_edit_syntax: "Syntax",
|
||||||
kv_sec_edit_loading: "Loading Editor..",
|
kv_sec_edit_loading: "Loading Editor..",
|
||||||
kv_sec_edit_invalid_json_err: "Invalid JSON",
|
kv_sec_edit_invalid_json_err: "Invalid JSON",
|
||||||
kv_sec_edit_suffix: " (edit)",
|
kv_sec_edit_suffix: " (edit)",
|
||||||
|
|
1
src/translations/ru.js
vendored
1
src/translations/ru.js
vendored
|
@ -145,6 +145,7 @@ module.exports = {
|
||||||
|
|
||||||
// Key Value Secret Editor Page
|
// Key Value Secret Editor Page
|
||||||
kv_sec_edit_title: "Редактировать ключи/значения",
|
kv_sec_edit_title: "Редактировать ключи/значения",
|
||||||
|
kv_sec_edit_syntax: "Синтаксис",
|
||||||
kv_sec_edit_loading: "Загрузка редактора..",
|
kv_sec_edit_loading: "Загрузка редактора..",
|
||||||
kv_sec_edit_invalid_json_err: "Некорректный JSON",
|
kv_sec_edit_invalid_json_err: "Некорректный JSON",
|
||||||
kv_sec_edit_suffix: " (редакт.)",
|
kv_sec_edit_suffix: " (редакт.)",
|
||||||
|
|
|
@ -41,6 +41,7 @@ export function validateData(str: string, syntax: string = "json"): boolean {
|
||||||
try {
|
try {
|
||||||
parseData(str, syntax);
|
parseData(str, syntax);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -142,7 +143,7 @@ export class KVEditor extends Component<KVEditProps, KVEditState> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<InputWithTitle title="Syntax">
|
<InputWithTitle title={i18next.t("kv_sec_edit_syntax")}>
|
||||||
<select ref={this.syntaxSelectRef} class="uk-select uk-form-width-medium" onChange={() => {
|
<select ref={this.syntaxSelectRef} class="uk-select uk-form-width-medium" onChange={() => {
|
||||||
this.setState({ syntax: this.syntaxSelectRef.current.value })
|
this.setState({ syntax: this.syntaxSelectRef.current.value })
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue