aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-03-02 14:54:22 +0000
committernikrou <nikrou@piwigo.org>2010-03-02 14:54:22 +0000
commit2e890e9597da29346a1fbe0db45f48e4a2be86e7 (patch)
treef189c8320f38340bc3d7a94d799e05e0587d95cb /include/functions_user.inc.php
parent35694a636ef34dba5384e1a530b837208b9e55f9 (diff)
Feature 1451 : localization with gettext
Use php-gettext (developpement version rev43, because of php5.3) as fallback Use native language (english) instead of key for translation Keep directory en_UK for english customization Need some refactoring for plurals Todo : managing plugins in the same way git-svn-id: http://piwigo.org/svn/trunk@5021 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_user.inc.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index bed0c7962..d48c55f53 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -47,7 +47,7 @@ function validate_mail_address($user_id, $mail_address)
if ( !preg_match( $regex, $mail_address ) )
{
- return l10n('reg_err_mail_address');
+ return l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)');
}
if (defined("PHPWG_INSTALLED") and !empty($mail_address))
@@ -61,7 +61,7 @@ where upper('.$conf['user_fields']['email'].') = upper(\''.$mail_address.'\')
list($count) = pwg_db_fetch_row(pwg_query($query));
if ($count != 0)
{
- return l10n('reg_err_mail_address_dbl');
+ return l10n('a user use already this mail address');
}
}
}
@@ -86,7 +86,7 @@ WHERE LOWER(".stripslashes($conf['user_fields']['username']).") = '".strtolower(
if ($count > 0)
{
- return l10n('reg_err_login5');
+ return l10n('this login is already used');
}
}
}
@@ -98,19 +98,19 @@ function register_user($login, $password, $mail_address,
if ($login == '')
{
- array_push($errors, l10n('reg_err_login1'));
+ array_push($errors, l10n('Please, enter a login'));
}
if (preg_match('/^.* $/', $login))
{
- array_push($errors, l10n('reg_err_login2'));
+ array_push($errors, l10n('login mustn\'t end with a space character'));
}
if (preg_match('/^ .*$/', $login))
{
- array_push($errors, l10n('reg_err_login3'));
+ array_push($errors, l10n('login mustn\'t start with a space character'));
}
if (get_userid($login))
{
- array_push($errors, l10n('reg_err_login5'));
+ array_push($errors, l10n('this login is already used'));
}
$mail_error = validate_mail_address(null, $mail_address);
if ('' != $mail_error)