diff options
| author | Brice Maron <b.maron@whatever-company.com> | 2019-07-26 15:54:50 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2019-07-26 22:35:02 +0200 |
| commit | 669b15b0ec0a491f169772ac69e96a9970759a36 (patch) | |
| tree | c0a78614433369f44ed299e4cfbc04fbc3aebda2 /ihatemoney/forms.py | |
| parent | 2a9f447054cea693e1e1579780ed57f3212f91c7 (diff) | |
| download | ihatemoney-mirror-669b15b0ec0a491f169772ac69e96a9970759a36.zip ihatemoney-mirror-669b15b0ec0a491f169772ac69e96a9970759a36.tar.gz ihatemoney-mirror-669b15b0ec0a491f169772ac69e96a9970759a36.tar.bz2 | |
Improve already project exists message
Diffstat (limited to 'ihatemoney/forms.py')
| -rw-r--r-- | ihatemoney/forms.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ihatemoney/forms.py b/ihatemoney/forms.py index be04c8f..67f4ec1 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -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)) |
