1
0
Fork 0

add translation for "Syntax" selector.

This commit is contained in:
ChaotiCryptidz 2022-01-13 18:39:02 +00:00
parent b461169f2c
commit 090c5326f2
3 changed files with 4 additions and 1 deletions

View file

@ -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)",

View file

@ -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: " (редакт.)",

View file

@ -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 })