-
Couldn't load subscription status.
- Fork 382
Enhances I18NCreator for creating Message interfaces from properties #10166
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be in the style of other existing Creator types, so I can't fault it there, but I would generally like the test to be a bit more than 'it can run and doesn't fail in obvious ways' - at a glance, it doesn't even check if the generated sources compile?
A few things to consider below - thank you for getting this patch going again, I'd be inclined to merge it without further additional delay. If you'd like a more rigorous review, I'd be happy to.
user/src/com/google/gwt/i18n/rebind/AbstractLocalizableInterfaceCreator.java
Outdated
Show resolved
Hide resolved
user/src/com/google/gwt/i18n/rebind/MessagesInterfaceCreator.java
Outdated
Show resolved
Hide resolved
user/src/com/google/gwt/i18n/rebind/MessagesInterfaceCreator.java
Outdated
Show resolved
Hide resolved
Currently I18NCreator creates method signatures that only use String
arguments regardless of any MessageFormat that may be present for
an argument. This patch attempts to create more accurate interface
signatures based on the MessageFormat and also includes some GWT
specific formats such as {0,list},{0,localdatetime,..} and Plurals.
This patch also proposes to add the convention {0,safehtml} to mark that
an argument to be of type SafeHtml. If an Argument is found to be of
type SafeHtml the return type of the method will be set to SafeHtml.
Currently I18NCreator creates method signatures that only use String
arguments regardless of any MessageFormat that may be present for
an argument. This patch attempts to create more accurate interface
signatures based on the MessageFormat and also includes some GWT
specific formats such as {0,list},{0,localdatetime,..} and Plurals.
This patch also proposes to add the convention {0,safehtml} to mark that
an argument to be of type SafeHtml. If an Argument is found to be of
type SafeHtml the return type of the method will be set to SafeHtml.
|
Updated with recommendations from comments above. I am not inclined to take on rewriting Creator tests. Let me know if anything else needs updating to current style or implementation guidelines. |
user/src/com/google/gwt/i18n/rebind/MessagesInterfaceCreator.java
Outdated
Show resolved
Hide resolved
user/src/com/google/gwt/i18n/rebind/AbstractLocalizableInterfaceCreator.java
Show resolved
Hide resolved
Currently I18NCreator creates method signatures that only use String
arguments regardless of any MessageFormat that may be present for
an argument. This patch attempts to create more accurate interface
signatures based on the MessageFormat and also includes some GWT
specific formats such as {0,list},{0,localdatetime,..} and Plurals.
This patch also proposes to add the convention {0,safehtml} to mark that
an argument to be of type SafeHtml. If an Argument is found to be of
type SafeHtml the return type of the method will be set to SafeHtml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are passing - approving, will leave it up a day or so for other comment.
Currently I18NCreator creates method signatures that only use String arguments regardless of any MessageFormat that may be present for an argument. This patch attempts to create more accurate interface signatures based on the MessageFormat and also includes some GWT specific formats such as {0,list},{0,localdatetime,..} and Plurals.
This patch also proposes to add the convention {0,safehtml} to mark that an argument to be of type SafeHtml. If an Argument is found to be of type SafeHtml the return type of the method will be set to SafeHtml.
Fixes #9049