Improve already project exists message

This commit is contained in:
Brice Maron 2019-07-26 15:54:50 +02:00 committed by Alexis Metaireau
parent 2a9f447054
commit 669b15b0ec
7 changed files with 235 additions and 140 deletions

View file

@ -54,8 +54,8 @@ class CalculatorStringField(StringField):
def process_formdata(self, valuelist):
if valuelist:
message = _(
"Not a valid amount or expression."
"Only numbers and + - * / operators"
"Not a valid amount or expression. "
"Only numbers and + - * / operators "
"are accepted."
)
value = str(valuelist[0]).replace(",", ".")
@ -101,12 +101,8 @@ class ProjectForm(EditProjectForm):
def validate_id(form, field):
form.id.data = slugify(field.data)
if (form.id.data == "dashboard") or Project.query.get(form.id.data):
message = _("The project identifier is used to log in and for the "
"URL of the project. "
"We tried to generate an identifier for you but a "
"project with this identifier already exists. "
"Please create a new identifier that you will be able "
"to remember")
message = _("A project with this identifier (\"%(project)s\") already exists. "
"Please choose a new identifier", project=form.id.data)
raise ValidationError(Markup(message))

View file

@ -1,5 +1,5 @@
msgid ""
"Not a valid amount or expression.Only numbers and + - * / operatorsare "
"Not a valid amount or expression. Only numbers and + - * / operators are "
"accepted."
msgstr ""
@ -18,11 +18,10 @@ msgstr ""
msgid "Create the project"
msgstr ""
#, python-format
msgid ""
"The project identifier is used to log in and for the URL of the project. "
"We tried to generate an identifier for you but a project with this "
"identifier already exists. Please create a new identifier that you will "
"be able to remember"
"A project with this identifier (\"%(project)s\") already exists. Please "
"choose a new identifier"
msgstr ""
msgid "Get in"
@ -76,10 +75,10 @@ msgstr ""
msgid "Name"
msgstr ""
msgid "Weight"
msgid "Weights should be positive"
msgstr ""
msgid "Weights should be positive"
msgid "Weight"
msgstr ""
msgid "Add"
@ -348,10 +347,10 @@ msgstr ""
msgid "Start a new project"
msgstr ""
msgid "Logout"
msgid "Dashboard"
msgstr ""
msgid "Dashboard"
msgid "Logout"
msgstr ""
msgid "This is a free software"

View file

