* icons http://icomoon.io
* PHP Simple HTML DOM Parser (for Pocket import) http://simplehtmldom.sourceforge.net/
* Session https://github.com/tontof/kriss_feed/blob/master/src/class/Session.php
+* RainTPL http://www.raintpl.com/
poche is developed by Nicolas Lœuillet under the Do What the Fuck You Want to Public License
include dirname(__FILE__).'/inc/simple_html_dom.php';
if (!isset($_GET['start'])) {
- 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>';
+ 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>';
}
else {
if ($_GET['start'] == 'pocket') {
$read = 1;
}
- echo 'Import from Pocket completed. <a href="index.php">Welcome to #poche !</a>';
+ echo _('Import from Pocket completed.') . '<a href="index.php">' . _('Welcome to poche !') .'</a>';
logm('import from pocket completed');
}
else if ($_GET['start'] == 'readability') {
action_to_do('add', $url);
}
- echo 'Import from Readability completed. <a href="index.php">Welcome to #poche !</a>';
+ echo _('Import from Readability completed.') . '<a href="index.php">' . _('Welcome to poche !') . '</a>';
logm('import from Readability completed');
}
else {
- echo 'Error with the import. <a href="index.php">Welcome to #poche !</a>';
+ echo _('Error with the import.') . '<a href="index.php">' . _('Back to poche'). '</a>';
logm('error with the import');
}
}
\ No newline at end of file
define('START_TIME', microtime(true));
if (phpversion() < 5) {
- die("Argh you don't have PHP 5 !");
+ die(_('Oops, it seems you don\'t have PHP 5.'));
}
error_reporting(E_ALL);
define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE);
define ('DOWNLOAD_PICTURES', TRUE);
define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX');
+define ('LANG', 'fr_FR.UTF8');
+
+putenv("LC_ALL=".LANG);
+setlocale(LC_ALL, LANG);
+bindtextdomain(LANG, "./locale");
+textdomain(LANG);
+
$storage_type = 'sqlite'; # sqlite or file
include 'functions.php';
if (DOWNLOAD_PICTURES) {
$content = filtre_picture($parametres_url['content'], $url, $last_id);
}
- $msg->add('s', 'the link has been added successfully');
+ $msg->add('s', _('the link has been added successfully'));
}
else {
- $msg->add('e', 'error during insertion : the link wasn\'t added');
+ $msg->add('e', _('error during insertion : the link wasn\'t added'));
}
}
else {
- $msg->add('e', 'error during url preparation : the link wasn\'t added');
+ $msg->add('e', _('error during url preparation : the link wasn\'t added'));
logm('error during url preparation');
}
}
else {
- $msg->add('e', 'error during url preparation : the link is not valid');
+ $msg->add('e', _('error during url preparation : the link is not valid'));
logm($url . ' is not a valid url');
}
case 'delete':
if ($store->deleteById($id)) {
remove_directory(ABS_PATH . $id);
- $msg->add('s', 'the link has been deleted successfully');
+ $msg->add('s', _('the link has been deleted successfully'));
logm('delete link #' . $id);
}
else {
- $msg->add('e', 'the link wasn\'t deleted');
+ $msg->add('e', _('the link wasn\'t deleted'));
logm('error : can\'t delete link #' . $id);
}
break;
# XSRF protection with token
if (!empty($_POST)) {
if (!Session::isToken($_POST['token'])) {
- die('Wrong token.');
+ die(_('Wrong token.'));
}
unset($_SESSION['tokens']);
}
MyTool::redirect($ref);
}
logm('login failed');
- die("Login failed !");
+ die(_("Login failed !"));
} else {
logm('login failed');
}
logm('password updated');
if (!MODE_DEMO) {
$store->updatePassword(encode_string($_POST['password'] . $_SESSION['login']));
- $msg->add('s', 'your password has been updated');
+ $msg->add('s', _('your password has been updated'));
}
else {
- $msg->add('i', 'in demo mode, you can\'t update password');
+ $msg->add('i', _('in demo mode, you can\'t update password'));
}
}
else
- $msg->add('e', 'your password can\'t be empty and you have to repeat it in the second field');
+ $msg->add('e', _('your password can\'t be empty and you have to repeat it in the second field'));
}
}
$tpl->assign('view', $view);
$tpl->assign('poche_url', myTool::getUrl());
$tpl->assign('demo', MODE_DEMO);
-$tpl->assign('title', 'poche, a read it later open source system');
+$tpl->assign('title', _('poche, a read it later open source system'));
if (Session::isLogged()) {
action_to_do($action, $url, $id);
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: poche\n"
+"POT-Creation-Date: 2013-08-02 10:26+0100\n"
+"PO-Revision-Date: 2013-08-02 10:26+0100\n"
+"Last-Translator: Nicolas Lœuillet <nicolas.loeuillet@gmail.com>\n"
+"Language-Team: poche <support@inthepoche.com>\n"
+"Language: Français\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
+"X-Poedit-Basepath: /\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Poedit-SearchPath-0: /var/www/poche-i18n\n"
+
+#: /var/www/poche-i18n/import.php:17
+msgid "Please execute the import script locally, it can take a very long time."
+msgstr "Merci d'exécuter l'import en local, cela peut prendre du temps. "
+
+#: /var/www/poche-i18n/import.php:17
+msgid "Please choose between Pocket & Readabilty :"
+msgstr "Merci de choisir entre Pocket & Readability :"
+
+#: /var/www/poche-i18n/import.php:17
+msgid "Bye bye Pocket, let's go !"
+msgstr "Bye bye Pocket, en route !"
+
+#: /var/www/poche-i18n/import.php:17
+msgid "Bye bye Readability, let's go !"
+msgstr "Bye bye Readability, en route !"
+
+#: /var/www/poche-i18n/import.php:48
+msgid "Import from Pocket completed."
+msgstr "L'import depuis Poche est terminé."
+
+#: /var/www/poche-i18n/import.php:48 /var/www/poche-i18n/import.php:66
+msgid "Welcome to poche !"
+msgstr "Bienvenue dans poche !"
+
+#: /var/www/poche-i18n/import.php:66
+msgid "Import from Readability completed."
+msgstr "L'import depuis Readability est terminé."
+
+#: /var/www/poche-i18n/import.php:70
+msgid "Error with the import."
+msgstr "Erreur durant l'import."
+
+#: /var/www/poche-i18n/import.php:70
+msgid "Back to poche"
+msgstr "Retour à poche"
+
+#: /var/www/poche-i18n/index.php:18
+msgid "Wrong token."
+msgstr "Mauvais jeton."
+
+#: /var/www/poche-i18n/index.php:43
+msgid "Login failed !"
+msgstr "Connexion échouée."
+
+#: /var/www/poche-i18n/index.php:59
+msgid "your password has been updated"
+msgstr "Votre mot de passe a été mis à jour. "
+
+#: /var/www/poche-i18n/index.php:62
+msgid "in demo mode, you can't update password"
+msgstr "En mode démo, le mot de passe ne peut être modifié."
+
+#: /var/www/poche-i18n/index.php:66
+msgid ""
+"your password can't be empty and you have to repeat it in the second field"
+msgstr ""
+"Votre mot de passe ne peut être vide et vous devez le répéter dans le second "
+"champ."
+
+#: /var/www/poche-i18n/index.php:83
+msgid "poche, a read it later open source system"
+msgstr "poche, a read it later open source system"
+
+#: /var/www/poche-i18n/inc/MyTool.class.php:18
+msgid "Oops, it seems you don't have PHP 5."
+msgstr "Oups, il semblerait que PHP 5 ne soit pas installé. "
+
+#: /var/www/poche-i18n/inc/functions.php:352
+msgid "the link has been added successfully"
+msgstr "le lien a été ajouté avec succès"
+
+#: /var/www/poche-i18n/inc/functions.php:355
+msgid "error during insertion : the link wasn't added"
+msgstr "erreur durant l'insertion : le lien n'a pas été ajouté"
+
+#: /var/www/poche-i18n/inc/functions.php:359
+msgid "error during url preparation : the link wasn't added"
+msgstr "erreur durant l'insertion : le lien n'a pas été ajouté"
+
+#: /var/www/poche-i18n/inc/functions.php:364
+msgid "error during url preparation : the link is not valid"
+msgstr "erreur durant la préparation de l'URL : le lien n'est pas valide"
+
+#: /var/www/poche-i18n/inc/functions.php:373
+msgid "the link has been deleted successfully"
+msgstr "le lien a été ajouté avec succès"
+
+#: /var/www/poche-i18n/inc/functions.php:377
+msgid "the link wasn't deleted"
+msgstr "le lien n'a pas été supprimé"
+
+#~ msgid "TEST"
+#~ msgstr "NICOLAS"