diff options
author | Nicolas Lœuillet <nicolas.loeuillet@gmail.com> | 2013-08-02 10:39:03 +0200 |
---|---|---|
committer | Nicolas Lœuillet <nicolas.loeuillet@gmail.com> | 2013-08-02 10:39:03 +0200 |
commit | 2ee436eaa19fd5819a0e6c705b5fcc93f11fb338 (patch) | |
tree | 0800203c342c47f8bb0bbb626f55e6158cd2674a | |
parent | 02ea9f07691adf79f3f9d6cddfb1e045777927b6 (diff) | |
download | wallabag-2ee436eaa19fd5819a0e6c705b5fcc93f11fb338.tar.gz wallabag-2ee436eaa19fd5819a0e6c705b5fcc93f11fb338.tar.zst wallabag-2ee436eaa19fd5819a0e6c705b5fcc93f11fb338.zip |
poche / pocket / bolsillo / Tasche & more
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | import.php | 12 | ||||
-rw-r--r-- | inc/MyTool.class.php | 2 | ||||
-rw-r--r-- | inc/config.php | 7 | ||||
-rw-r--r-- | inc/functions.php | 12 | ||||
-rw-r--r-- | index.php | 12 | ||||
-rw-r--r-- | locale/fr_FR.UTF8/LC_MESSAGES/fr_FR.UTF8.mo | bin | 0 -> 2775 bytes | |||
-rw-r--r-- | locale/fr_FR.UTF8/LC_MESSAGES/fr_FR.UTF8.po | 111 |
8 files changed, 136 insertions, 21 deletions
@@ -6,6 +6,7 @@ poche is based on : | |||
6 | * icons http://icomoon.io | 6 | * icons http://icomoon.io |
7 | * PHP Simple HTML DOM Parser (for Pocket import) http://simplehtmldom.sourceforge.net/ | 7 | * PHP Simple HTML DOM Parser (for Pocket import) http://simplehtmldom.sourceforge.net/ |
8 | * Session https://github.com/tontof/kriss_feed/blob/master/src/class/Session.php | 8 | * Session https://github.com/tontof/kriss_feed/blob/master/src/class/Session.php |
9 | * RainTPL http://www.raintpl.com/ | ||
9 | 10 | ||
10 | poche is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License | 11 | poche is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License |
11 | 12 | ||
@@ -14,11 +14,7 @@ include dirname(__FILE__).'/inc/config.php'; | |||
14 | include dirname(__FILE__).'/inc/simple_html_dom.php'; | 14 | include dirname(__FILE__).'/inc/simple_html_dom.php'; |
15 | 15 | ||
16 | if (!isset($_GET['start'])) { | 16 | if (!isset($_GET['start'])) { |
17 | echo ' | 17 | echo _('Please execute the import script locally, it can take a very long time.') . '<br /><br />' . _('Please choose between Pocket & Readabilty :') . '<br /><a href="import.php?start=pocket">' . _('Bye bye Pocket, let\'s go !') . '</a><br /><a href="import.php?start=readability">' . _('Bye bye Readability, let\'s go !') . '</a>'; |
18 | Please execute the import script locally, it can take a very long time. <br /><br /> | ||
19 | Please choose between Pocket & Readabilty : | ||
20 | <br /><a href="import.php?start=pocket">Bye bye Pocket, let\'s go !</a> | ||
21 | <br /><a href="import.php?start=readability">Bye bye Readability, let\'s go !</a>'; | ||
22 | } | 18 | } |
23 | else { | 19 | else { |
24 | if ($_GET['start'] == 'pocket') { | 20 | if ($_GET['start'] == 'pocket') { |
@@ -49,7 +45,7 @@ else { | |||
49 | $read = 1; | 45 | $read = 1; |
50 | } | 46 | } |
51 | 47 | ||
52 | echo 'Import from Pocket completed. <a href="index.php">Welcome to #poche !</a>'; | 48 | echo _('Import from Pocket completed.') . '<a href="index.php">' . _('Welcome to poche !') .'</a>'; |
53 | logm('import from pocket completed'); | 49 | logm('import from pocket completed'); |
54 | } | 50 | } |
55 | else if ($_GET['start'] == 'readability') { | 51 | else if ($_GET['start'] == 'readability') { |
@@ -67,11 +63,11 @@ else { | |||
67 | action_to_do('add', $url); | 63 | action_to_do('add', $url); |
68 | } | 64 | } |
69 | 65 | ||
70 | echo 'Import from Readability completed. <a href="index.php">Welcome to #poche !</a>'; | 66 | echo _('Import from Readability completed.') . '<a href="index.php">' . _('Welcome to poche !') . '</a>'; |
71 | logm('import from Readability completed'); | 67 | logm('import from Readability completed'); |
72 | } | 68 | } |
73 | else { | 69 | else { |
74 | echo 'Error with the import. <a href="index.php">Welcome to #poche !</a>'; | 70 | echo _('Error with the import.') . '<a href="index.php">' . _('Back to poche'). '</a>'; |
75 | logm('error with the import'); | 71 | logm('error with the import'); |
76 | } | 72 | } |
77 | } \ No newline at end of file | 73 | } \ No newline at end of file |
diff --git a/inc/MyTool.class.php b/inc/MyTool.class.php index 1f5051a4..b11f18e9 100644 --- a/inc/MyTool.class.php +++ b/inc/MyTool.class.php | |||
@@ -15,7 +15,7 @@ class MyTool | |||
15 | define('START_TIME', microtime(true)); | 15 | define('START_TIME', microtime(true)); |
16 | 16 | ||
17 | if (phpversion() < 5) { | 17 | if (phpversion() < 5) { |
18 | die("Argh you don't have PHP 5 !"); | 18 | die(_('Oops, it seems you don\'t have PHP 5.')); |
19 | } | 19 | } |
20 | 20 | ||
21 | error_reporting(E_ALL); | 21 | error_reporting(E_ALL); |
diff --git a/inc/config.php b/inc/config.php index 4b46366d..6e3f80b8 100644 --- a/inc/config.php +++ b/inc/config.php | |||
@@ -20,6 +20,13 @@ define ('CONVERT_LINKS_FOOTNOTES', TRUE); | |||
20 | define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); | 20 | define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); |
21 | define ('DOWNLOAD_PICTURES', TRUE); | 21 | define ('DOWNLOAD_PICTURES', TRUE); |
22 | define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX'); | 22 | define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX'); |
23 | define ('LANG', 'fr_FR.UTF8'); | ||
24 | |||
25 | putenv("LC_ALL=".LANG); | ||
26 | setlocale(LC_ALL, LANG); | ||
27 | bindtextdomain(LANG, "./locale"); | ||
28 | textdomain(LANG); | ||
29 | |||
23 | $storage_type = 'sqlite'; # sqlite or file | 30 | $storage_type = 'sqlite'; # sqlite or file |
24 | 31 | ||
25 | include 'functions.php'; | 32 | include 'functions.php'; |
diff --git a/inc/functions.php b/inc/functions.php index 73e591c5..34ecf510 100644 --- a/inc/functions.php +++ b/inc/functions.php | |||
@@ -349,19 +349,19 @@ function action_to_do($action, $url, $id = 0) | |||
349 | if (DOWNLOAD_PICTURES) { | 349 | if (DOWNLOAD_PICTURES) { |
350 | $content = filtre_picture($parametres_url['content'], $url, $last_id); | 350 | $content = filtre_picture($parametres_url['content'], $url, $last_id); |
351 | } | 351 | } |
352 | $msg->add('s', 'the link has been added successfully'); | 352 | $msg->add('s', _('the link has been added successfully')); |
353 | } | 353 | } |
354 | else { | 354 | else { |
355 | $msg->add('e', 'error during insertion : the link wasn\'t added'); | 355 | $msg->add('e', _('error during insertion : the link wasn\'t added')); |
356 | } | 356 | } |
357 | } | 357 | } |
358 | else { | 358 | else { |
359 | $msg->add('e', 'error during url preparation : the link wasn\'t added'); | 359 | $msg->add('e', _('error during url preparation : the link wasn\'t added')); |
360 | logm('error during url preparation'); | 360 | logm('error during url preparation'); |
361 | } | 361 | } |
362 | } | 362 | } |
363 | else { | 363 | else { |
364 | $msg->add('e', 'error during url preparation : the link is not valid'); | 364 | $msg->add('e', _('error during url preparation : the link is not valid')); |
365 | logm($url . ' is not a valid url'); | 365 | logm($url . ' is not a valid url'); |
366 | } | 366 | } |
367 | 367 | ||
@@ -370,11 +370,11 @@ function action_to_do($action, $url, $id = 0) | |||
370 | case 'delete': | 370 | case 'delete': |
371 | if ($store->deleteById($id)) { | 371 | if ($store->deleteById($id)) { |
372 | remove_directory(ABS_PATH . $id); | 372 | remove_directory(ABS_PATH . $id); |
373 | $msg->add('s', 'the link has been deleted successfully'); | 373 | $msg->add('s', _('the link has been deleted successfully')); |
374 | logm('delete link #' . $id); | 374 | logm('delete link #' . $id); |
375 | } | 375 | } |
376 | else { | 376 | else { |
377 | $msg->add('e', 'the link wasn\'t deleted'); | 377 | $msg->add('e', _('the link wasn\'t deleted')); |
378 | logm('error : can\'t delete link #' . $id); | 378 | logm('error : can\'t delete link #' . $id); |
379 | } | 379 | } |
380 | break; | 380 | break; |
@@ -15,7 +15,7 @@ myTool::initPhp(); | |||
15 | # XSRF protection with token | 15 | # XSRF protection with token |
16 | if (!empty($_POST)) { | 16 | if (!empty($_POST)) { |
17 | if (!Session::isToken($_POST['token'])) { | 17 | if (!Session::isToken($_POST['token'])) { |
18 | die('Wrong token.'); | 18 | die(_('Wrong token.')); |
19 | } | 19 | } |
20 | unset($_SESSION['tokens']); | 20 | unset($_SESSION['tokens']); |
21 | } | 21 | } |
@@ -40,7 +40,7 @@ if (isset($_GET['login'])) { | |||
40 | MyTool::redirect($ref); | 40 | MyTool::redirect($ref); |
41 | } | 41 | } |
42 | logm('login failed'); | 42 | logm('login failed'); |
43 | die("Login failed !"); | 43 | die(_("Login failed !")); |
44 | } else { | 44 | } else { |
45 | logm('login failed'); | 45 | logm('login failed'); |
46 | } | 46 | } |
@@ -56,14 +56,14 @@ elseif (isset($_GET['config'])) { | |||
56 | logm('password updated'); | 56 | logm('password updated'); |
57 | if (!MODE_DEMO) { | 57 | if (!MODE_DEMO) { |
58 | $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login'])); | 58 | $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login'])); |
59 | $msg->add('s', 'your password has been updated'); | 59 | $msg->add('s', _('your password has been updated')); |
60 | } | 60 | } |
61 | else { | 61 | else { |
62 | $msg->add('i', 'in demo mode, you can\'t update password'); | 62 | $msg->add('i', _('in demo mode, you can\'t update password')); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | else | 65 | else |
66 | $msg->add('e', 'your password can\'t be empty and you have to repeat it in the second field'); | 66 | $msg->add('e', _('your password can\'t be empty and you have to repeat it in the second field')); |
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
@@ -80,7 +80,7 @@ $tpl->assign('referer', $ref); | |||
80 | $tpl->assign('view', $view); | 80 | $tpl->assign('view', $view); |
81 | $tpl->assign('poche_url', myTool::getUrl()); | 81 | $tpl->assign('poche_url', myTool::getUrl()); |
82 | $tpl->assign('demo', MODE_DEMO); | 82 | $tpl->assign('demo', MODE_DEMO); |
83 | $tpl->assign('title', 'poche, a read it later open source system'); | 83 | $tpl->assign('title', _('poche, a read it later open source system')); |
84 | 84 | ||
85 | if (Session::isLogged()) { | 85 | if (Session::isLogged()) { |
86 | action_to_do($action, $url, $id); | 86 | action_to_do($action, $url, $id); |
diff --git a/locale/fr_FR.UTF8/LC_MESSAGES/fr_FR.UTF8.mo b/locale/fr_FR.UTF8/LC_MESSAGES/fr_FR.UTF8.mo new file mode 100644 index 00000000..d996d46c --- /dev/null +++ b/locale/fr_FR.UTF8/LC_MESSAGES/fr_FR.UTF8.mo | |||
Binary files differ | |||
diff --git a/locale/fr_FR.UTF8/LC_MESSAGES/fr_FR.UTF8.po b/locale/fr_FR.UTF8/LC_MESSAGES/fr_FR.UTF8.po new file mode 100644 index 00000000..d4e7f2e9 --- /dev/null +++ b/locale/fr_FR.UTF8/LC_MESSAGES/fr_FR.UTF8.po | |||
@@ -0,0 +1,111 @@ | |||
1 | msgid "" | ||
2 | msgstr "" | ||
3 | "Project-Id-Version: poche\n" | ||
4 | "POT-Creation-Date: 2013-08-02 10:26+0100\n" | ||
5 | "PO-Revision-Date: 2013-08-02 10:26+0100\n" | ||
6 | "Last-Translator: Nicolas Lœuillet <nicolas.loeuillet@gmail.com>\n" | ||
7 | "Language-Team: poche <support@inthepoche.com>\n" | ||
8 | "Language: Français\n" | ||
9 | "MIME-Version: 1.0\n" | ||
10 | "Content-Type: text/plain; charset=UTF-8\n" | ||
11 | "Content-Transfer-Encoding: 8bit\n" | ||
12 | "X-Generator: Poedit 1.5.4\n" | ||
13 | "X-Poedit-KeywordsList: _;gettext;gettext_noop\n" | ||
14 | "X-Poedit-Basepath: /\n" | ||
15 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
16 | "X-Poedit-SourceCharset: UTF-8\n" | ||
17 | "X-Poedit-SearchPath-0: /var/www/poche-i18n\n" | ||
18 | |||
19 | #: /var/www/poche-i18n/import.php:17 | ||
20 | msgid "Please execute the import script locally, it can take a very long time." | ||
21 | msgstr "Merci d'exécuter l'import en local, cela peut prendre du temps. " | ||
22 | |||
23 | #: /var/www/poche-i18n/import.php:17 | ||
24 | msgid "Please choose between Pocket & Readabilty :" | ||
25 | msgstr "Merci de choisir entre Pocket & Readability :" | ||
26 | |||
27 | #: /var/www/poche-i18n/import.php:17 | ||
28 | msgid "Bye bye Pocket, let's go !" | ||
29 | msgstr "Bye bye Pocket, en route !" | ||
30 | |||
31 | #: /var/www/poche-i18n/import.php:17 | ||
32 | msgid "Bye bye Readability, let's go !" | ||
33 | msgstr "Bye bye Readability, en route !" | ||
34 | |||
35 | #: /var/www/poche-i18n/import.php:48 | ||
36 | msgid "Import from Pocket completed." | ||
37 | msgstr "L'import depuis Poche est terminé." | ||
38 | |||
39 | #: /var/www/poche-i18n/import.php:48 /var/www/poche-i18n/import.php:66 | ||
40 | msgid "Welcome to poche !" | ||
41 | msgstr "Bienvenue dans poche !" | ||
42 | |||
43 | #: /var/www/poche-i18n/import.php:66 | ||
44 | msgid "Import from Readability completed." | ||
45 | msgstr "L'import depuis Readability est terminé." | ||
46 | |||
47 | #: /var/www/poche-i18n/import.php:70 | ||
48 | msgid "Error with the import." | ||
49 | msgstr "Erreur durant l'import." | ||
50 | |||
51 | #: /var/www/poche-i18n/import.php:70 | ||
52 | msgid "Back to poche" | ||
53 | msgstr "Retour à poche" | ||
54 | |||
55 | #: /var/www/poche-i18n/index.php:18 | ||
56 | msgid "Wrong token." | ||
57 | msgstr "Mauvais jeton." | ||
58 | |||
59 | #: /var/www/poche-i18n/index.php:43 | ||
60 | msgid "Login failed !" | ||
61 | msgstr "Connexion échouée." | ||
62 | |||
63 | #: /var/www/poche-i18n/index.php:59 | ||
64 | msgid "your password has been updated" | ||
65 | msgstr "Votre mot de passe a été mis à jour. " | ||
66 | |||
67 | #: /var/www/poche-i18n/index.php:62 | ||
68 | msgid "in demo mode, you can't update password" | ||
69 | msgstr "En mode démo, le mot de passe ne peut être modifié." | ||
70 | |||
71 | #: /var/www/poche-i18n/index.php:66 | ||
72 | msgid "" | ||
73 | "your password can't be empty and you have to repeat it in the second field" | ||
74 | msgstr "" | ||
75 | "Votre mot de passe ne peut être vide et vous devez le répéter dans le second " | ||
76 | "champ." | ||
77 | |||
78 | #: /var/www/poche-i18n/index.php:83 | ||
79 | msgid "poche, a read it later open source system" | ||
80 | msgstr "poche, a read it later open source system" | ||
81 | |||
82 | #: /var/www/poche-i18n/inc/MyTool.class.php:18 | ||
83 | msgid "Oops, it seems you don't have PHP 5." | ||
84 | msgstr "Oups, il semblerait que PHP 5 ne soit pas installé. " | ||
85 | |||
86 | #: /var/www/poche-i18n/inc/functions.php:352 | ||
87 | msgid "the link has been added successfully" | ||
88 | msgstr "le lien a été ajouté avec succès" | ||
89 | |||
90 | #: /var/www/poche-i18n/inc/functions.php:355 | ||
91 | msgid "error during insertion : the link wasn't added" | ||
92 | msgstr "erreur durant l'insertion : le lien n'a pas été ajouté" | ||
93 | |||
94 | #: /var/www/poche-i18n/inc/functions.php:359 | ||
95 | msgid "error during url preparation : the link wasn't added" | ||
96 | msgstr "erreur durant l'insertion : le lien n'a pas été ajouté" | ||
97 | |||
98 | #: /var/www/poche-i18n/inc/functions.php:364 | ||
99 | msgid "error during url preparation : the link is not valid" | ||
100 | msgstr "erreur durant la préparation de l'URL : le lien n'est pas valide" | ||
101 | |||
102 | #: /var/www/poche-i18n/inc/functions.php:373 | ||
103 | msgid "the link has been deleted successfully" | ||
104 | msgstr "le lien a été ajouté avec succès" | ||
105 | |||
106 | #: /var/www/poche-i18n/inc/functions.php:377 | ||
107 | msgid "the link wasn't deleted" | ||
108 | msgstr "le lien n'a pas été supprimé" | ||
109 | |||
110 | #~ msgid "TEST" | ||
111 | #~ msgstr "NICOLAS" | ||