From 1ed8a37bea8882cd3a1aa0f421dbc15493a781a0 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 31 Jan 2014 17:30:35 +0100 Subject: Traduction into french of some parts of the site. --- .gitignore | 1 + lib/account/new.php | 24 +++++------ lib/blog/drafts.php | 1 - lib/conf/apps.php | 15 ++++--- lib/conf/blog.php | 4 +- lib/conf/file.php | 4 +- lib/conf/login.php | 2 +- lib/conf/static.php | 5 +++ lib/static/home.md | 47 +++++++++++++++++++++ lib/static/view.php | 13 ++++++ tpl/account/login.php | 10 ++--- tpl/blog/drafts.php | 24 ++++++----- tpl/blog/index.php | 17 ++++---- tpl/blog/view.php | 26 ++++++------ tpl/general/static.php | 4 ++ tpl/general/top.php | 16 +++---- tpl/notes/edit.php | 6 +-- tpl/notes/inc_relativestree.php | 93 ++--------------------------------------- tpl/notes/move.php | 4 +- tpl/notes/user.php | 6 +-- tpl/notes/view.php | 8 ++-- 21 files changed, 156 insertions(+), 174 deletions(-) create mode 100644 lib/conf/static.php create mode 100644 lib/static/home.md create mode 100644 lib/static/view.php create mode 100644 tpl/general/static.php diff --git a/.gitignore b/.gitignore index e775888..dc0e92a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ lib/conf/sql.php nohup.out _old files/* +design/cgit* diff --git a/lib/account/new.php b/lib/account/new.php index 2366fbb..63ec85e 100644 --- a/lib/account/new.php +++ b/lib/account/new.php @@ -1,6 +1,6 @@ "Username : ", "name" => "login", "value" => $login), - array("label" => "Password : ", "name" => "pw1", "type" => "password"), - array("label" => "Confirm password : ", "name" => "pw2", "type" => "password"), - array("label" => "Email address : ", "name" => "email", "value" => $email) + array("label" => "Nom d'utilisateur : ", "name" => "login", "value" => $login), + array("label" => "Mot de passe : ", "name" => "pw1", "type" => "password"), + array("label" => "Confirmation : ", "name" => "pw2", "type" => "password"), + array("label" => "Adresse e-mail : ", "name" => "email", "value" => $email) ); -$validate = "Create an account"; +$validate = "Envoyer"; require("tpl/general/form.php"); diff --git a/lib/blog/drafts.php b/lib/blog/drafts.php index 735b039..7016660 100644 --- a/lib/blog/drafts.php +++ b/lib/blog/drafts.php @@ -1,6 +1,5 @@ array( + "view" => 0, + ), // File upload application "file" => array( @@ -38,11 +41,11 @@ $apps = array( "blog" => array( "index" => 0, "view" => 0, - "drafts" => 1, - "publish" => 1, - "post" => 1, - "edit" => 1, - "delete" => 1, + "drafts" => 2, + "publish" => 2, + "post" => 2, + "edit" => 2, + "delete" => 2, "comment" => 1, "edcom" => 1, "delcom" => 2, diff --git a/lib/conf/blog.php b/lib/conf/blog.php index bb2ef09..70c6d13 100644 --- a/lib/conf/blog.php +++ b/lib/conf/blog.php @@ -1,8 +1,8 @@ "Page perso de Alex Auvolat", +); diff --git a/lib/static/home.md b/lib/static/home.md new file mode 100644 index 0000000..ef6f589 --- /dev/null +++ b/lib/static/home.md @@ -0,0 +1,47 @@ +Page destinée à être peuplée (plus ou moins intensément) dans un futur proche. + +### Fiche d'identité + +Patronyme +: Alex AUVOLAT--BERNSTEIN + +Occupation +: Étudiant au Département d'Informatique de l'ENS + +Cursus +: Élève normalien (2013-) +: Prépa MPSI/MP au lycée Masséna (2011-2013) +: Lycée Albert Calmette (2008-2011) +: École Montessori Les Pouces Verts (1997-2008) +: Conservatoire (dans ma jeunesse) + +Contact +: `alex [chez] adnab.me`, `alex.auvolat [chez] ens.fr` + +Intérêts en informatique +: Systèmes d'exploitations originaux +: Langages de programmations originaux +: Idées nouvelles en tous genres + +Intérêts en dehors de l'informatique +: Musique +: Japonais +: Cuisine +: Philosophie, philosophie des sciences, philosophie politique + +Compétences remarquables +: Programmation +: Administration Linux +: Anglais (bilingue) + + +### Le serveur `adnab.me` + +Localisation +: + +Services +: [Dépôts Git](http://adnab.me/cgi-bin/cgit.cgi/) + + + diff --git a/lib/static/view.php b/lib/static/view.php new file mode 100644 index 0000000..e3f8752 --- /dev/null +++ b/lib/static/view.php @@ -0,0 +1,13 @@ + "Username : ", "name" => "login", "value" => (isset($login) ? $login : '')), - array ("label" => "Password : ", "name" => "pw", "type" => "password")); -$validate = "Log in"; + array ("label" => "Nom d'utilisateur : ", "name" => "login", "value" => (isset($login) ? $login : '')), + array ("label" => "Mot de passe : ", "name" => "pw", "type" => "password")); +$validate = "Connexion"; require("tpl/general/form.php"); diff --git a/tpl/blog/drafts.php b/tpl/blog/drafts.php index 510f428..6e18a6c 100644 --- a/tpl/blog/drafts.php +++ b/tpl/blog/drafts.php @@ -1,11 +1,13 @@ '; -echo 'post a message'; +echo 'écrire un article'; -echo '

My drafts

'; +echo '

Mes brouillons

'; if (count($drafts) > 0) { echo ''; @@ -20,27 +22,27 @@ if (count($drafts) > 0) { echo $post['text_html']; echo '';*/ echo ''; - echo ''; + echo ''; } echo '
TitleActions
' . $post['title'] . 'edit'; - echo ' | delete'; - echo ' | publish
modifier'; + echo ' | supprimer'; + echo ' | publier
'; } else { - echo '

No drafts

'; + echo '

Aucun brouillon

'; } -echo '

My published posts

'; +echo '

Mes articles publiés

'; if (count($pub) > 0) { - echo ''; + echo '
TitleActions
'; foreach ($pub as $post) { echo ''; - echo ''; + echo ''; } echo '
TitreActions
' . $post['title'] . 'edit'; - echo ' | delete
modifier'; + echo ' | supprimer
'; } else { - echo '

No published posts

'; + echo '

Aucun article publié

'; } diff --git a/tpl/blog/index.php b/tpl/blog/index.php index cd458c1..712b205 100644 --- a/tpl/blog/index.php +++ b/tpl/blog/index.php @@ -3,8 +3,8 @@ require("tpl/general/top.php"); if ($can_post) { echo '
'; - echo 'post a message'; - echo ' | my drafts'; + echo 'écrire un article'; + echo ' | brouillons'; echo '
'; } @@ -12,12 +12,12 @@ echo ''; foreach ($posts as $post) { echo '
'; - echo '
by ' . $post['owner']; + echo '
écrit par ' . $post['owner']; if ($can_edit && $post['owner_id'] == $user['id']) - echo ' | edit'; + echo ' | modifier'; if ($can_delete && $post['owner_id'] == $user['id']) - echo ' | delete'; - echo ' | read & comment (' . $post['comments'] . ')'; + echo ' | supprimer'; + echo ' | lire & commenter (' . $post['comments'] . ')'; echo '
'; echo '
published ' . $post['date'] . '
'; if ($post['tags'] != '') { @@ -31,7 +31,8 @@ foreach ($posts as $post) { echo '
'; foreach ($fa as $kname => $kdata) { - echo '

Filter by ' . $kname . '

'; + if ($kname == "author") continue; + echo '

Filtrer par ' . $kname . '

'; if (isset($fvalues[$kname])) { echo '

Filtering ' . $kname . ' : ' . $kdata[$fvalues[$kname]]['name'] . '.
'; $n = array(); @@ -61,7 +62,7 @@ if (count($fvalues) > 0) { echo '

  • Atom feed for this selection
  • '; echo '
  • Homepage Atom feed
  • '; } else { - echo '
  • Atom feed
  • '; + echo '
  • Flux Atom
  • '; } echo ''; diff --git a/tpl/blog/view.php b/tpl/blog/view.php index 32f1073..83c49c0 100644 --- a/tpl/blog/view.php +++ b/tpl/blog/view.php @@ -7,15 +7,15 @@ require("tpl/general/top.php"); echo '
    '; echo 'Written by ' . $post['owner']; if ($can_edit && $post['owner_id'] == $user['id']) - echo ' | edit'; + echo ' | modifier'; if ($can_delete && $post['owner_id'] == $user['id']) - echo ' | delete'; + echo ' | supprimer'; if ($can_comment && !$is_draft) - echo ' | post comment'; + echo ' | commenter'; if ($is_draft) - echo ' | publish'; + echo ' | publier'; echo '
    '; -echo '
    published ' . $post['date'] . '
    '; +echo '
    publié le ' . $post['date'] . '
    '; if ($post['tags'] != '') { echo '
    tags: ' . $post['tags'] . '
    '; } @@ -23,31 +23,31 @@ echo $post['text_html']; if (!$is_draft) { - echo '

    Comments

    '; + echo '

    Commentaires

    '; if (count($comments) == 0) { - echo 'No comments at the moment.'; + echo 'Pas de commentaires pour l\'instant.'; } else { foreach ($comments as $comment) { echo '
    '; $a = array(); - if ($can_delcom) $a[] = 'delete'; + if ($can_delcom) $a[] = 'supprimer'; if ($can_comment && $comment['author_id'] == $user['id']) - $a[] = 'edit'; + $a[] = 'modifier'; if (count($a) > 0) echo '
    ' . implode(" | ", $a) . '
    '; - echo '

    ' . $comment['date'] . ' by ' . $comment['author'] . '

    '; + echo '

    ' . $comment['date'] . ' par ' . $comment['author'] . '

    '; echo '
    ' . $comment['text_html'] . '
    '; echo '
    '; } } - echo '

    Post a comment

    '; + echo '

    Écrire un commentaire

    '; if ($can_comment) { - echo '

     
    '; + echo '

     
    '; } else { - echo 'Please log in or register to post a comment.'; + echo 'Veuillez vous identifier pour poster un commentaire.'; } } diff --git a/tpl/general/static.php b/tpl/general/static.php new file mode 100644 index 0000000..0ae27fe --- /dev/null +++ b/tpl/general/static.php @@ -0,0 +1,4 @@ + RegisterLogin'; + echo 'InscriptionConnexion'; } else { - echo 'Logout (' . $user['name'] . ')'; + echo 'Déconnexion (' . $user['name'] . ')'; } ?>
    - Home - People + Accueil + Blog notes'; - echo 'files'; -} else { - if ($user['priv'] >= $apps['file']['upload']) { - echo 'upload file'; - } + echo 'bloc-notes'; + echo 'fichiers'; } ?>
    diff --git a/tpl/notes/edit.php b/tpl/notes/edit.php index 7e4d88f..54f5157 100644 --- a/tpl/notes/edit.php +++ b/tpl/notes/edit.php @@ -2,13 +2,13 @@ require("tpl/general/top.php"); -echo ''; +echo ''; require("tpl/general/inc_form.php"); if (isset($preview)) { - echo '

    Preview

    '; - echo'
    Warning : this is only a preview. Click the "Edit note" button above to save changes.
    '; + echo '

    Aperçu

    '; + echo '
    Attention : ceci n\'est qu\'un aperçu ! Pensez à enregistrer vos changements lorsque vous serez satisfait.
    '; echo $preview; } diff --git a/tpl/notes/inc_relativestree.php b/tpl/notes/inc_relativestree.php index be0e224..fd47ab4 100644 --- a/tpl/notes/inc_relativestree.php +++ b/tpl/notes/inc_relativestree.php @@ -1,92 +1,5 @@
    '; -echo '

    ' . $note['ownername'] . '


    '; -echo ''; - -function list_brothers_and_children() { - global $brothers, $children, $note, $user, $can_new; - echo '
    '; - foreach($brothers as $b) { - if ($b['id'] == $note['id']) { - echo '

    ' . $b['title'] . '

    '; - foreach($children as $nn) { - echo '

    ' . $nn['title'] . '

    '; - } - if ($can_new) { - echo '

    + new note

    '; - } - echo '
    '; - } else { - echo '

    ' . $b['title'] . '

    '; - } - } - if ($can_new) { - echo '

    + new note

    '; - } - echo '
    '; -} - -echo '
    '; -$did_show_up = false; -foreach($user_root_notes as $n) { - if ($n['id'] == $note['id']) { - $did_show_up = true; - echo '

    ' . $n['title'] . '

    '; - foreach($children as $nn) { - echo '

    ' . $nn['title'] . '

    '; - } - if ($can_new) { - echo '

    + new note

    '; - } - echo '
    '; - } else { - echo '

    ' . $n['title'] . '

    '; - if ($n['id'] == $note['parent_id']) { - $did_show_up = true; - list_brothers_and_children(); - } - } -} -if ($can_new) { - echo '

    + new note

    '; -} -echo '
    '; - -if (!$did_show_up) { - echo '

    '; - echo '' . $note['parent_title'] . ''; - list_brothers_and_children(); -} - -*/ - -// *** NEW WAY $notes_tree = array(); $notes_parents = array(); @@ -110,7 +23,7 @@ for($id = $note['id']; $id != 0; $id = $notes_parents[$id]) { echo '
    '; echo '

    ' . $note['ownername'] . '


    '; -echo ''; +echo ''; function n_tree_branch($id) { global $notest, $note, $can_new; @@ -126,11 +39,11 @@ function n_tree_branch($id) { echo '
    '; } else if ($can_new && $branch['id'] == $note['id']) { echo '
    '; - if ($can_new) echo '

    + new note

    '; + if ($can_new) echo '

    + nouvelle note

    '; echo '
    '; } } - if ($can_new) echo '

    + new note

    '; + if ($can_new) echo '

    + nouvelle note

    '; } echo '
    '; diff --git a/tpl/notes/move.php b/tpl/notes/move.php index d94e745..985b89a 100644 --- a/tpl/notes/move.php +++ b/tpl/notes/move.php @@ -4,12 +4,12 @@ require("tpl/general/top.php"); function f($n) { global $note; - return $n['title'] . ' - move here'; + return $n['title'] . ' - déplacer ici'; } require("tpl/general/inc_tree.php"); tree($notes_tree, @f); -echo 'move to root'; +echo 'déplacer à la racine'; $can_new = false; require("tpl/notes/inc_relativestree.php"); diff --git a/tpl/notes/user.php b/tpl/notes/user.php index 4da34e9..06099ac 100644 --- a/tpl/notes/user.php +++ b/tpl/notes/user.php @@ -1,5 +1,5 @@ create new note'; + echo 'nouvelle note'; } echo '
    '; -echo '

    Other users

    '; +echo '

    Autres bloc-notes

    '; echo "
      "; foreach($users as $u) { if ($u['id'] == $userid) { diff --git a/tpl/notes/view.php b/tpl/notes/view.php index c33e836..7615fe3 100644 --- a/tpl/notes/view.php +++ b/tpl/notes/view.php @@ -6,10 +6,10 @@ $t = array(); if ($note['parent_id'] != 0) { $t[] = 'parent : ' . $note['parent_title'] . ''; } -if ($can_edit) $t[] = 'edit'; -$t[] = 'view source'; -if ($can_move) $t[] = 'move'; -if ($can_delete) $t[] = 'delete'; +if ($can_edit) $t[] = 'modifier'; +$t[] = 'code source'; +if ($can_move) $t[] = 'déplacer'; +if ($can_delete) $t[] = 'supprimer'; echo '
      ' . implode(' | ', $t) . '
      '; echo $note['html']; -- cgit v1.2.3