@ -1,19 +1,21 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-07 19:52+0200\n"
"POT-Creation-Date: 2019-07-26 17:17+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: el\n"
"Language-Team: none\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 2.3.1\n"
"Generated-By: Babel 2.7.0\n"
msgid ""
"Not a valid amount or expression.Only numbers and + - * / operatorsare "
"Not a valid amount or expression. Only numbers and + - * / operators are "
"accepted."
msgstr ""
@ -32,11 +34,10 @@ msgstr ""
msgid "Create the project"
msgstr ""
#, python-format
msgid ""
"The project identifier is used to log in and for the URL of the project. "
"We tried to generate an identifier for you but a project with this "
"identifier already exists. Please create a new identifier that you will "
"be able to remember"
"A project with this identifier (\"%(project)s\") already exists. Please "
"choose a new identifier"
msgstr ""
msgid "Get in"
@ -90,10 +91,10 @@ msgstr ""
msgid "Name"
msgstr ""
msgid "Weight"
msgid "Weights should be positive"
msgstr ""
msgid "Weights should be positive"
msgid "Weight"
msgstr ""
msgid "Add"
@ -362,10 +363,10 @@ msgstr ""
msgid "Start a new project"
msgstr ""
msgid "Logout"
msgid "Dashboard"
msgstr ""
msgid "Dashboard"
msgid "Logout"
msgstr ""
msgid "This is a free software"
@ -452,3 +453,10 @@ msgstr ""
msgid "Balance"
msgstr ""
#~ msgid ""
#~ "Not a valid amount or expression.Only"
#~ " numbers and + - * / "
#~ "operatorsare accepted."
#~ msgstr ""

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2019-01-02 23:26-0500\n"
"POT-Creation-Date: 2019-07-26 17:17+0200\n"
"PO-Revision-Date: 2018-05-15 22:00+0200\n"
"Last-Translator: Adrien CLERC <>\n"
"Language: fr\n"
@ -16,14 +16,12 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.6.0\n"
"Generated-By: Babel 2.7.0\n"
msgid ""
"Not a valid amount or expression.Only numbers and + - * / operators are "
"Not a valid amount or expression. Only numbers and + - * / operators are "
"accepted."
msgstr ""
"Pas un montant ou une expression valide. Seuls les nombres et les opérateurs"
"+ - * / sont acceptés"
msgid "Project name"
msgstr "Nom de projet"
@ -40,16 +38,11 @@ msgstr "Identifiant du projet"
msgid "Create the project"
msgstr "Créer le projet"
#, python-format
msgid ""
"The project identifier is used to log in and for the URL of the project. "
"We tried to generate an identifier for you but a project with this "
"identifier already exists. Please create a new identifier that you will "
"be able to remember"
"A project with this identifier (\"%(project)s\") already exists. Please "
"choose a new identifier"
msgstr ""
"Lidentifiant du projet est utilisé pour se connecter et pour lURL du "
"projet. Nous avons essayé de générer un identifiant mais celui ci existe "
"déjà. Merci de créer un nouvel identifiant que vous serez capable de "
"retenir"
msgid "Get in"
msgstr "Entrer"
@ -102,12 +95,12 @@ msgstr "Le montant dune facture ne peut pas être nul"
msgid "Name"
msgstr "Nom"
msgid "Weight"
msgstr "Parts"
msgid "Weights should be positive"
msgstr "Les parts doivent être positives"
msgid "Weight"
msgstr "Parts"
msgid "Add"
msgstr "Ajouter"
@ -380,12 +373,12 @@ msgstr "aller à"
msgid "Start a new project"
msgstr "Nouveau projet"
msgid "Logout"
msgstr "Se déconnecter"
msgid "Dashboard"
msgstr "Tableau de bord"
msgid "Logout"
msgstr "Se déconnecter"
msgid "This is a free software"
msgstr "Ceci est un logiciel libre"
@ -508,3 +501,36 @@ msgstr "Solde"
#~ msgid "Invite"
#~ msgstr "Invitez"
#~ msgid ""
#~ "Not a valid amount or expression.Only"
#~ " numbers and + - * / operators"
#~ " are accepted."
#~ msgstr ""
#~ "Pas un montant ou une expression "
#~ "valide. Seuls les nombres et les "
#~ "opérateurs+ - * / sont acceptés"
#~ msgid ""
#~ "The project identifier is used to "
#~ "log in and for the URL of "
#~ "the project. We tried to generate "
#~ "an identifier for you but a "
#~ "project with this identifier already "
#~ "exists. Please create a new identifier"
#~ " that you will be able to "
#~ "remember"
#~ msgstr ""
#~ "Lidentifiant du projet est utilisé pour"
#~ " se connecter et pour lURL du "
#~ "projet. Nous avons essayé de générer "
#~ "un identifiant mais celui ci existe "
#~ "déjà. Merci de créer un nouvel "
#~ "identifiant que vous serez capable de"
#~ " retenir"
#~ msgid ""
#~ "Not a valid amount or expression.Only"
#~ " numbers and + - * / "
#~ "operatorsare accepted."
#~ msgstr ""

View file

@ -1,25 +1,24 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-30 18:48+0200\n"
"POT-Creation-Date: 2019-07-26 17:17+0200\n"
"PO-Revision-Date: 2019-04-11 06:04+0000\n"
"Last-Translator: Michal Čihař <michal@cihar.com>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/"
"i-hate-money/i-hate-money/nb_NO/>\n"
"Language: nb_NO\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/i"
"-hate-money/i-hate-money/nb_NO/>\n"
"Plural-Forms: nplurals=2; plural=n != 1\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.6-dev\n"
"Generated-By: Babel 2.7.0\n"
#, fuzzy
msgid ""
"Not a valid amount or expression.Only numbers and + - * / operatorsare "
"Not a valid amount or expression. Only numbers and + - * / operators are "
"accepted."
msgstr ""
"Ikke gyldig beløp eller uttrykk. Kun tall og + - * / operatorer tillates."
msgid "Project name"
msgstr "Prosjektnavn"
@ -36,16 +35,11 @@ msgstr "Prosjektidentifikator"
msgid "Create the project"
msgstr "Opprett prosjektet"
#, fuzzy
#, python-format
msgid ""
"The project identifier is used to log in and for the URL of the project. "
"We tried to generate an identifier for you but a project with this "
"identifier already exists. Please create a new identifier that you will "
"be able to remember"
"A project with this identifier (\"%(project)s\") already exists. Please "
"choose a new identifier"
msgstr ""
"Prosjektidentifikatoren brukes til og logge inn og for prosjektets "
"nettadresse. Vi prøvde å generere en identifikator for deg, men et prosjekt "
"hadde den identifikatoren allerede. Opprett en ny identifikator du husker."
#, fuzzy
msgid "Get in"
@ -99,12 +93,12 @@ msgstr "Regninger kan ikke være null"
msgid "Name"
msgstr "Navn"
msgid "Weight"
msgstr "Vekt"
msgid "Weights should be positive"
msgstr "Vekter må være positive"
msgid "Weight"
msgstr "Vekt"
msgid "Add"
msgstr "Legg til"
@ -147,7 +141,8 @@ msgstr "Dette administratorpassordet er ikke rett. Kun %(num)d forsøk igjen."
msgid "You either provided a bad token or no project identifier."
msgstr ""
"Du har enten oppgitt et feilaktig symbol, eller utelot prosjektidentifikator."
"Du har enten oppgitt et feilaktig symbol, eller utelot "
"prosjektidentifikator."
msgid "This private code is not the right one"
msgstr "Denne private koden er ikke rett"
@ -162,8 +157,7 @@ msgstr "%(msg_compl)sProsjektidentifikatoren er %(project)s"
#, fuzzy
msgid "A link to reset your password has been sent to your email."
msgstr ""
"En lenke for å tilbakestille passordet har blitt sent til deg per e-post."
msgstr "En lenke for å tilbakestille passordet har blitt sent til deg per e-post."
msgid "No token provided"
msgstr "Inget symbol angitt"
@ -185,7 +179,8 @@ msgstr "Prosjekt slettet"
#, python-format
msgid "You have been invited to share your expenses for %(project)s"
msgstr ""
"Du har blitt invitert til å dele dine utgifter i forbindelse med %(project)s"
"Du har blitt invitert til å dele dine utgifter i forbindelse med "
"%(project)s"
msgid "Your invitations have been sent"
msgstr "Invitasjonene dine har blitt sendt"
@ -203,8 +198,8 @@ msgid ""
"User '%(name)s' has been deactivated. It will still appear in the users "
"list until its balance becomes zero."
msgstr ""
"Brukeren \"%(name)s\" har blitt avskrudd. Vedkommende vil still fremtre i "
"brukerlisten til dens konto går tom."
"Brukeren \"%(name)s\" har blitt avskrudd. Vedkommende vil still fremtre i"
" brukerlisten til dens konto går tom."
#, python-format
msgid "User '%(name)s' has been removed"
@ -363,8 +358,8 @@ msgid ""
"This access code will be sent to your friends. It is stored as-is by the "
"server, so don\\'t reuse a personal password!"
msgstr ""
"Denne tilgangskoden vil bli sendt til venne dine. Den lagres som den er "
"tjeneren, så ikke gjenbruk et personlig passord."
"Denne tilgangskoden vil bli sendt til venne dine. Den lagres som den er "
"tjeneren, så ikke gjenbruk et personlig passord."
msgid "Account manager"
msgstr "Kontobehandler"
@ -390,13 +385,13 @@ msgstr "bytt til"
msgid "Start a new project"
msgstr "Start et nytt prosjekt"
msgid "Dashboard"
msgstr "Oversikt"
#, fuzzy
msgid "Logout"
msgstr "Logg ut"
msgid "Dashboard"
msgstr "Oversikt"
msgid "This is a free software"
msgstr "Dette er fri programvare"
@ -466,7 +461,8 @@ msgid ""
"password by other communication means. Or even directly share the "
"following link:"
msgstr ""
"Hvis du foretrekker det, kan du dele prosjektidentifikatoeren og det delte\n"
"Hvis du foretrekker det, kan du dele prosjektidentifikatoeren og det "
"delte\n"
"passordet på annet vis. Du kan også dele det følgende lenke direkte:"
msgid "Who pays?"
@ -487,3 +483,30 @@ msgstr "Forbrukt"
#, fuzzy
msgid "Balance"
msgstr "Kontobalanse"
#~ msgid ""
#~ "The project identifier is used to "
#~ "log in and for the URL of "
#~ "the project. We tried to generate "
#~ "an identifier for you but a "
#~ "project with this identifier already "
#~ "exists. Please create a new identifier"
#~ " that you will be able to "
#~ "remember"
#~ msgstr ""
#~ "Prosjektidentifikatoren brukes til og logge"
#~ " inn og for prosjektets nettadresse. "
#~ "Vi prøvde å generere en identifikator"
#~ " for deg, men et prosjekt hadde "
#~ "den identifikatoren allerede. Opprett en "
#~ "ny identifikator du husker."
#~ msgid ""
#~ "Not a valid amount or expression.Only"
#~ " numbers and + - * / "
#~ "operatorsare accepted."
#~ msgstr ""
#~ "Ikke gyldig beløp eller uttrykk. Kun "
#~ "tall og + - * / operatorer "
#~ "tillates."

