This repository has been archived by the owner on May 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Translations: Fields on a form get untranslatable ' field' appended to validation errors #1135
Labels
Comments
I have the same bug. Is there a solution? My customer want quick a clean validation message :) my client site is already in production. Thanks in advanced! |
Is this bug already solved? It shows really a bad validation message in other translations than english. |
But in your message ":attribute" is substituted with "Name field" ... and the word "field" is english language. I couldn't find another place to translate the word "field". Normally it should only translate with "Name" instead of "Name field". Excuse my rough and raw english (I don't speak and write english often). I appreciate your work and when something sounds impolite or ironic: THAT IS NOT INTENDED :) |
Hah, yes it's obvious now. Got it! Thanks. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected behaviour
When I add a new language and add translations for validation rules, I expect to see a translated text on the validation error message.
Actual behaviour
I see my translated validation message, but the field labels all have ' field' appended to them.
Steps to reproduce
Server configuration
Operating system:
Linux Mint 17
Web server:
Apache 2.4
PHP version:
PHP 7.0
Statamic version:
Statamic 2.1.16
Updated from an older Statamic or fresh install:
Fresh install
Cause
This unexpected behavior is caused by the 'Submission' (
core/Form/Submission.php
) class appending ' field' (Line218
) to every form field.Comment states this is to define a friendly name for form fields, but it also causes validation messages to not be properly translatable.
The text was updated successfully, but these errors were encountered: