Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

String 'field' hardcoded in Form validation - bad for translations #1347

Closed
manogi opened this issue Mar 24, 2017 · 0 comments
Closed

String 'field' hardcoded in Form validation - bad for translations #1347

manogi opened this issue Mar 24, 2017 · 0 comments

Comments

@manogi
Copy link

manogi commented Mar 24, 2017

I don't know if this is a feature request - it certainly is no "Bug", but it is difficult for websites that are not in English:

You hardcoded the string "field" in the validate() method in core/Forms/Submission.

That makes it impossible to use the translation file validation.php to properly translate the validation error messages, because "field" sticks in there.

For example: my validation error is now:
"E-Mail field ist benötigt."

I would propose to leave that out there completely and let the translations handle the messages completely - of course that would be bad for people relying on that "field" there. Maybe you could kick the "field" string out of the method and make sure to add it in the translation files where is is needed after the :attribute ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants