diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index 03458e9dea..dfdcf70a6e 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -41,13 +41,13 @@ require("guiconfig.inc");
require_once("certs.inc");
$cert_methods = array(
- "existing" => "Import an existing Certificate",
- "internal" => "Create an internal Certificate",
- "external" => "Create a Certificate Signing Request");
+ "existing" => gettext("Import an existing Certificate"),
+ "internal" => gettext("Create an internal Certificate"),
+ "external" => gettext("Create a Certificate Signing Request"));
$cert_keylens = array( "512", "1024", "2048", "4096");
-$pgtitle = array("System", "Certificate Manager");
+$pgtitle = array("System", gettext("Certificate Manager"));
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -151,7 +151,7 @@ if ($_POST) {
$reqdfields = explode(" ",
"name cert key");
$reqdfieldsn = explode(",",
- "Descriptive name,Certificate data,Key data");
+ gettext("Descriptive name,Certificate data,Key data"));
}
if ($pconfig['method'] == "internal") {
@@ -159,13 +159,13 @@ if ($_POST) {
"name caref keylen lifetime dn_country dn_state dn_city ".
"dn_organization dn_email dn_commonname");
$reqdfieldsn = explode(",",
- "Descriptive name,Certificate authority,Key length,Lifetime,".
- "Distinguished name Country Code,".
- "Distinguished name State or Province,".
- "Distinguished name City,".
- "Distinguished name Organization,".
- "Distinguished name Email Address,".
- "Distinguished name Common Name");
+ gettext("Descriptive name,Certificate authority,Key length,Lifetime,").
+ gettext("Distinguished name Country Code,").
+ gettext("Distinguished name State or Province,").
+ gettext("Distinguished name City,").
+ gettext("Distinguished name Organization,").
+ gettext("Distinguished name Email Address,").
+ gettext("Distinguished name Common Name"));
}
if ($pconfig['method'] == "external") {
@@ -173,13 +173,13 @@ if ($_POST) {
"name csr_keylen csr_dn_country csr_dn_state csr_dn_city ".
"csr_dn_organization csr_dn_email csr_dn_commonname");
$reqdfieldsn = explode(",",
- "Descriptive name,Key length,".
- "Distinguished name Country Code,".
- "Distinguished name State or Province,".
- "Distinguished name City,".
- "Distinguished name Organization,".
- "Distinguished name Email Address,".
- "Distinguished name Common Name");
+ gettext("Descriptive name,Key length,").
+ gettext("Distinguished name Country Code,").
+ gettext("Distinguished name State or Province,").
+ gettext("Distinguished name City,").
+ gettext("Distinguished name Organization,").
+ gettext("Distinguished name Email Address,").
+ gettext("Distinguished name Common Name"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -239,13 +239,13 @@ if ($_POST) {
}
}
- if ($_POST['save'] == "Update") {
+ if ($_POST['save'] == gettext("Update")) {
unset($input_errors);
$pconfig = $_POST;
/* input validation */
$reqdfields = explode(" ", "name cert");
- $reqdfieldsn = explode(",", "Descriptive name,Final Certificate data");
+ $reqdfieldsn = explode(",", gettext("Descriptive name,Final Certificate data"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -254,7 +254,7 @@ if ($_POST) {
$subj_cert = cert_get_subject($pconfig['cert'], false);
if (strcmp($subj_csr,$subj_cert))
- $input_errors[] = gettext("The certificate subject '{$subj_cert}' does not match the signing request subject.");
+ $input_errors[] = sprintf(gettext("The certificate subject '%s' does not match the signing request subject."),$subj_cert);
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
@@ -402,23 +402,23 @@ function internalca_change() {
-
Existing Certificate
+
=gettext("Existing Certificate");?>
-
Certificate data
+
=gettext("Certificate data");?>
- Paste a certificate in X.509 PEM format here.
+ =gettext("Paste a certificate in X.509 PEM format here.");?>
-
Private key data
+
=gettext("Private key data");?>
- Paste a private key in X.509 PEM format here.
+ =gettext("Paste a private key in X.509 PEM format here.");?>
@@ -428,16 +428,16 @@ function internalca_change() {
-
Internal Certificate
+
=gettext("Internal Certificate");?>
- No internal Certificate Authorities have been defined. You must
- create
- an internal CA before creating an internal certificate.
+ =gettext("No internal Certificate Authorities have been defined. You must");?>
+ =gettext("create");?>
+ =gettext("an internal CA before creating an internal certificate.");?>