Changeset 1620


Ignore:
Timestamp:
Nov 29, 2006, 5:18:11 AM (17 years ago)
Author:
rvelices
Message:

some language cleanup

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/user_list.php

    r1489 r1620  
    4747
    4848  $users = array();
    49  
     49
    5050  // filter
    5151  $filter = array();
    52  
     52
    5353  if (isset($_GET['username']) and !empty($_GET['username']))
    5454  {
     
    8484    $order_by = $_GET['order_by'];
    8585  }
    86  
     86
    8787  $direction = 'ASC';
    8888  if (isset($_GET['direction'])
     
    141141  }
    142142  $user_nums = array_flip($user_ids);
    143  
     143
    144144  if (count($user_ids) > 0)
    145145  {
     
    158158    }
    159159  }
    160    
     160
    161161  return $users;
    162162}
     
    221221{
    222222  $collection = array();
    223  
     223
    224224  switch ($_POST['target'])
    225225  {
     
    273273        sprintf(
    274274          l10n('%d users deleted'),
    275           count($collection) 
     275          count($collection)
    276276          )
    277277        );
     
    300300  {
    301301    $datas = array();
    302    
     302
    303303    $query = '
    304304SELECT user_id
     
    307307;';
    308308    $associated = array_from_query($query, 'user_id');
    309    
     309
    310310    $associable = array_diff($collection, $associated);
    311    
     311
    312312    if (count($associable) > 0)
    313313    {
     
    318318                         'user_id'=>$item));
    319319      }
    320        
     320
    321321      mass_inserts(USER_GROUP_TABLE,
    322322                   array('group_id', 'user_id'),
     
    324324    }
    325325  }
    326  
     326
    327327  if (-1 != $_POST['dissociate'])
    328328  {
     
    334334    pwg_query($query);
    335335  }
    336  
     336
    337337  // properties to set for the collection (a user list)
    338338  $datas = array();
    339339  $dbfields = array('primary' => array('user_id'), 'update' => array());
    340  
     340
    341341  $formfields =
    342342    array('nb_image_line', 'nb_line_page', 'template', 'language',
    343343          'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
    344344          'maxheight', 'status', 'enabled_high');
    345  
     345
    346346  $true_false_fields = array('expand', 'show_nb_comments', 'enabled_high');
    347347  if ($conf['allow_adviser'])
     
    350350    array_push($true_false_fields, 'adviser');
    351351  }
    352  
     352
    353353  foreach ($formfields as $formfield)
    354354  {
     
    362362      $test = $formfield.'_action';
    363363    }
    364    
     364
    365365    if ($_POST[$test] != 'leave')
    366366    {
     
    368368    }
    369369  }
    370  
     370
    371371  // updating elements is useful only if needed...
    372372  if (count($dbfields['update']) > 0)
    373373  {
    374374    $datas = array();
    375    
     375
    376376    foreach ($collection as $user_id)
    377377    {
    378378      $data = array();
    379379      $data['user_id'] = $user_id;
    380      
     380
    381381      // TODO : verify if submited values are semanticaly correct
    382382      foreach ($dbfields['update'] as $dbfield)
     
    405405      array_push($datas, $data);
    406406    }
    407    
     407
    408408    mass_updates(USER_INFOS_TABLE, $dbfields, $datas);
    409409  }
     
    458458    'L_AUTH_USER'=>$lang['permuser_only_private'],
    459459    'L_GROUP_ADD_USER' => $lang['group_add_user'],
    460     'L_SUBMIT'=>$lang['submit'],
    461460    'L_STATUS'=>$lang['user_status'],
    462     'L_PASSWORD' => $lang['password'],
    463     'L_EMAIL' => $lang['mail_address'],
    464461    'L_ORDER_BY' => $lang['order_by'],
    465462    'L_ACTIONS' => $lang['actions'],
     
    467464    'L_PERMISSIONS' => $lang['permissions'],
    468465    'L_USERS_LIST' => $lang['title_liste_users'],
    469     'L_LANGUAGE' => $lang['language'],
    470466    'L_NB_IMAGE_LINE' => $lang['nb_image_per_row'],
    471467    'L_NB_LINE_PAGE' => $lang['nb_row_per_page'],
     
    476472    'L_MAXWIDTH' => $lang['maxwidth'],
    477473    'L_MAXHEIGHT' => $lang['maxheight'],
    478     'L_YES' => $lang['yes'],
    479     'L_NO' => $lang['no'],
    480     'L_SUBMIT' => $lang['submit'],
    481     'L_RESET' => $lang['reset'],
    482474    'L_DELETE' => $lang['user_delete'],
    483475    'L_DELETE_HINT' => $lang['user_delete_hint'],
    484476
    485477    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=user_list',
    486    
     478
    487479    'F_ADD_ACTION' => $base_url,
    488480    'F_USERNAME' => @$_GET['username'],
     
    635627    $selected = '';
    636628  }
    637  
     629
    638630  $template->assign_block_vars(
    639631    $blockname,
     
    661653    $selected = '';
    662654  }
    663  
     655
    664656  $template->assign_block_vars(
    665657    $blockname,
     
    722714    $selected = '';
    723715  }
    724    
     716
    725717  $template->assign_block_vars(
    726718    $blockname,
     
    753745    $selected = '';
    754746  }
    755    
     747
    756748  $template->assign_block_vars(
    757749    $blockname,
  • trunk/language/en_UK.iso-8859-1/common.lang.php

    r1615 r1620  
    421421$lang['comments_del'] = 'delete this comment';
    422422$lang['comments_title'] = 'Comments from the users of the site';
    423 $lang['confirm_password_hint'] = 'You only have to confirm your new password if you wish to change it.';
    424423$lang['created after %s (%s)'] = 'created after %s (%s)';
    425424$lang['created before %s (%s)'] = 'created before %s (%s)';
     
    428427$lang['customize'] = 'Customize';
    429428$lang['customize_page_title'] = 'Your Gallery Customization ';
    430 $lang['customize_title'] = 'Customization';
    431429$lang['day'][0] = 'Sunday';
    432430$lang['day'][1] = 'Monday';
     
    502500$lang['nbm_unknown_identifier'] = 'Unknown identifier';
    503501$lang['new_password'] = 'New password';
    504 $lang['new_password_hint'] = 'You only have to give a password if you wish to change it.';
    505502$lang['new_rate'] = 'Rate this picture';
    506503$lang['next_page'] = 'Next';
     
    511508$lang['only_members'] = 'Only members can access this page';
    512509$lang['password updated'] = 'password updated';
    513 $lang['password'] = 'Password';
    514 $lang['password_hint'] = 'You only have to give your password if you wish to change your e-mail';
    515510$lang['periods_error'] = 'Recent period must be a positive integer value';
    516511$lang['picture'] = 'picture';
     
    530525$lang['recent_pics_cat_hint'] = 'displays most recent pictures';
    531526$lang['redirect_msg'] = 'Redirection...';
    532 $lang['reg_confirm'] = 'Confirm password';
    533527$lang['reg_err_login1'] = 'Please, enter a login';
    534528$lang['reg_err_login2'] = 'login mustn\'t end with a space character';
  • trunk/language/fr_FR.iso-8859-1/common.lang.php

    r1615 r1620  
    420420$lang['comments_del'] = 'Supprimer ce commentaire';
    421421$lang['comments_title'] = 'Commentaires des utilisateurs';
    422 $lang['confirm_password_hint'] = 'Vous n\'avez à confirmer votre mot de passe que si vous désirez en changer.';
    423422$lang['created after %s (%s)'] = 'créée après le %s (%s)';
    424423$lang['created before %s (%s)'] = 'créée avant le %s (%s)';
     
    427426$lang['customize'] = 'Personnaliser';
    428427$lang['customize_page_title'] = 'Personnalisation de votre affichage ';
    429 $lang['customize_title'] = 'Personnaliser';
    430428$lang['day'][0] = 'Dimanche';
    431429$lang['day'][1] = 'Lundi';
     
    501499$lang['nbm_unknown_identifier'] = 'Identifiants inconnus';
    502500$lang['new_password'] = 'Nouveau mot de passe';
    503 $lang['new_password_hint'] = 'Vous n\'avez à confirmer votre mot de passe que si vous désirez en changer.';
    504501$lang['new_rate'] = 'Votez pour cette image';
    505502$lang['next_page'] = 'Suivant';
     
    510507$lang['only_members'] = 'Seuls les membres enregistrés peuvent accéder à cette page';
    511508$lang['password updated'] = 'mot de passe mis à jour';
    512 $lang['password'] = 'Mot de passe';
    513 $lang['password_hint'] = 'Vous n\'avez à donner votre mot de passe que si vous désirez en changer.';
    514509$lang['periods_error'] = 'La période de nouveauté doit être un entier positif';
    515510$lang['picture'] = 'image';
     
    529524$lang['recent_pics_cat_hint'] = 'afficher les images les plus récentes';
    530525$lang['redirect_msg'] = 'Redirection...';
    531 $lang['reg_confirm'] = 'Confirmer le mot de passe';
    532526$lang['reg_err_login1'] = 'S\'il vous plaît, entrer un nom utilisateur';
    533527$lang['reg_err_login2'] = 'le nom utilisateur ne doit pas se terminer par un espace';
  • trunk/profile.php

    r1614 r1620  
    6464    array_push($errors, $lang['nb_line_page_error']);
    6565  }
    66  
     66
    6767  if ($_POST['maxwidth'] != ''
    6868      and (!preg_match($int_pattern, $_POST['maxwidth'])
     
    8989    array_push($errors, $mail_error);
    9090  }
    91    
     91
    9292  if (!empty($_POST['use_new_pwd']))
    9393  {
     
    9898                 l10n('New password confirmation does not correspond'));
    9999    }
    100    
     100
    101101    // changing password requires old password
    102102    $query = '
     
    106106;';
    107107    list($current_password) = mysql_fetch_row(pwg_query($query));
    108    
     108
    109109    if ($conf['pass_convert']($_POST['password']) != $current_password)
    110110    {
     
    112112    }
    113113  }
    114  
     114
    115115  if (count($errors) == 0)
    116116  {
    117117    // mass_updates function
    118118    include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    119    
     119
    120120    // update common user informations
    121121    $fields = array($conf['user_fields']['email']);
     
    137137                       'update' => $fields),
    138138                 array($data));
    139    
     139
    140140    // update user "additional" informations (specific to PhpWebGallery)
    141141    $fields = array(
     
    143143      'expand', 'show_nb_comments', 'recent_period', 'template'
    144144      );
    145    
     145
    146146    $data = array();
    147147    $data['user_id'] = $_POST['userid'];
    148    
     148
    149149    foreach ($fields as $field)
    150150    {
     
    157157                 array('primary' => array('user_id'), 'update' => $fields),
    158158                 array($data));
    159    
     159
    160160    // redirection
    161161    redirect(make_index_url());
     
    176176
    177177$expand = ($userdata['expand'] == 'true') ? 'EXPAND_TREE_YES':'EXPAND_TREE_NO';
    178  
     178
    179179$nb_comments =
    180180($userdata['show_nb_comments'] == 'true') ? 'NB_COMMENTS_YES':'NB_COMMENTS_NO';
    181  
     181
    182182$template->assign_vars(
    183183  array(
     
    190190    'MAXWIDTH'=>@$userdata['maxwidth'],
    191191    'MAXHEIGHT'=>@$userdata['maxheight'],
    192    
     192
    193193    $expand=>'checked="checked"',
    194194    $nb_comments=>'checked="checked"',
    195    
    196     'L_TITLE' => $lang['customize_title'],
    197     'L_REGISTRATION_INFO' => $lang['register_title'],
    198     'L_PREFERENCES' => $lang['preferences'],
    199     'L_USERNAME' => $lang['Username'],
    200     'L_EMAIL' => $lang['mail_address'],
    201     'L_CURRENT_PASSWORD' => $lang['password'],
    202     'L_CURRENT_PASSWORD_HINT' => $lang['password_hint'],
    203     'L_NEW_PASSWORD' =>  $lang['new_password'],
    204     'L_NEW_PASSWORD_HINT' => $lang['new_password_hint'],
    205     'L_CONFIRM_PASSWORD' =>  $lang['reg_confirm'],
    206     'L_CONFIRM_PASSWORD_HINT' => $lang['confirm_password_hint'],
    207     'L_LANG_SELECT'=>$lang['language'],
    208     'L_NB_IMAGE_LINE'=>$lang['nb_image_per_row'],
    209     'L_NB_ROW_PAGE'=>$lang['nb_row_per_page'],
    210     'L_STYLE_SELECT'=>$lang['theme'],
    211     'L_RECENT_PERIOD'=>$lang['recent_period'],
    212     'L_EXPAND_TREE'=>$lang['auto_expand'],
    213     'L_NB_COMMENTS'=>$lang['show_nb_comments'],
    214     'L_MAXWIDTH'=>$lang['maxwidth'],
    215     'L_MAXHEIGHT'=>$lang['maxheight'],
    216     'L_YES'=>$lang['yes'],
    217     'L_NO'=>$lang['no'],
    218     'L_SUBMIT'=>$lang['submit'],
    219     'L_RESET'=>$lang['reset'],
    220     'L_RETURN' =>  $lang['home'],
    221     'L_RETURN_HINT' =>  $lang['home_hint'],
    222195
    223196    'U_RETURN' => make_index_url(),
    224    
     197
    225198    'F_ACTION'=>$url_action,
    226199    ));
     
    242215    $selected = '';
    243216  }
    244  
     217
    245218  $template->assign_block_vars(
    246219    $blockname,
     
    268241    $selected = '';
    269242  }
    270  
     243
    271244  $template->assign_block_vars(
    272245    $blockname,
  • trunk/template/yoga/admin/user_list.tpl

    r1244 r1620  
    1010    <legend>{lang:Add a user}</legend>
    1111    <label>{lang:Username} <input type="text" name="login" maxlength="50" size="20" /></label>
    12     <label>{L_PASSWORD} <input type="text" name="password" /></label>
    13     <input type="submit" name="submit_add" value="{L_SUBMIT}" {TAG_INPUT_ENABLED} />
     12    <label>{lang:Password} <input type="text" name="password" /></label>
     13    <input type="submit" name="submit_add" value="{lang:submit}" {TAG_INPUT_ENABLED} />
    1414  </fieldset>
    1515</form>
    1616
    17 <form class="filter" method="get" name="filter" action="{F_FILTER_ACTION}"> 
     17<form class="filter" method="get" name="filter" action="{F_FILTER_ACTION}">
    1818<fieldset>
    1919  <legend>{lang:Filter}</legend>
     
    5858  </label>
    5959
    60   <input type="submit" name="submit_filter" value="{L_SUBMIT}" {TAG_INPUT_ENABLED}/>
     60  <input type="submit" name="submit_filter" value="{lang:submit}" {TAG_INPUT_ENABLED}/>
    6161
    6262</fieldset>
     
    7171    <th>{lang:Username}</th>
    7272    <th>{L_STATUS}</th>
    73     <th>{L_EMAIL}</th>
     73    <th>{lang:Email address}</th>
    7474    <th>{lang:Groups}</th>
    7575    <th>{L_PROPERTIES}</th>
     
    123123        <label><input type="radio" name="adviser" value="leave" checked="checked" /> {lang:leave}</label>
    124124        / {lang:set to}
    125         <label><input type="radio" name="adviser" value="true"  {ADVISER_YES} />{L_YES}</label>
    126         <label><input type="radio" name="adviser" value="false" {ADVISER_NO}  />{L_NO}</label>
     125        <label><input type="radio" name="adviser" value="true"  {ADVISER_YES} />{lang:yes}</label>
     126        <label><input type="radio" name="adviser" value="false" {ADVISER_NO}  />{lang:no}</label>
    127127      </td>
    128128    </tr>
     
    175175        <label><input type="radio" name="enabled_high" value="leave" checked="checked" /> {lang:leave}</label>
    176176        / {lang:set to}
    177         <label><input type="radio" name="enabled_high" value="true"  {ENABLED_HIGH_YES} />{L_YES}</label>
    178         <label><input type="radio" name="enabled_high" value="false" {ENABLED_HIGH_NO}  />{L_NO}</label>
     177        <label><input type="radio" name="enabled_high" value="true"  {ENABLED_HIGH_YES} />{lang:yes}</label>
     178        <label><input type="radio" name="enabled_high" value="false" {ENABLED_HIGH_NO}  />{lang:no}</label>
    179179      </td>
    180180    </tr>
     
    224224
    225225  <tr>
    226     <td>{L_LANGUAGE}</td>
     226    <td>{lang:language}</td>
    227227    <td>
    228228      <label><input type="radio" name="language_action" value="leave" checked="checked" /> {lang:leave}</label>
     
    251251      <label><input type="radio" name="expand" value="leave" checked="checked" /> {lang:leave}</label>
    252252      / {lang:set to}
    253       <label><input type="radio" name="expand" value="true"  {EXPAND_YES} />{L_YES}</label>
    254       <label><input type="radio" name="expand" value="false" {EXPAND_NO}  />{L_NO}</label>
     253      <label><input type="radio" name="expand" value="true"  {EXPAND_YES} />{lang:yes}</label>
     254      <label><input type="radio" name="expand" value="false" {EXPAND_NO}  />{lang:no}</label>
    255255    </td>
    256256  </tr>
     
    261261      <label><input type="radio" name="show_nb_comments" value="leave" checked="checked" /> {lang:leave}</label>
    262262      / {lang:set to}
    263       <label><input type="radio" name="show_nb_comments" value="true" {SHOW_NB_COMMENTS_YES} />{L_YES}</label>
    264       <label><input type="radio" name="show_nb_comments" value="false" {SHOW_NB_COMMENTS_NO} />{L_NO}</label>
     263      <label><input type="radio" name="show_nb_comments" value="true" {SHOW_NB_COMMENTS_YES} />{lang:yes}</label>
     264      <label><input type="radio" name="show_nb_comments" value="false" {SHOW_NB_COMMENTS_NO} />{lang:no}</label>
    265265    </td>
    266266  </tr>
     
    301301
    302302<p>
    303   <input type="submit" value="{L_SUBMIT}" name="pref_submit" {TAG_INPUT_ENABLED} />
    304   <input type="reset" value="{L_RESET}" name="pref_reset" />
     303  <input type="submit" value="{lang:submit}" name="pref_submit" {TAG_INPUT_ENABLED} />
     304  <input type="reset" value="{lang:reset}" name="pref_reset" />
    305305</p>
    306306
  • trunk/template/yoga/identification.tpl

    r1615 r1620  
    3737      <li>
    3838        <span class="property">
    39           <label for="password">{lang:password}</label>
     39          <label for="password">{lang:Password}</label>
    4040        </span>
    4141        <input tabindex="2" class="login" type="password" name="password" id="password" size="25" maxlength="25" />
  • trunk/template/yoga/menubar.tpl

    r1615 r1620  
    100100
    101101        <label>
    102           {lang:password}
     102          {lang:Password}
    103103          <input type="password" name="password" size="15">
    104104        </label>
  • trunk/template/yoga/profile.tpl

    r1491 r1620  
    2121
    2222  <fieldset>
    23     <legend>{L_REGISTRATION_INFO}</legend>
     23    <legend>{lang:register_title}</legend>
    2424    <input type="hidden" name="userid" value="{USERID}" />
    2525    <ul>
     
    3636      <li>
    3737        <span class="property">
    38           <label for="password">{L_CURRENT_PASSWORD}</label>
     38          <label for="password">{lang:Password}</label>
    3939        </span>
    4040        <input type="password" name="password" id="password" value="">
     
    4242      <li>
    4343        <span class="property">
    44           <label for="use_new_pwd">{L_NEW_PASSWORD}</label>
     44          <label for="use_new_pwd">{lang:new_password}</label>
    4545        </span>
    4646        <input type="password" name="use_new_pwd" id="use_new_pwd" value="">
     
    4848      <li>
    4949        <span class="property">
    50           <label for="passwordConf">{L_CONFIRM_PASSWORD}</label>
     50          <label for="passwordConf">{lang:Confirm Password}</label>
    5151        </span>
    5252        <input type="password" name="passwordConf" id="passwordConf" value="">
     
    5656
    5757  <fieldset>
    58     <legend>{L_PREFERENCES}</legend>
     58    <legend>{lang:preferences}</legend>
    5959
    6060    <ul>
    6161      <li>
    6262        <span class="property">
    63           <label for="nb_image_line">{L_NB_IMAGE_LINE}</label>
     63          <label for="nb_image_line">{lang:nb_image_per_row}</label>
    6464        </span>
    6565        <input type="text" size="3" maxlength="2" name="nb_image_line" id="nb_image_line" value="{NB_IMAGE_LINE}">
     
    6767      <li>
    6868        <span class="property">
    69           <label for="nb_line_page">{L_NB_ROW_PAGE}</label>
     69          <label for="nb_line_page">{lang:nb_row_per_page}</label>
    7070        </span>
    7171        <input type="text" size="3" maxlength="2" name="nb_line_page" id="nb_line_page" value="{NB_ROW_PAGE}" >
     
    7373      <li>
    7474        <span class="property">
    75           <label for="template">{L_STYLE_SELECT}</label>
     75          <label for="template">{lang:theme}</label>
    7676        </span>
    7777        <select name="template" id="template">
     
    8383      <li>
    8484        <span class="property">
    85           <label for="language">{L_LANG_SELECT}</label>
     85          <label for="language">{lang:language}</label>
    8686        </span>
    8787        <select name="language" id="language">
     
    9393      <li>
    9494        <span class="property">
    95           <label for="recent_period">{L_RECENT_PERIOD}</label>
     95          <label for="recent_period">{lang:recent_period}</label>
    9696        </span>
    9797        <input type="text" size="3" maxlength="2" name="recent_period" id="recent_period" value="{RECENT_PERIOD}">
    9898      </li>
    9999      <li>
    100         <span class="property">{L_EXPAND_TREE}</span>
    101         <label><input type="radio" name="expand" value="true" {EXPAND_TREE_YES}> {L_YES}</label>
    102         <label><input type="radio" name="expand" value="false" {EXPAND_TREE_NO}> {L_NO}</label>
     100        <span class="property">{lang:auto_expand}</span>
     101        <label><input type="radio" name="expand" value="true" {EXPAND_TREE_YES}> {lang:yes}</label>
     102        <label><input type="radio" name="expand" value="false" {EXPAND_TREE_NO}> {lang:no}</label>
    103103      </li>
    104104      <li>
    105         <span class="property">{L_NB_COMMENTS}</span>
    106         <label><input type="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES}> {L_YES}</label>
    107         <label><input type="radio" name="show_nb_comments" value="false" {NB_COMMENTS_NO}> {L_NO}</label>
     105        <span class="property">{lang:show_nb_comments}</span>
     106        <label><input type="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES}> {lang:yes}</label>
     107        <label><input type="radio" name="show_nb_comments" value="false" {NB_COMMENTS_NO}> {lang:no}</label>
    108108      </li>
    109109      <li>
    110110        <span class="property">
    111           <label for="maxwidth">{L_MAXWIDTH}</label>
     111          <label for="maxwidth">{lang:maxwidth}</label>
    112112        </span>
    113113        <input type="text" size="4" maxlength="4" name="maxwidth" id="maxwidth" value="{MAXWIDTH}">
     
    115115      <li>
    116116        <span class="property">
    117           <label for="maxheight">{L_MAXHEIGHT}</label>
     117          <label for="maxheight">{lang:maxheight}</label>
    118118        </span>
    119119        <input type="text" size="4" maxlength="4" name="maxheight" id="maxheight" value="{MAXHEIGHT}">
     
    123123
    124124  <p class="bottomButtons">
    125     <input type="submit" name="validate" value="{L_SUBMIT}">
    126     <input type="reset" name="reset" value="{L_RESET}" class="reset">
     125    <input type="submit" name="validate" value="{lang:submit}">
     126    <input type="reset" name="reset" value="{lang:reset}" class="reset">
    127127  </p>
    128128
Note: See TracChangeset for help on using the changeset viewer.