Skip to content

Update messages_it.js and dateITA.js for italian localization #1326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

OmbraDiFenice
Copy link
Contributor

I changed a little the messages to make them less "perentorial".

I also changed the error message used in dateITA to use the one defined in the current "messages" object, so that if messages_it.js is loaded the error message is localized correctly.

It looks ugly to see a full stop at the end of an error message, and it is worse if the message is used in dynamic context (e.g. in a kind of popup message like a tooltip)
Use the default (possibly localized) error message when a wrong ITA date is used instead of using a static message to improve flexibility
@jzaefferer
Copy link
Collaborator

Thanks for the PR. If I understand this correctly, you removed the dot at the end of each message, right? That by itself seems reasonable, though the default messages and most of the other translations still use the dot. I wonder if the inconsistency will be more problematic then the current "perentorial" form (I'm not sure what that word means, though, seems like a mix of italian and english?).

The other change is also good, though should also be applied consistently, at least for the other date methods.

What do you think?

@OmbraDiFenice
Copy link
Contributor Author

You're right, "perentorial" seem not to be an english word. According to google translate I should have said something like "final" or "imperative". Sorry about that.

I agree with you about the consistency concerns. This is why I decided to change make those changes:

  • The messages can be changed that way because probably different languages (and therefore cultures) may not intend the final dot in the same way. This is just a matter of "common feeling".
    The problem arises when the plugin is used in a page that is provided in many different languages: in that case the presence of the final dot in some localization and its absence in others could lead to some layout differences. Probably the choice to include it or not depends on the typical use of this plugin.
    Personally I think that having a dot at the end of an error message is not required, since the message itself is not supposed to belong to any complex sentence. For instance in my code I displayed the message in a jqueryui tooltip, and the final dot looked completely out of context (and a bit ugly too).
  • The reason of the other change is obvious, and I completely agree with you about the need of a consistent change throughout the code. I just changed that method because I was working with it and noticed the "language inconsistency", so I looked up the code and made the fix. I didn't had the time to go through the other methdos (and to understand the underlying implementation of the plugin to see if there were other places to fix), but still I wanted to share what I did.

@jzaefferer
Copy link
Collaborator

Since there were never any complaints about the dot before, I'm not sure if others are fine with them or just changing the messages as needed. I agree that they don't make a lot of sense in those sentence fragments. Also it looks like the date method is the only one with custom implementations in additionals. So I'll go ahead and land your PR as is and update the other two methods to also use the existing message.

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

Successfully merging this pull request may close these issues.

2 participants