Commit b73f7e7a authored by Luc Didry's avatar Luc Didry

Update sentence and translations

parent 16d844eb
......@@ -129,8 +129,8 @@ sub startup {
$custom_url = undef if (defined($custom_url) && $custom_url eq '');
my ($msg, $short);
if (defined($custom_url) && ($custom_url =~ m/^a(pi)?|stats$/ || $custom_url !~ m/^[-a-zA-Z0-9_]+$/)) {
$msg = $c->l('The shortened text can contain only numbers, letters and the - and _ characters and can\'t be "a", "api" or "stats". Your URL to shorten: [_1]', $url);
if (defined($custom_url) && ($custom_url =~ m/^a(pi)?|stats$/ || $custom_url =~ m/\.json$/ || $custom_url !~ m/^[-a-zA-Z0-9_]+$/)) {
$msg = $c->l('The shortened text can contain only numbers, letters and the - and _ character, can\'t be "a", "api" or "stats" or end with ".json". Your URL to shorten: [_1]', $url);
} elsif (defined($custom_url) && LstuModel::Lstu->count('WHERE short = ?', $custom_url) > 0) {
$msg = $c->l('The shortened text ([_1]) is already used. Please choose another one.', $custom_url);
} elsif (is_http_uri($url->to_string) || is_https_uri($url->to_string)) {
......
......@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: Lstu - 0.04\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2015-05-28 23:35+0100\n"
"PO-Revision-Date: 2015-06-10 07:44+0100\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: Luc Didry <luc@didry.org>\n"
"Language-Team: Luc Didry <admin@lstu.fr>\n"
"Language: en\n"
"X-Generator: Poedit 1.7.7\n"
"X-Generator: Poedit 1.6.10\n"
"X-Poedit-SourceCharset: UTF-8\n"
#. ($url)
......@@ -42,7 +42,8 @@ msgstr ""
msgid "Created"
msgstr ""
#: templates/api.html.ep:15 templates/index.html.ep:10 templates/index.html.ep:9
#: templates/api.html.ep:15 templates/index.html.ep:10
#: templates/index.html.ep:9
msgid "Custom shortened text"
msgstr ""
......@@ -55,7 +56,8 @@ msgid "Go!"
msgstr ""
#: templates/api.html.ep:16
msgid "If equal to \"json\", response will be in JSON format, HTML format otherwise"
msgid ""
"If equal to \"json\", response will be in JSON format, HTML format otherwise"
msgstr ""
#: templates/api.html.ep:21 templates/api.html.ep:39
......@@ -80,7 +82,9 @@ msgstr ""
#. ($c->config('contact')
#: lib/Lstu.pm:165
msgid "No shortened URL available. Please retry or contact the administrator at %1. Your URL to shorten: %2"
msgid ""
"No shortened URL available. Please retry or contact the administrator at %1. "
"Your URL to shorten: %2"
msgstr ""
#: templates/api.html.ep:12
......@@ -119,23 +123,31 @@ msgstr ""
#. ($url)
#: lib/Lstu.pm:133
msgid "The shortened text can contain only numbers, letters and the - and _ characters and can't be \"a\", \"api\" or \"stats\". Your URL to shorten: %1"
msgid ""
"The shortened text can contain only numbers, letters and the - and _ "
"character, can't be \"a\", \"api\" or \"stats\" or end with \".json\". Your "
"URL to shorten: %1"
msgstr ""
#: templates/stats.html.ep:27
msgid "URL"
msgstr ""
#: templates/api.html.ep:14 templates/index.html.ep:5 templates/index.html.ep:6
#: templates/api.html.ep:14 templates/index.html.ep:5
#: templates/index.html.ep:6
msgid "URL to shorten"
msgstr ""
#: templates/api.html.ep:22
msgid "You will be redirected to the Lstu interface with a message giving the shortened URL"
msgid ""
"You will be redirected to the Lstu interface with a message giving the "
"shortened URL"
msgstr ""
#: templates/api.html.ep:30
msgid "You will be redirected to the targeted URL or to the Lstu interface with a message giving the failure reason"
msgid ""
"You will be redirected to the targeted URL or to the Lstu interface with a "
"message giving the failure reason"
msgstr ""
#: templates/api.html.ep:14
......
# Lstu
# Copyright (C) 2013 - 2015 Luc Didry
# This file is distributed under the same license as the Lstu package.
#
#
# Translators:
# Luc Didry <luc@didry.org>, 2015
msgid ""
msgstr ""
"Project-Id-Version: Lstu\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2015-05-31 21:50+0000\n"
"PO-Revision-Date: 2015-06-10 07:43+0100\n"
"Last-Translator: Luc Didry <luc@didry.org>\n"
"Language-Team: French (http://www.transifex.com/projects/p/lstu/language/fr/)\n"
"Language-Team: French (http://www.transifex.com/projects/p/lstu/language/"
"fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 1.7.7\n"
"X-Generator: Poedit 1.6.10\n"
"X-Poedit-SourceCharset: UTF-8\n"
#. ($url)
......@@ -60,7 +61,9 @@ msgstr "Allons-y !"
#: templates/api.html.ep:16
msgid ""
"If equal to \"json\", response will be in JSON format, HTML format otherwise"
msgstr "Si égal à \"json\", la réponse sera au format JSON, sinon ce sera une réponse en HTML"
msgstr ""
"Si égal à \"json\", la réponse sera au format JSON, sinon ce sera une "
"réponse en HTML"
#: templates/api.html.ep:21 templates/api.html.ep:39
msgid "JSON: failure"
......@@ -85,9 +88,11 @@ msgstr "Suivant"
#. ($c->config('contact')
#: lib/Lstu.pm:165
msgid ""
"No shortened URL available. Please retry or contact the administrator at %1."
" Your URL to shorten: %2"
msgstr "Il n’y a plus d’URL raccourcie disponible. Veuillez réessayer ou contactez l’administrateur sur %1. Rappel de l’URL à raccourcir : %2"
"No shortened URL available. Please retry or contact the administrator at %1. "
"Your URL to shorten: %2"
msgstr ""
"Il n’y a plus d’URL raccourcie disponible. Veuillez réessayer ou contactez "
"l’administrateur sur %1. Rappel de l’URL à raccourcir : %2"
#: templates/api.html.ep:12
msgid "Parameters:"
......@@ -121,14 +126,19 @@ msgstr "L’URL raccourcie %1 n’existe pas"
#. ($custom_url)
#: lib/Lstu.pm:135
msgid "The shortened text (%1) is already used. Please choose another one."
msgstr "Le texte du raccourci (%1) est déjà utilisé. Veuillez en choisir un autre"
msgstr ""
"Le texte du raccourci (%1) est déjà utilisé. Veuillez en choisir un autre"
#. ($url)
#: lib/Lstu.pm:133
msgid ""
"The shortened text can contain only numbers, letters and the - and _ "
"characters and can't be \"a\", \"api\" or \"stats\". Your URL to shorten: %1"
msgstr "Le texte du raccourci ne doit contenir que des chiffres, des lettres et les caractères - et _ et ne peut être \"a\", \"api\" ou \"stats\". Rappel de l’URL à raccourcir : %2"
"character, can't be \"a\", \"api\" or \"stats\" or end with \".json\". Your "
"URL to shorten: %1"
msgstr ""
"Le texte du raccourci ne doit contenir que des chiffres, des lettres et les "
"caractères - et _, ne peut être \"a\", \"api\" ou \"stats\" ou se terminer "
"par \".json\". Rappel de l’URL à raccourcir : %1"
#: templates/stats.html.ep:27
msgid "URL"
......@@ -143,13 +153,17 @@ msgstr "URL à raccourcir"
msgid ""
"You will be redirected to the Lstu interface with a message giving the "
"shortened URL"
msgstr "Vous aurez l’interface normale de Lstu avec un message indiquant l’URL raccourcie"
msgstr ""
"Vous aurez l’interface normale de Lstu avec un message indiquant l’URL "
"raccourcie"
#: templates/api.html.ep:30
msgid ""
"You will be redirected to the targeted URL or to the Lstu interface with a "
"message giving the failure reason"
msgstr "Vous serez redirigé vers l’URL cible ou vers la page d’accueil de Lstu avec un message indiquant la raison de l’échec"
msgstr ""
"Vous serez redirigé vers l’URL cible ou vers la page d’accueil de Lstu avec "
"un message indiquant la raison de l’échec"
#: templates/api.html.ep:14
msgid "mandatory"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment