Update domframework to be gettext package compliant

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1661 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-08-06 13:16:43 +00:00
parent ab7f76d0bb
commit b8a3e1aa23
13 changed files with 223 additions and 111 deletions

View File

@@ -50,17 +50,22 @@ class auth
$res .= "<div class='container'>\n";
$res .= " <form class='form-signin' role='form' method='post' ";
$res .= "action='#'>\n";
$res .= " <h2 class='form-signin-heading'>"._("Please sign in");
$res .= " <h2 class='form-signin-heading'>".dgettext("domframework",
"Please sign in");
$res .= "</h2>\n";
$res .= " <input type='text' class='form-control' name='email' ";
$res .= "placeholder='"._("Email address")."' required autofocus/>\n";
$res .= "placeholder='".dgettext("domframework",
"Email address")."' required autofocus/>\n";
$res .= " <input type='password' class='form-control' name='password' ";
$res .= "placeholder='"._("Password")."' required/>\n";
$res .= "placeholder='".dgettext("domframework",
"Password")."' required/>\n";
$res .= " <label class='checkbox'>";
$res .= "<input type='checkbox' name='remember-me'/>"._("Remember me");
$res .= "<input type='checkbox' name='remember-me'/>".dgettext("domframework",
"Remember me");
$res .= "</label>\n";
$res .= " <button class='btn btn-lg btn-primary btn-block' ";
$res .= "type='submit'>"._("Sign in")."</button>\n";
$res .= "type='submit'>".dgettext("domframework",
"Sign in")."</button>\n";
if ($message !== "")
$res .= "<div class='alert alert-danger'>$message</div>";
$res .= " </form>\n";
@@ -73,7 +78,8 @@ class auth
/** Establish the connection to authentication server */
public function connect ()
{
throw new Exception (_("No connect to authentication available"), 405);
throw new Exception (dgettext("domframework",
"No connect to authentication available"), 405);
}
/** Check if the email and password are correct
@@ -83,13 +89,15 @@ class auth
@param string $password Password to authenticate */
public function authentication ($email, $password)
{
throw new exception (_("No authentication available"), 405);
throw new exception (dgettext("domframework",
"No authentication available"), 405);
}
/** Return all the parameters recorded for the authenticate user */
public function getdetails ()
{
throw new exception (_("No getdetails available"), 405);
throw new exception (dgettext("domframework",
"No getdetails available"), 405);
}
/** Method to change the password
@@ -98,13 +106,15 @@ class auth
@param string $newpassword The new password to be recorded */
public function changepassword ($oldpassword, $newpassword)
{
throw new exception (_("No password change available"), 405);
throw new exception (dgettext("domframework",
"No password change available"), 405);
}
/** List all the users available in the database
Return firstname, lastname, mail, with mail is an array */
public function listusers ()
{
throw new exception (_("No List User available"), 405);
throw new exception (dgettext("domframework",
"No List User available"), 405);
}
}