Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Error messages shown on submit are non-understandable as compared to those on blur of field #20

Closed
diatoz opened this issue Apr 8, 2015 · 3 comments
Labels

Comments

@diatoz
Copy link

diatoz commented Apr 8, 2015

erroronblur

This is the error message on blur of the first field field and it is quite understandable as it reflects the error value as would have been mentioned in the locale file

errorsonsubmit

But here on submit when the errors are shown they do not reflect the locale file value. Does angular-translate fail for erros on submit but works on blur?

@ghiscoding
Copy link
Owner

I still seem to have timing issues with the locale loading, the load seem to happen to late and the errors are not yet translated. The locale translation seems to be loaded synchronously rather than asynchronously, which means that the JSON file is not yet parsed while the errors are displayed. I did lot of adjustments to remove that behavior but still can't get rid of it completely. I would love to have some help on the subject.

And by the way, this is mostly happening on the Plunker demo but very rarely on your web server itself, the plunker is very slow to get the JSON files since the files are not locale to the plunker but rather linked to my Github, it's a very slow process and this is where all the problems are showing. Run it on your local server and you shouldn't see the problems.

@diatoz
Copy link
Author

diatoz commented Apr 9, 2015

You are right. I have run the example on my locale and this issue is not reproduced so its fair enough to say that this won't cause any problem when the code is moved to a server.
Thanks.

@diatoz diatoz closed this as completed Apr 9, 2015
@ghiscoding ghiscoding reopened this Apr 20, 2015
@ghiscoding
Copy link
Owner

I now believe that I finally fixed this issue, next code merge will fix this

@ghiscoding ghiscoding added the bug label Apr 20, 2015
ghiscoding added a commit that referenced this issue Apr 20, 2015
- Fixed issue #20: Error messages shown on submit are
non-understandable, this was fixed using $translate promises instead of
$translate.instant().
- Fixed a few error display on the validationSummary() and
checkFormValidity().
- Merged #27 to add Russian and added it to the main page selection of
language
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants