Dotclear

Changeset 3817:9cbb20f63f8b


Ignore:
Timestamp:
08/23/18 09:36:21 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Blogroll plugin:

  • Add french locales for XFN
  • Add link to XFN information (wikipedia, better than nothing)
  • Switch from text field to combo list (with most used listed first) for link language

Should closes #2276, #2277 and #2278

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • locales/en/plugins.po

    r3784 r3817  
    469469msgstr "" 
    470470 
     471msgid "More information on <a href="https://en.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a> website" 
     472msgstr "" 
     473 
    471474msgid "_xfn_Me" 
    472475msgstr "Me" 
  • locales/fr/plugins.po

    r3790 r3817  
    476476msgstr "Informations XFN" 
    477477 
     478msgid "More information on <a href="https://en.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a> website" 
     479msgstr "Plus d'information sur le site <a href="https://fr.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a>" 
     480 
    478481msgid "_xfn_Me" 
    479 msgstr "_xfn_Me" 
     482msgstr "Identité" 
    480483 
    481484msgid "_xfn_Another link for myself" 
    482 msgstr "_xfn_Another link for myself" 
     485msgstr "Une autre de mes adresses Web" 
    483486 
    484487msgid "_xfn_Friendship" 
    485 msgstr "_xfn_Friendship" 
     488msgstr "Amitié" 
    486489 
    487490msgid "_xfn_Contact" 
    488 msgstr "_xfn_Contact" 
     491msgstr "Contact" 
    489492 
    490493msgid "_xfn_Acquaintance" 
    491 msgstr "_xfn_Acquaintance" 
     494msgstr "Connaissance" 
    492495 
    493496msgid "_xfn_Friend" 
    494 msgstr "_xfn_Friend" 
     497msgstr "Ami·e" 
    495498 
    496499msgid "_xfn_Physical" 
    497 msgstr "_xfn_Physical" 
     500msgstr "Physique" 
    498501 
    499502msgid "_xfn_Met" 
    500 msgstr "_xfn_Met" 
     503msgstr "Rencontré·e" 
    501504 
    502505msgid "_xfn_Professional" 
    503 msgstr "_xfn_Professional" 
     506msgstr "Professionnel" 
    504507 
    505508msgid "_xfn_Co-worker" 
    506 msgstr "_xfn_Co-worker" 
     509msgstr "Collègue de travail" 
    507510 
    508511msgid "_xfn_Colleague" 
    509 msgstr "_xfn_Colleague" 
     512msgstr "Consœur ou Confrère" 
    510513 
    511514msgid "_xfn_Geographical" 
    512 msgstr "_xfn_Geographical" 
     515msgstr "Géographique" 
    513516 
    514517msgid "_xfn_Co-resident" 
    515 msgstr "_xfn_Co-resident" 
     518msgstr "Colocataire" 
    516519 
    517520msgid "_xfn_Neighbor" 
    518 msgstr "_xfn_Neighbor" 
     521msgstr "Voisin" 
    519522 
    520523msgid "_xfn_Family" 
    521 msgstr "_xfn_Family" 
     524msgstr "Famille" 
    522525 
    523526msgid "_xfn_Child" 
    524 msgstr "_xfn_Child" 
     527msgstr "Enfant" 
    525528 
    526529msgid "_xfn_Parent" 
    527 msgstr "_xfn_Parent" 
     530msgstr "Parent" 
    528531 
    529532msgid "_xfn_Sibling" 
    530 msgstr "_xfn_Sibling" 
     533msgstr "Sœur/frère" 
    531534 
    532535msgid "_xfn_Spouse" 
    533 msgstr "_xfn_Spouse" 
     536msgstr "Conjoint·e" 
    534537 
    535538msgid "_xfn_Kin" 
    536 msgstr "_xfn_Kin" 
     539msgstr "Famille" 
    537540 
    538541msgid "_xfn_Romantic" 
    539 msgstr "_xfn_Romantic" 
     542msgstr "Romantique" 
    540543 
    541544msgid "_xfn_Muse" 
    542 msgstr "_xfn_Muse" 
     545msgstr "Muse" 
    543546 
    544547msgid "_xfn_Crush" 
    545 msgstr "_xfn_Crush" 
     548msgstr "Coup de foudre" 
    546549 
    547550msgid "_xfn_Date" 
    548 msgstr "_xfn_Date" 
     551msgstr "Petit·e ami·e" 
    549552 
    550553msgid "_xfn_Sweetheart" 
    551 msgstr "_xfn_Sweetheart" 
     554msgstr "Être aimé" 
    552555 
    553556msgid "Nothing to import" 
  • plugins/blogroll/class.dc.blogroll.php

    r3731 r3817  
    4646    } 
    4747 
     48    public function getLangs($params = array()) 
     49    { 
     50        // Use post_lang as an alias of link_lang to be able to use the dcAdminCombos::getLangsCombo() function 
     51        $strReq = 'SELECT COUNT(link_id) as nb_link, link_lang as post_lang ' . 
     52        'FROM ' . $this->table . ' ' . 
     53        "WHERE blog_id = '" . $this->con->escape($this->blog->id) . "' " . 
     54            "AND link_lang <> '' " . 
     55            "AND link_lang IS NOT NULL "; 
     56 
     57        if (isset($params['lang'])) { 
     58            $strReq .= "AND link_lang = '" . $this->con->escape($params['lang']) . "' "; 
     59        } 
     60 
     61        $strReq .= 'GROUP BY link_lang '; 
     62 
     63        $order = 'desc'; 
     64        if (!empty($params['order']) && preg_match('/^(desc|asc)$/i', $params['order'])) { 
     65            $order = $params['order']; 
     66        } 
     67        $strReq .= 'ORDER BY link_lang ' . $order . ' '; 
     68 
     69        return $this->con->select($strReq); 
     70    } 
     71 
    4872    public function getLink($id) 
    4973    { 
  • plugins/blogroll/edit.php

    r3731 r3817  
    8484} 
    8585 
     86# Languages combo 
     87$links      = $blogroll->getLangs(array('order' => 'asc')); 
     88$lang_combo = dcAdminCombos::getLangsCombo($links, true); 
     89 
    8690?> 
    8791<html> 
     
    147151 
    148152    '<p><label for="link_lang">' . __('Language:') . '</label> ' . 
    149     form::field('link_lang', 5, 5, html::escapeHTML($link_lang)) . '</p>' . 
     153    form::combo('link_lang', $lang_combo, $link_lang) . 
     154    '</p>' . 
     155 
    150156    '</div>' . 
    151157 
     
    153159    '<div class="col70 last-col">' . 
    154160    '<h3>' . __('XFN information') . '</h3>' . 
     161    '<p class="clear form-note">' . __('More information on <a href="https://en.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a> website') . '</p>' . 
     162 
    155163    '<div class="table-outer">' . 
    156164    '<table class="noborder">' . 
Note: See TracChangeset for help on using the changeset viewer.

Sites map