Ignore:
Timestamp:
Mar 2, 2010, 3:54:22 PM (14 years ago)
Author:
nikrou
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/user_list.php

    r4455 r5021  
    169169
    170170$page['order_by_items'] = array(
    171   'id' => l10n('registration_date'),
     171  'id' => l10n('registration date'),
    172172  'username' => l10n('Username'),
    173173  'level' => l10n('Privacy level'),
    174   'language' => l10n('language'),
     174  'Language' => l10n('Language'),
    175175  );
    176176
     
    192192    if(empty($_POST['password']))
    193193    {
    194       array_push($page['errors'], l10n('Password is missing'));
     194      array_push($page['errors'], l10n('Password is missing. Please enter the password.'));
    195195    }
    196196    else if(empty($_POST['password_conf']))
    197197    {
    198       array_push($page['errors'], l10n('Password confirmation is missing'));
     198      array_push($page['errors'], l10n('Password confirmation is missing. Please confirm the chosen password.'));
    199199    }
    200200    else if(empty($_POST['email']))
    201201    {
    202       array_push($page['errors'], l10n('Email address is missing'));
     202      array_push($page['errors'], l10n('Email address is missing. Please specify an email address.'));
    203203    }
    204204    else if ($_POST['password'] != $_POST['password_conf'])
    205205    {
    206       array_push($page['errors'], l10n('Password confirmation error'));
     206      array_push($page['errors'], l10n('Password confirmation error.'));
    207207    }
    208208    else
     
    216216          $page['infos'],
    217217          sprintf(
    218             l10n('user "%s" added'),
     218            l10n('user \"%s\" added'),
    219219            $_POST['login']
    220220          )
     
    236236        $page['infos'],
    237237        sprintf(
    238           l10n('user "%s" added'),
     238          l10n('user \"%s\" added'),
    239239          $_POST['login']
    240240          )
     
    694694  $properties[] =
    695695    (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
    696         ? l10n('is_high_enabled') : l10n('is_high_disabled');
     696        ? l10n('') : l10n('');
    697697
    698698  $template->append(
     
    705705      'USERNAME' => stripslashes($local_user['username'])
    706706        .($local_user['id'] == $conf['guest_id']
    707           ? '<br>['.l10n('is_the_guest').']' : '')
     707          ? '<br>['.l10n('guest').']' : '')
    708708        .($local_user['id'] == $conf['default_user_id']
    709           ? '<br>['.l10n('is_the_default').']' : ''),
     709          ? '<br>['.l10n('default values').']' : ''),
    710710      'STATUS' => l10n('user_status_'.
    711711        $local_user['status']).(($local_user['adviser'] == 'true')
    712         ? '<br>['.l10n('adviser').']' : ''),
     712        ? '<br>['.l10n('Adviser').']' : ''),
    713713      'EMAIL' => get_email_address_as_display_text($local_user['email']),
    714714      'GROUPS' => $groups_string,
Note: See TracChangeset for help on using the changeset viewer.