From 090c5326f292550c6857ed2f471632b5da13bc18 Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Thu, 13 Jan 2022 18:39:02 +0000 Subject: [PATCH] add translation for "Syntax" selector. --- src/translations/en.js | 1 + src/translations/ru.js | 1 + src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/translations/en.js b/src/translations/en.js index 770c37d..320b688 100644 --- a/src/translations/en.js +++ b/src/translations/en.js @@ -144,6 +144,7 @@ module.exports = { // Key Value Secret Editor Page kv_sec_edit_title: "K/V Edit", + kv_sec_edit_syntax: "Syntax", kv_sec_edit_loading: "Loading Editor..", kv_sec_edit_invalid_json_err: "Invalid JSON", kv_sec_edit_suffix: " (edit)", diff --git a/src/translations/ru.js b/src/translations/ru.js index 47fb6ec..d598909 100644 --- a/src/translations/ru.js +++ b/src/translations/ru.js @@ -145,6 +145,7 @@ module.exports = { // Key Value Secret Editor Page kv_sec_edit_title: "Редактировать ключи/значения", + kv_sec_edit_syntax: "Синтаксис", kv_sec_edit_loading: "Загрузка редактора..", kv_sec_edit_invalid_json_err: "Некорректный JSON", kv_sec_edit_suffix: " (редакт.)", diff --git a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx index a55290e..6a8bd08 100644 --- a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx +++ b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx @@ -41,6 +41,7 @@ export function validateData(str: string, syntax: string = "json"): boolean { try { parseData(str, syntax); } catch (e) { + console.log(e); return false; } return true; @@ -142,7 +143,7 @@ export class KVEditor extends Component { return (
- +