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