1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 13:30:25 +02:00

[ticket/10345] Use the plural function in some more places.

I added two function avatar_explanation_string() and avatar_error_wrong_size()
for easier handling of the "pixels"-languages, as they are used quite often.

PHPBB3-10345
This commit is contained in:
Joas Schilling
2011-09-20 01:33:33 +02:00
committed by Oleg Pudeyev
parent 88ae40a4b1
commit 179662e949
26 changed files with 169 additions and 101 deletions

View File

@@ -315,32 +315,32 @@ class custom_profile
case 'FIELD_INVALID_DATE':
case 'FIELD_INVALID_VALUE':
case 'FIELD_REQUIRED':
$error = sprintf($user->lang[$cp_result], $row['lang_name']);
$error = $user->lang($cp_result, $row['lang_name']);
break;
case 'FIELD_TOO_SHORT':
case 'FIELD_TOO_SMALL':
$error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_minlen']);
$error = $user->lang($cp_result, (int) $row['field_minlen'], $row['lang_name']);
break;
case 'FIELD_TOO_LONG':
case 'FIELD_TOO_LARGE':
$error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_maxlen']);
$error = $user->lang($cp_result, (int) $row['field_maxlen'], $row['lang_name']);
break;
case 'FIELD_INVALID_CHARS':
switch ($row['field_validation'])
{
case '[0-9]+':
$error = sprintf($user->lang[$cp_result . '_NUMBERS_ONLY'], $row['lang_name']);
$error = $user->lang($cp_result . '_NUMBERS_ONLY', $row['lang_name']);
break;
case '[\w]+':
$error = sprintf($user->lang[$cp_result . '_ALPHA_ONLY'], $row['lang_name']);
$error = $user->lang($cp_result . '_ALPHA_ONLY', $row['lang_name']);
break;
case '[\w_\+\. \-\[\]]+':
$error = sprintf($user->lang[$cp_result . '_SPACERS_ONLY'], $row['lang_name']);
$error = $user->lang($cp_result . '_SPACERS_ONLY', $row['lang_name']);
break;
}
break;