1
0
Fork 0

Add translations on KeyValueNew page.

This commit is contained in:
Kitteh 2021-04-20 20:38:30 +01:00
parent 93fcb693b5
commit 7d677b6b19
2 changed files with 9 additions and 5 deletions

View file

@ -2,6 +2,7 @@ import { Page } from "../../types/Page.js";
import { createOrUpdateSecret } from "../../api.js"; import { createOrUpdateSecret } from "../../api.js";
import { setPageContent, setTitleElement, setErrorText, changePage } from "../../pageUtils.js"; import { setPageContent, setTitleElement, setErrorText, changePage } from "../../pageUtils.js";
import { makeElement } from "../../htmlUtils.js"; import { makeElement } from "../../htmlUtils.js";
import i18next from 'i18next';
export class KeyValueNewPage extends Page { export class KeyValueNewPage extends Page {
constructor() { constructor() {
@ -25,7 +26,7 @@ export class KeyValueNewPage extends Page {
attributes: { attributes: {
required: true, required: true,
type: "text", type: "text",
placeholder: "Relative Path", placeholder: i18next.t("kv_new_path"),
name: "path" name: "path"
} }
}) })
@ -38,7 +39,7 @@ export class KeyValueNewPage extends Page {
makeElement({ makeElement({
tag: "button", tag: "button",
class: ["uk-button", "uk-button-primary"], class: ["uk-button", "uk-button-primary"],
text: "Create Empty Secret", text: i18next.t("kv_new_create_btn"),
attributes: { attributes: {
type: "submit", type: "submit",
} }
@ -77,10 +78,10 @@ export class KeyValueNewPage extends Page {
} }
get titleSuffix() { get titleSuffix() {
return " (new)"; return i18next.t("kv_new_suffix");
} }
get name() { get name() {
return "K/V New"; return i18next.t("kv_new_title");
} }
} }

View file

@ -45,5 +45,8 @@ module.exports = {
"kv_delete_btn": "Delete", "kv_delete_btn": "Delete",
"kv_delete_suffix": " (delete)", "kv_delete_suffix": " (delete)",
"kv_new_title": "K/V New",
"kv_new_suffix": " (new)",
"kv_new_path": "Relative Path",
"kv_new_create_btn": "Create Empty Secret"
} }