View file

@ -1,23 +1,23 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Language-Team: Dutch <vistausss@outlook.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.1.1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2019-07-26 17:17+0200\n"
"PO-Revision-Date: 2019-03-10 15:49+0200\n"
"Last-Translator: Heimen Stoffels <vistausss@outlook.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: nl_NL\n"
"Language-Team: Dutch <vistausss@outlook.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.7.0\n"
msgid ""
"Not a valid amount or expression.Only numbers and + - * / operatorsare "
"Not a valid amount or expression. Only numbers and + - * / operators are "
"accepted."
msgstr ""
"Geen geldig bedrag of geldige expressie. Alleen getallen en + - * / zijn "
"toegestaan."
msgid "Project name"
msgstr "Projectnaam"
@ -34,15 +34,11 @@ msgstr "Project-id"
msgid "Create the project"
msgstr "Project creëren"
#, python-format
msgid ""
"The project identifier is used to log in and for the URL of the project. We "
"tried to generate an identifier for you but a project with this identifier "
"already exists. Please create a new identifier that you will be able to "
"remember"
"A project with this identifier (\"%(project)s\") already exists. Please "
"choose a new identifier"
msgstr ""
"De project-id wordt gebruikt om in te loggen en als url van het project. We "
"hebben geprobeerd om een id voor je te genereren, maar er is al een project "
"met deze id. Creëer een nieuwe id die je makkelijk kunt onthouden."
msgid "Get in"
msgstr "Inloggen"
@ -95,12 +91,12 @@ msgstr "Rekeningen mogen niet null zijn"
msgid "Name"
msgstr "Naam"
msgid "Weight"
msgstr "Gewicht"
msgid "Weights should be positive"
msgstr "Gewichten moeten positief zijn"
msgid "Weight"
msgstr "Gewicht"
msgid "Add"
msgstr "Toevoegen"
@ -137,8 +133,7 @@ msgstr "Te vaak onjuist ingelogd. Probeer het later opnieuw."
#, python-format
msgid "This admin password is not the right one. Only %(num)d attempts left."
msgstr ""
"Het admin-wachtwoord is onjuist. Je kunt het nog %(num)d keer proberen."
msgstr "Het admin-wachtwoord is onjuist. Je kunt het nog %(num)d keer proberen."
msgid "You either provided a bad token or no project identifier."
msgstr "Je hebt een onjuiste toegangssleutel of geen project-id opgegeven."
@ -193,8 +188,8 @@ msgstr "%(name)s is wederom lid geworden van dit project"
#, python-format
msgid ""
"User '%(name)s' has been deactivated. It will still appear in the users list "
"until its balance becomes zero."
"User '%(name)s' has been deactivated. It will still appear in the users "
"list until its balance becomes zero."
msgstr ""
"De gebruiker '%(name)s' is gedeactiveerd. Hij/zij wordt nog steeds in de "
"gebruikerslijst getoond totdat zijn/haar saldo op nul staat."
@ -376,12 +371,12 @@ msgstr "overschakelen naar"
msgid "Start a new project"
msgstr "Nieuw project starten"
msgid "Logout"
msgstr "Uitloggen"
msgid "Dashboard"
msgstr "Overzicht"
msgid "Logout"
msgstr "Uitloggen"
msgid "This is a free software"
msgstr "Dit is vrije software"
@ -437,19 +432,20 @@ msgid "Invite people to join this project"
msgstr "Nodig mensen uit voor dit project"
msgid ""
"Specify a (comma separated) list of email adresses you want to notify about "
"the\n"
"creation of this budget management project and we will send them an email "
"for you."
"Specify a (comma separated) list of email adresses you want to notify "
"about the\n"
"creation of this budget management project and we will send them an email"
" for you."
msgstr ""
"Geef een kommagescheiden lijst van e-mailadressen op. Deze mensen worden op "
"de\n"
"hoogte gebracht van het bestaan van dit project en wij sturen hen een e-mail."
"Geef een kommagescheiden lijst van e-mailadressen op. Deze mensen worden "
"op de\n"
"hoogte gebracht van het bestaan van dit project en wij sturen hen een "
"e-mail."
msgid ""
"If you prefer, you can share the project identifier and the shared\n"
"password by other communication means. Or even directly share the following "
"link:"
"password by other communication means. Or even directly share the "
"following link:"
msgstr ""
"Als je wilt, dan kun je de project-id en het gedeelde wachtwoord\n"
"delen via andere kanalen. Of deel gewoon de volgende link:"
@ -471,3 +467,31 @@ msgstr "Uitgegeven"
msgid "Balance"
msgstr "Saldo"
#~ msgid ""
#~ "The project identifier is used to "
#~ "log in and for the URL of "
#~ "the project. We tried to generate "
#~ "an identifier for you but a "
#~ "project with this identifier already "
#~ "exists. Please create a new identifier"
#~ " that you will be able to "
#~ "remember"
#~ msgstr ""
#~ "De project-id wordt gebruikt om in"
#~ " te loggen en als url van het"
#~ " project. We hebben geprobeerd om een"
#~ " id voor je te genereren, maar "
#~ "er is al een project met deze "
#~ "id. Creëer een nieuwe id die je"
#~ " makkelijk kunt onthouden."
#~ msgid ""
#~ "Not a valid amount or expression.Only"
#~ " numbers and + - * / "
#~ "operatorsare accepted."
#~ msgstr ""
#~ "Geen geldig bedrag of geldige expressie."
#~ " Alleen getallen en + - * / "
#~ "zijn toegestaan."

