summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorroot <root@adnab.me>2014-01-31 17:30:35 +0100
committerroot <root@adnab.me>2014-01-31 17:30:35 +0100
commit1ed8a37bea8882cd3a1aa0f421dbc15493a781a0 (patch)
treed014616096b7f8b94b707626cae46cff0e0608ce /tpl
parentb0c23ea84327d48e3a4383fac3e795c2dc0a1215 (diff)
downloadBits-1ed8a37bea8882cd3a1aa0f421dbc15493a781a0.tar.gz
Bits-1ed8a37bea8882cd3a1aa0f421dbc15493a781a0.zip
Traduction into french of some parts of the site.
Diffstat (limited to 'tpl')
-rw-r--r--tpl/account/login.php10
-rw-r--r--tpl/blog/drafts.php24
-rw-r--r--tpl/blog/index.php17
-rw-r--r--tpl/blog/view.php26
-rw-r--r--tpl/general/static.php4
-rw-r--r--tpl/general/top.php16
-rw-r--r--tpl/notes/edit.php6
-rw-r--r--tpl/notes/inc_relativestree.php93
-rw-r--r--tpl/notes/move.php4
-rw-r--r--tpl/notes/user.php6
-rw-r--r--tpl/notes/view.php8
11 files changed, 65 insertions, 149 deletions
diff --git a/tpl/account/login.php b/tpl/account/login.php
index 7853186..d76f315 100644
--- a/tpl/account/login.php
+++ b/tpl/account/login.php
@@ -1,10 +1,10 @@
<?php
-$title = "Login";
+$title = "Connextion";
-$form_message = "Please log in with your account :";
+$form_message = "Connectez-vous avec votre compte :";
$fields = array(
- array ("label" => "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 @@
<?php
+$title = "Mes articles";
+
require("tpl/general/top.php");
echo '<div class="small_right">';
-echo '<a href="post-blog">post a message</a></div>';
+echo '<a href="post-blog">écrire un article</a></div>';
-echo '<h2>My drafts</h2>';
+echo '<h2>Mes brouillons</h2>';
if (count($drafts) > 0) {
echo '<table><tr><th>Title</th><th>Actions</th></tr>';
@@ -20,27 +22,27 @@ if (count($drafts) > 0) {
echo $post['text_html'];
echo '</div>';*/
echo '<tr><td><a href="view-blog-' . $post['id'] . '">' . $post['title'] . '</a></td>';
- echo '<td><a href="edit-blog-' . $post['id'] . '">edit</a>';
- echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a>';
- echo ' | <a href="publish-blog-' . $post['id'] . '">publish</a></td></tr>';
+ echo '<td><a href="edit-blog-' . $post['id'] . '">modifier</a>';
+ echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a>';
+ echo ' | <a href="publish-blog-' . $post['id'] . '">publier</a></td></tr>';
}
echo '</table>';
} else {
- echo '<p>No drafts</p>';
+ echo '<p>Aucun brouillon</p>';
}
-echo '<h2>My published posts</h2>';
+echo '<h2>Mes articles publiés</h2>';
if (count($pub) > 0) {
- echo '<table><tr><th>Title</th><th>Actions</th></tr>';
+ echo '<table><tr><th>Titre</th><th>Actions</th></tr>';
foreach ($pub as $post) {
echo '<tr><td><a href="view-blog-' . $post['id'] . '">' . $post['title'] . '</a></td>';
- echo '<td><a href="edit-blog-' . $post['id'] . '">edit</a>';
- echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a></td></tr>';
+ echo '<td><a href="edit-blog-' . $post['id'] . '">modifier</a>';
+ echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a></td></tr>';
}
echo '</table>';
} else {
- echo '<p>No published posts</p>';
+ echo '<p>Aucun article publié</p>';
}
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 '<div class="small_right">';
- echo '<a href="post-blog">post a message</a>';
- echo ' | <a href="drafts-blog">my drafts</a>';
+ echo '<a href="post-blog">écrire un article</a>';
+ echo ' | <a href="drafts-blog">brouillons</a>';
echo '</div>';
}
@@ -12,12 +12,12 @@ echo '<div class="ordering_links">' . filters_html_full() . '</div>';
foreach ($posts as $post) {
echo '<div class="blog_post">';
- echo '<div class="small_right">by ' . $post['owner'];
+ echo '<div class="small_right">écrit par ' . $post['owner'];
if ($can_edit && $post['owner_id'] == $user['id'])
- echo ' | <a href="edit-blog-' . $post['id'] . '">edit</a>';
+ echo ' | <a href="edit-blog-' . $post['id'] . '">modifier</a>';
if ($can_delete && $post['owner_id'] == $user['id'])
- echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a>';
- echo ' | <a href="view-blog-' . $post['id'] . '">read & comment (' . $post['comments'] . ')</a>';
+ echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a>';
+ echo ' | <a href="view-blog-' . $post['id'] . '">lire & commenter (' . $post['comments'] . ')</a>';
echo '</div>';
echo '<div class="small_right">published ' . $post['date'] . '</div>';
if ($post['tags'] != '') {
@@ -31,7 +31,8 @@ foreach ($posts as $post) {
echo '</div><div class="contents-left">';
foreach ($fa as $kname => $kdata) {
- echo '<h1>Filter by ' . $kname . '</h1>';
+ if ($kname == "author") continue;
+ echo '<h1>Filtrer par ' . $kname . '</h1>';
if (isset($fvalues[$kname])) {
echo '<p>Filtering ' . $kname . ' : ' . $kdata[$fvalues[$kname]]['name'] . '.<br />';
$n = array();
@@ -61,7 +62,7 @@ if (count($fvalues) > 0) {
echo '<li><a href="index.php?p=index-blog-' . $zd . '">Atom feed for this selection</a></li>';
echo '<li><a href="index.php?p=index-blog-feed-atom">Homepage Atom feed</a></li>';
} else {
- echo '<li><a href="index.php?p=index-blog-feed-atom">Atom feed</a></li>';
+ echo '<li><a href="index.php?p=index-blog-feed-atom">Flux Atom</a></li>';
}
echo '</ul>';
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 '<div class="small_right">';
echo 'Written by ' . $post['owner'];
if ($can_edit && $post['owner_id'] == $user['id'])
- echo ' | <a href="edit-blog-' . $post['id'] . '">edit</a>';
+ echo ' | <a href="edit-blog-' . $post['id'] . '">modifier</a>';
if ($can_delete && $post['owner_id'] == $user['id'])
- echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a>';
+ echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a>';
if ($can_comment && !$is_draft)
- echo ' | <a href="comment-blog-' . $post['id'] . '">post comment</a>';
+ echo ' | <a href="comment-blog-' . $post['id'] . '">commenter</a>';
if ($is_draft)
- echo ' | <a href="publish-blog-' . $post['id'] . '">publish</a>';
+ echo ' | <a href="publish-blog-' . $post['id'] . '">publier</a>';
echo '</div>';
-echo '<div class="small_right">published ' . $post['date'] . '</div>';
+echo '<div class="small_right">publié le ' . $post['date'] . '</div>';
if ($post['tags'] != '') {
echo '<div class="small_right">tags: ' . $post['tags'] . '</div>';
}
@@ -23,31 +23,31 @@ echo $post['text_html'];
if (!$is_draft) {
- echo '<h2>Comments</h2>';
+ echo '<h2>Commentaires</h2>';
if (count($comments) == 0) {
- echo 'No comments at the moment.';
+ echo 'Pas de commentaires pour l\'instant.';
} else {
foreach ($comments as $comment) {
echo '<div class="blog_post">';
$a = array();
- if ($can_delcom) $a[] = '<a href="delcom-blog-' . $comment['id'] . '">delete</a>';
+ if ($can_delcom) $a[] = '<a href="delcom-blog-' . $comment['id'] . '">supprimer</a>';
if ($can_comment && $comment['author_id'] == $user['id'])
- $a[] = '<a href="edcom-blog-' . $comment['id'] . '">edit</a>';
+ $a[] = '<a href="edcom-blog-' . $comment['id'] . '">modifier</a>';
if (count($a) > 0)
echo '<div class="small_right">' . implode(" | ", $a) . '</div>';
- echo '<h3>' . $comment['date'] . ' by ' . $comment['author'] . '</h3>';
+ echo '<h3>' . $comment['date'] . ' par ' . $comment['author'] . '</h3>';
echo '<div class="inside">' . $comment['text_html'] . '</div>';
echo '</div>';
}
}
- echo '<h3>Post a comment</h3>';
+ echo '<h3>Écrire un commentaire</h3>';
if ($can_comment) {
- echo '<form class="blog_post" method="POST" action="index.php?p=comment-blog-' . $post['id'] . '"><textarea name="comment" style="height: 200px"></textarea><br /><div class="empty_label">&nbsp;</div><input type="submit" value="Comment" /></form>';
+ echo '<form class="blog_post" method="POST" action="index.php?p=comment-blog-' . $post['id'] . '"><textarea name="comment" style="height: 200px"></textarea><br /><div class="empty_label">&nbsp;</div><input type="submit" value="Enregistrer" /></form>';
} 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 @@
+<?php
+require("top.php");
+echo $text;
+require("bottom.php");
diff --git a/tpl/general/top.php b/tpl/general/top.php
index 01f7e59..f060b42 100644
--- a/tpl/general/top.php
+++ b/tpl/general/top.php
@@ -23,23 +23,19 @@ global $user, $apps; //These might be hidden because this page is called from sq
<div class="right">
<?php
if ($user['id'] == 0) {
- echo '<a href="new-account">Register</a><a href="?login">Login</a>';
+ echo '<a href="new-account">Inscription</a><a href="/?login">Connexion</a>';
} else {
- echo '<a href="?logout">Logout (' . $user['name'] . ')</a>';
+ echo '<a href="/?logout">Déconnexion (' . $user['name'] . ')</a>';
}
?>
</div>
<div class="left">
- <a href="blog">Home</a>
- <a href="list-account">People</a>
+ <a href="/">Accueil</a>
+ <a href="/blog">Blog</a>
<?php
if ($user['id'] != 0) {
- echo '<a href="user-notes-' . $user['id'] . '">notes</a>';
- echo '<a href="file">files</a>';
-} else {
- if ($user['priv'] >= $apps['file']['upload']) {
- echo '<a href="upload-file">upload file</a>';
- }
+ echo '<a href="user-notes-' . $user['id'] . '">bloc-notes</a>';
+ echo '<a href="file">fichiers</a>';
}
?>
</div>
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 '<div class="small_right"><a href="view-notes-' . $note['id'] . '">return to note</a></div>';
+echo '<div class="small_right"><a href="view-notes-' . $note['id'] . '">revenir à la note</a></div>';
require("tpl/general/inc_form.php");
if (isset($preview)) {
- echo '<hr /><h1>Preview</h1>';
- echo' <div class="error">Warning : this is only a preview. Click the "Edit note" button above to save changes.</div>';
+ echo '<hr /><h1>Aperçu</h1>';
+ echo '<div class="error">Attention : ceci n\'est qu\'un aperçu ! Pensez à enregistrer vos changements lorsque vous serez satisfait.</div>';
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 @@
<?php
-/* OLD WAY
-
-// ******* FETCH DATA
-
-if ($note['parent_id'] != 0) {
- $brothers = array();
- $n = sql("SELECT id, title, owner FROM notes WHERE parent = " . $note['parent_id'] . " ".
- ($note['owner'] == $user['id'] ? "" : " AND public != 0 ").
- "ORDER BY title ASC");
- while ($nn = mysql_fetch_assoc($n)) $brothers[] = $nn;
-}
-$children = array();
-$n = sql("SELECT id, title, owner FROM notes WHERE parent = " . $note['id'] . " " .
- ($note['owner'] == $user['id'] ? "" : " AND public != 0 ") .
- "ORDER BY title ASC");
-while ($nn = mysql_fetch_assoc($n)) $children[] = $nn;
-
-$user_root_notes = array();
-$n = sql("SELECT id, title, owner FROM notes WHERE parent = 0 AND owner = " . $note['owner'] . " " .
- ($note['owner'] == $user['id'] ? "" : " AND public != 0 ") .
- "ORDER BY title ASC");
-while ($nn = mysql_fetch_assoc($n)) $user_root_notes[] = $nn;
-
-// ****** DISPLAY TREE
-
-echo '</div><div class="contents-left">';
-echo '<h1>' . $note['ownername'] . '</h1><br />';
-echo '<div class="small_right"><a href="user-notes-' . $note['owner'] . '">complete tree</a></div>';
-
-function list_brothers_and_children() {
- global $brothers, $children, $note, $user, $can_new;
- echo '<div class="tree_branch">';
- foreach($brothers as $b) {
- if ($b['id'] == $note['id']) {
- echo '<p>' . $b['title'] . '</p><div class="tree_branch">';
- foreach($children as $nn) {
- echo '<p><a href="view-notes-' . $nn['id'] . '">' . $nn['title'] . '</a></p>';
- }
- if ($can_new) {
- echo '<p><a class="tool_link" href="new-notes-' . $b['id'] . '">+ new note</a></p>';
- }
- echo '</div>';
- } else {
- echo '<p><a href="view-notes-' . $b['id'] .'">' . $b['title'] . '</a></p>';
- }
- }
- if ($can_new) {
- echo '<p><a class="tool_link" href="new-notes-' . $note['parent_id'] . '">+ new note</a></p>';
- }
- echo '</div>';
-}
-
-echo '<div class="tree_branch">';
-$did_show_up = false;
-foreach($user_root_notes as $n) {
- if ($n['id'] == $note['id']) {
- $did_show_up = true;
- echo '<p>' . $n['title'] . '</p><div class="tree_branch">';
- foreach($children as $nn) {
- echo '<p><a href="view-notes-' . $nn['id'] . '">' . $nn['title'] . '</a></p>';
- }
- if ($can_new) {
- echo '<p><a class="tool_link" href="new-notes-' . $note['id'] . '">+ new note</a></p>';
- }
- echo '</div>';
- } else {
- echo '<p><a href="view-notes-' . $n['id'] . '">' . $n['title'] . '</a></p>';
- if ($n['id'] == $note['parent_id']) {
- $did_show_up = true;
- list_brothers_and_children();
- }
- }
-}
-if ($can_new) {
- echo '<p><a class="tool_link" href="new-notes-0">+ new note</a></p>';
-}
-echo '</div>';
-
-if (!$did_show_up) {
- echo '<br /><br />';
- echo '<a href="view-notes-' . $note['parent_id'] . '">' . $note['parent_title'] . '</a>';
- 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 '</div><div class="contents-left">';
echo '<h1>' . $note['ownername'] . '</h1><br />';
-echo '<div class="small_right"><a href="user-notes-' . $note['owner'] . '">complete tree</a></div>';
+echo '<div class="small_right"><a href="user-notes-' . $note['owner'] . '">voir tout</a></div>';
function n_tree_branch($id) {
global $notest, $note, $can_new;
@@ -126,11 +39,11 @@ function n_tree_branch($id) {
echo '</div>';
} else if ($can_new && $branch['id'] == $note['id']) {
echo '<div class="tree_branch">';
- if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $branch['id'] . '">+ new note</a></p>';
+ if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $branch['id'] . '">+ nouvelle note</a></p>';
echo '</div>';
}
}
- if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $id . '">+ new note</a></p>';
+ if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $id . '">+ nouvelle note</a></p>';
}
echo '<div class="tree_root">';
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'] . ' - <a class="tool_link" href="move-notes-' . $note['id'] . '-' . $n['id'] . '">move here</a>';
+ return $n['title'] . ' - <a class="tool_link" href="move-notes-' . $note['id'] . '-' . $n['id'] . '">déplacer ici</a>';
}
require("tpl/general/inc_tree.php");
tree($notes_tree, @f);
-echo '<a class="tool_link" href="move-notes-'.$note['id'].'-0">move to root</a>';
+echo '<a class="tool_link" href="move-notes-'.$note['id'].'-0">déplacer à la racine</a>';
$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 @@
<?php
-$title = $note_owner['name'] . "'s notebook";
+$title = "Bloc-notes de " . $note_owner['name'] ;
require("tpl/general/top.php");
function f($n) {
@@ -9,11 +9,11 @@ function f($n) {
require("tpl/general/inc_tree.php");
tree($notes_tree, @f);
if ($note_owner['id'] == $user['id']) {
- echo '<a class="tool_link" href="new-notes-0">create new note</a>';
+ echo '<a class="tool_link" href="new-notes-0">nouvelle note</a>';
}
echo '</div><div class="contents-left">';
-echo '<h1>Other users</h1>';
+echo '<h1>Autres bloc-notes</h1>';
echo "<ul>";
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 : <a href="view-notes-'. $note['parent_id'] . '">' . $note['parent_title'] . '</a>';
}
-if ($can_edit) $t[] = '<a href="edit-notes-' . $note['id'] . '">edit</a>';
-$t[] = '<a href="source-notes-' . $note['id'] . '">view source</a>';
-if ($can_move) $t[] = '<a href="move-notes-' . $note['id'] . '">move</a>';
-if ($can_delete) $t[] = '<a href="delete-notes-' . $note['id'] . '">delete</a>';
+if ($can_edit) $t[] = '<a href="edit-notes-' . $note['id'] . '">modifier</a>';
+$t[] = '<a href="source-notes-' . $note['id'] . '">code source</a>';
+if ($can_move) $t[] = '<a href="move-notes-' . $note['id'] . '">déplacer</a>';
+if ($can_delete) $t[] = '<a href="delete-notes-' . $note['id'] . '">supprimer</a>';
echo '<div class="small_right">' . implode(' | ', $t) . '</div>';
echo $note['html'];