Add i18n in auth view.
This commit is contained in:
parent
7180edf2a3
commit
70f26da106
|
@ -47,28 +47,50 @@ export class AuthViewConfigPage extends Page {
|
|||
const authList = objectToMap(await listAuth()) as Map<string, AuthMethod>;
|
||||
const authMethod = authList.get(this.state.baseMount);
|
||||
|
||||
contentElement.appendChild(HeaderAndContent("Type", authMethod.type));
|
||||
contentElement.appendChild(HeaderAndContent("Path", this.state.baseMount));
|
||||
contentElement.appendChild(HeaderAndContent("Description", authMethod.description));
|
||||
contentElement.appendChild(HeaderAndContent("Accessor", authMethod.accessor));
|
||||
contentElement.appendChild(HeaderAndContent("Local", String(authMethod.local).toString()));
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent("Seal Wrap", String(authMethod.seal_wrap).toString()),
|
||||
HeaderAndContent(i18next.t("auth_view_config_type"), authMethod.type),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent(i18next.t("auth_view_config_path"), this.state.baseMount),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent(i18next.t("auth_view_config_description"), authMethod.description),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent(i18next.t("auth_view_config_accessor"), authMethod.accessor),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent(i18next.t("auth_view_config_local"), String(authMethod.local).toString()),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent(
|
||||
"List when unauthenticated?",
|
||||
i18next.t("auth_view_config_seal_wrap"),
|
||||
String(authMethod.seal_wrap).toString(),
|
||||
),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent(
|
||||
i18next.t("auth_view_config_list_when_unauth"),
|
||||
String(authMethod.config.listing_visibility).toString(),
|
||||
),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent("Default Lease TTL", String(authMethod.config.default_lease_ttl).toString()),
|
||||
HeaderAndContent(
|
||||
i18next.t("auth_view_config_default_lease_ttl"),
|
||||
String(authMethod.config.default_lease_ttl).toString(),
|
||||
),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent("Max Lease TTL", String(authMethod.config.max_lease_ttl).toString()),
|
||||
HeaderAndContent(
|
||||
i18next.t("auth_view_config_max_lease_ttl"),
|
||||
String(authMethod.config.max_lease_ttl).toString(),
|
||||
),
|
||||
);
|
||||
contentElement.appendChild(
|
||||
HeaderAndContent("Token Type", authMethod.config.token_type as string),
|
||||
HeaderAndContent(
|
||||
i18next.t("auth_view_config_token_type"),
|
||||
authMethod.config.token_type as string,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
12
src/translations/en.js
vendored
12
src/translations/en.js
vendored
|
@ -223,9 +223,19 @@ module.exports = {
|
|||
auth_home_view_config: "View Config",
|
||||
auth_home_edit_config: "Edit Config",
|
||||
|
||||
// Auth View Conig Page
|
||||
// Auth View Config Page
|
||||
auth_view_config_title: "Auth View Config",
|
||||
auth_view_config_suffix: " (view config)",
|
||||
auth_view_config_type: "Type",
|
||||
auth_view_config_path: "Path",
|
||||
auth_view_config_description: "Description",
|
||||
auth_view_config_accessor: "Accessor",
|
||||
auth_view_config_local: "Local",
|
||||
auth_view_config_seal_wrap: "Seal Wrap",
|
||||
auth_view_config_list_when_unauth: "List when unauthenticated?",
|
||||
auth_view_config_default_lease_ttl: "Default Lease TTL",
|
||||
auth_view_config_max_lease_ttl: "Max Lease TTL",
|
||||
auth_view_config_token_type: "Token Type",
|
||||
|
||||
// userpass Users List
|
||||
userpass_users_list_title: "Users List",
|
||||
|
|
Loading…
Reference in a new issue