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/include/functions_notification_by_mail.inc.php

    r4325 r5021  
    205205    $env_nbm['sent_mail_count'] = 0;
    206206    // Save sendmail message info and error in the original language
    207     $env_nbm['msg_info'] = l10n('nbm_msg_mail_sent_to');
    208     $env_nbm['msg_error'] = l10n('nbm_msg_error_sending_email_to');
     207    $env_nbm['msg_info'] = l10n('Mail sent to %s [%s].');
     208    $env_nbm['msg_error'] = l10n('Error when sending email to %s [%s].');
    209209  }
    210210}
     
    323323  {
    324324    if ($env_nbm['sent_mail_count'] == 0)
    325       array_push($page['infos'], l10n('nbm_no_mail_to_send'));
     325      array_push($page['infos'], l10n('No mail to send.'));
    326326    else
    327327      array_push($page['infos'], l10n_dec('nbm_msg_n_mail_sent', 'nbm_msg_n_mails_sent', $env_nbm['sent_mail_count']));
     
    370370  if ($is_subscribe)
    371371  {
    372     $msg_info = l10n('nbm_user_change_enabled_true');
    373     $msg_error = l10n('nbm_user_not_change_enabled_true');
     372    $msg_info = l10n('User %s [%s] was added to the subscription list.');
     373    $msg_error = l10n('User %s [%s] was not added to the subscription list.');
    374374  }
    375375  else
    376376  {
    377     $msg_info = l10n('nbm_user_change_enabled_false');
    378     $msg_error = l10n('nbm_user_not_change_enabled_false');
     377    $msg_info = l10n('User %s [%s] was removed from the subscription list.');
     378    $msg_error = l10n('User %s [%s] was not removed from the subscription list.');
    379379  }
    380380
     
    386386
    387387    // Prepare message after change language
    388     $msg_break_timeout = l10n('nbm_break_timeout_send_mail');
     388    $msg_break_timeout = l10n('Time to send mail is limited. Others mails are skipped.');
    389389
    390390    // Begin nbm users environment
     
    409409        set_user_on_env_nbm($nbm_user, true);
    410410
    411         $subject = '['.$conf['gallery_title'].']: '.($is_subscribe ? l10n('nbm_object_subscribe'): l10n('nbm_object_unsubscribe'));
     411        $subject = '['.$conf['gallery_title'].']: '.($is_subscribe ? l10n('Unsubscribe from notification by mail'): l10n('Unsubscribe from notification by mail'));
    412412
    413413        // Assign current var for nbm mail
Note: See TracChangeset for help on using the changeset viewer.