View file

@ -1,21 +1,23 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-01 01:24+0200\n"
"POT-Creation-Date: 2019-07-26 17:17+0200\n"
"PO-Revision-Date: 2019-07-02 00:02+0000\n"
"Last-Translator: Elizabeth Sherrock <lizzyd710@gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"i-hate-money/i-hate-money/zh_HANS-CN/>\n"
"Language: zh_HANS-CN\n"
"Language: zh_HANS_CN\n"
"Language-Team: Chinese (Simplified) "
"<https://hosted.weblate.org/projects/i-hate-money/i-hate-money/zh_HANS-"
"CN/>\n"
"Plural-Forms: nplurals=1; plural=0\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8-dev\n"
"Generated-By: Babel 2.7.0\n"
msgid ""
"Not a valid amount or expression.Only numbers and + - * / operatorsare "
"Not a valid amount or expression. Only numbers and + - * / operators are "
"accepted."
msgstr ""
@ -34,11 +36,10 @@ msgstr ""
msgid "Create the project"
msgstr ""
#, python-format
msgid ""
"The project identifier is used to log in and for the URL of the project. "
"We tried to generate an identifier for you but a project with this "
"identifier already exists. Please create a new identifier that you will "
"be able to remember"
"A project with this identifier (\"%(project)s\") already exists. Please "
"choose a new identifier"
msgstr ""
msgid "Get in"
@ -92,10 +93,10 @@ msgstr ""
msgid "Name"
msgstr "名字"
msgid "Weight"
msgid "Weights should be positive"
msgstr ""
msgid "Weights should be positive"
msgid "Weight"
msgstr ""
msgid "Add"
@ -364,12 +365,12 @@ msgstr ""
msgid "Start a new project"
msgstr ""
msgid "Logout"
msgstr "签出"
msgid "Dashboard"
msgstr ""
msgid "Logout"
msgstr "签出"
msgid "This is a free software"
msgstr ""
@ -454,3 +455,21 @@ msgstr ""
msgid "Balance"
msgstr ""
#~ msgid ""
#~ "The project identifier is used to "
#~ "log in and for the URL of "
#~ "the project. We tried to generate "
#~ "an identifier for you but a "
#~ "project with this identifier already "
#~ "exists. Please create a new identifier"
#~ " that you will be able to "
#~ "remember"
#~ msgstr ""
#~ msgid ""
#~ "Not a valid amount or expression.Only"
#~ " numbers and + - * / "
#~ "operatorsare accepted."
#~ msgstr ""