Changeset 8239 for extensions/LCAS


Ignore:
Timestamp:
Dec 22, 2010, 11:02:57 PM (13 years ago)
Author:
Eric
Message:

bug 2079 fixed : Accents sensitivity enabled on registration
Localisation files updates
English translation done

Location:
extensions/LCAS/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/LCAS/trunk/language/en_UK/plugin.lang.php

    r8181 r8239  
    11<?php
    22
    3 // to do: to translate
    4 
    5 global $lang,$conf;
    6 
    7 $conf_LCAS= unserialize($conf['LoginCaseAccentsSensitivity']);
     3global $lang;
    84
    95$lang['LCAS_Tab_Global'] = 'Configuration';
    106$lang['LCAS_Title_Tab'] = 'Login Case Accents Sensitivity';
    11 $lang['LCAS_SubTitle_Global'] = 'Configuration du plugin';
     7$lang['LCAS_SubTitle_Global'] = 'Plugin configuration';
    128
    13 $lang['LCAS_Title_Global'] = 'Paramétrage de la sensibilité';
     9$lang['LCAS_Title_Global'] = 'Setting the sensitivity';
    1410
    1511
    16 $lang['LCAS_Case_Sensitive'] = 'Sensibilité à la casse :';
    17 $lang['LCAS_Case_Sensitive_false'] = ' Activer (valeur par défaut)';
    18 $lang['LCAS_Case_Sensitive_true'] = ' Désactiver';
     12$lang['LCAS_Case_Sensitive'] = 'Case insensitivity :';
     13$lang['LCAS_Case_Sensitive_false'] = ' Enable (default value)';
     14$lang['LCAS_Case_Sensitive_true'] = ' Disable';
    1915
    20 $lang['LCAS_Accent_Sensitive'] = 'Sensibilité aux accents :';
    21 $lang['LCAS_Accent_Sensitive_false'] = ' Activer (valeur par défaut)';
    22 $lang['LCAS_Accent_Sensitive_true'] = ' Désactiver';
     16$lang['LCAS_Accent_Sensitive'] = 'Accents insensivity :';
     17$lang['LCAS_Accent_Sensitive_false'] = ' Enable (default value)';
     18$lang['LCAS_Accent_Sensitive_true'] = ' Disable';
    2319
    24 $lang['LCAS_currentPWGConfigHeader'] = 'Paramètre actuel de Piwigo';
     20$lang['LCAS_currentPWGConfigHeader'] = 'Current Piwigo\'s setting';
    2521
    26 $lang['LCAS_Support_txt'] = 'Le support officiel sur ce plugin se fait exclusivement sur ces fils du forum Piwigo:<br>
    27 <a href="http://fr.piwigo.org/forum/viewtopic.php?pid=158565" onclick="window.open(this.href);return false;">Forum français - http://fr.piwigo.org/forum/viewtopic.php?id=ToDefine</a>
     22$lang['LCAS_Support_txt'] = 'The official support on this plugin is only on these Piwigo\'s forum topics:<br>
     23<a href="http://fr.piwigo.org/forum/viewtopic.php?pid=158565" onclick="window.open(this.href);return false;">French forum - http://fr.piwigo.org/forum/viewtopic.php?id=ToDefine</a>
    2824<br>ou<br>
    29 <a href="http://fr.piwigo.org/forum/viewtopic.php?pid=158565" onclick="window.open(this.href);return false;">Forum anglais - http://piwigo.org/forum/viewtopic.php?id=ToDefine</a><br><br>
    30 Egalement disponible, le bugtracker du projet: <a href="http://piwigo.org/bugs/" onclick="window.open(this.href);return false;">http://piwigo.org/bugs/</a>';
     25<a href="http://fr.piwigo.org/forum/viewtopic.php?pid=158565" onclick="window.open(this.href);return false;">English forum - http://piwigo.org/forum/viewtopic.php?id=ToDefine</a><br><br>
     26Also available, the project\'s bugtracker: <a href="http://piwigo.org/bugs/" onclick="window.open(this.href);return false;">http://piwigo.org/bugs/</a>';
    3127
    3228
    3329
    34 $lang['LCAS_Tab_UserList'] = 'Validation des utilisateurs';
    35 $lang['LCAS_SubTitle_UserList'] = 'Vérification des utilisateurs';
     30$lang['LCAS_Tab_UserList'] = 'Users validation';
     31$lang['LCAS_SubTitle_UserList'] = 'Users check';
    3632
    37 $lang['LCAS_UserList_Title'] = 'Utilisateurs nécessitant des modifications';
     33$lang['LCAS_UserList_Title'] = 'Users requiring changes';
    3834
    3935
    40 $lang['LCAS_Err_Userlist_Settings'] = 'Cette page n\'est accessible que si un paramétrage pour au moins une des sensibilités est activé.';
     36$lang['LCAS_Err_Userlist_Settings'] = 'This page is available only if at least one sensitivity option is enabled.';
    4137
    42 $lang['LCAS_Info_userlist_username_renamed'] = 'Le nom de l\'utilisateur a été mis à jour.';
    43 $lang['LCAS_Err_Userlist_Empty_New_Username'] = 'Le nom de l\'utilisateur ne peut être vide.';
     38$lang['LCAS_Info_userlist_username_renamed'] = 'The user name has been updated.';
     39$lang['LCAS_Err_Userlist_Empty_New_Username'] = 'The user name can\'t be blank.';
    4440
    45 $lang['LCAS_Compare_value_h'] = 'Comparaison';
    46 $lang['LCAS_Update_h'] = 'Modifier';
    47 $lang['LCAS_Notify_h'] = 'Notifier';
     41$lang['LCAS_Compare_value_h'] = 'Comparison';
     42$lang['LCAS_Update_h'] = 'Change';
     43$lang['LCAS_Notify_h'] = 'Notify';
    4844
    49 $lang['LCAS_Update_User'] = 'Mettre &agrave; jour';
    50 $lang['LCAS_Send_Email'] = 'Envoyer email';
     45$lang['LCAS_Update_User'] = 'Update';
     46$lang['LCAS_Send_Email'] = 'Email sent';
    5147
    52 $lang['LCAS_No_User'] = 'Aucun problème détecté pour les utilisateurs actuels';
     48$lang['LCAS_No_User'] = 'No problems found for current users';
    5349
    5450
    55 $lang['LCAS_save_config'] = 'Paramètres enregistrés<br/>Veuillez vérifier les éventuels utilisateurs problématiques sur le second onglet.';
     51$lang['LCAS_save_config'] = 'Settings saved<br/>Please check any duplicate users in the following table.';
    5652
    57 $lang['submit'] = 'Sauvegarder les paramètres';
     53$lang['submit'] = 'Save settings';
    5854
     55$lang['LCAS_accent_error'] = '<br>Usernames are accent insensitive too (e = é = è = ê)!';
    5956?>
  • extensions/LCAS/trunk/language/fr_FR/plugin.lang.php

    r8182 r8239  
    11<?php
    22
    3 global $lang,$conf;
    4 
    5 $conf_LCAS= unserialize($conf['LoginCaseAccentsSensitivity']);
     3global $lang;
    64
    75$lang['LCAS_Tab_Global'] = 'Configuration';
     
    3634
    3735
    38 $lang['LCAS_Err_Userlist_Settings'] = 'Cette page n\'est accessible que si un paramétrage pour au moins une des sensibilités est activé.';
     36$lang['LCAS_Err_Userlist_Settings'] = 'Cette page n\'est accessible que si au moins une option de sensibilité est activée.';
    3937
    4038$lang['LCAS_Info_userlist_username_renamed'] = 'Le nom de l\'utilisateur a été mis à jour.';
     
    5149
    5250
    53 $lang['LCAS_save_config'] = 'Paramètres enregistrés<br/>Veuillez vérifier les éventuels utilisateurs problématiques dans le second paragraphe.';
     51$lang['LCAS_save_config'] = 'Paramètres enregistrés<br/>Veuillez vérifier les éventuels utilisateurs problématiques dans le tableau ci-dessous';
    5452
    5553$lang['submit'] = 'Sauvegarder les paramètres';
    5654
    57 
     55$lang['LCAS_accent_error'] = '<br>Le nom d\'utilisateur est également insensible aux accents (e = é = è = ê)!';
    5856?>
  • extensions/LCAS/trunk/main.inc.php

    r8206 r8239  
    4747}
    4848
     49// Check users identification
    4950add_event_handler('init', 'LCAS_InitPage');
    5051 
     
    6061    if (isset($_POST['username']))
    6162    {
    62       /* User non case sensitive */
     63      /* Username is case insensitive only */
    6364      if (isset($conf_LCAS[0]) and $conf_LCAS[0] == 'true' and isset($conf_LCAS[1]) and $conf_LCAS[1] == 'false')
    6465      {
     
    6768      }
    6869
    69       /* User non accent sensitive */
     70      /* Username is accent insensitive only */
    7071      if (isset($conf_LCAS[0]) and $conf_LCAS[0] == 'false' and isset($conf_LCAS[1]) and $conf_LCAS[1] == 'true')
    7172      {
     
    7475      }
    7576
    76       /* User non accent sensitive */
    77       if (isset($conf_LCAS[1]) and $conf_LCAS[1] == 'true' and isset($conf_LCAS[0]) and $conf_LCAS[0] == 'true')
     77      //* Username is accent and case insensitive */
     78      if (isset($conf_LCAS[0]) and $conf_LCAS[0] == 'true' and isset($conf_LCAS[1]) and $conf_LCAS[1] == 'true')
    7879      {
    7980        $new_username = LCAS_SearchCaseUsername($_POST['username'],3);
     
    8384  }
    8485}
     86
     87// Check users registration
     88add_event_handler('register_user_check', 'LCAS_RegistrationCheck');
     89
     90function LCAS_RegistrationCheck($errors)
     91{
     92  global $conf, $lang;
     93 
     94  $conf_LCAS= unserialize($conf['LoginCaseAccentsSensitivity']);
     95 
     96  load_language('plugin.lang', LCAS_PATH);
     97
     98  /* Username is accent and case insensitive */
     99  if (isset($conf_LCAS[0]) and $conf_LCAS[0] == 'true' and $conf['insensitive_case_logon'] == true and isset($conf_LCAS[1]) and $conf_LCAS[1] == 'true')
     100  {
     101    $NewPostLogin = LCAS_SearchCaseUsername($_POST['login'],3);
     102  }
     103  /* Username is accent insensitive only */
     104  elseif (isset($conf_LCAS[0]) and $conf_LCAS[0] == 'false' and $conf['insensitive_case_logon'] == false and isset($conf_LCAS[1]) and $conf_LCAS[1] == 'true')
     105  {
     106    $NewPostLogin = LCAS_SearchCaseUsername($_POST['login'],2);
     107  }
     108  /* Username is case insensitive only is already controled by Piwigo with $conf['insensitive_case_logon'] == true */
     109
     110  if (isset($NewPostLogin) and get_userid($NewPostLogin))
     111  {
     112    $lang['reg_err_login5'] = $lang['reg_err_login5'].l10n('LCAS_accent_error');
     113    array_push($errors, $lang['reg_err_login5']);
     114  }
     115 
     116  return $errors;
     117}
    85118?>
Note: See TracChangeset for help on using the changeset viewer.