History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-13235
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Alexey Kudravtsev
Reporter: Dmitry Cherniachenko
Votes: 3
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

More intelligent i18n handling

Created: 03 Apr 06 11:54   Updated: 16 Jan 07 18:37
Component/s: Editor. Error Highlighting, Editor. Intention Actions
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Duplicate
 
This issue is duplicated by:
IDEA-10579 In properties files highlight some wa... Resolved

Build: 5,201


 Description  « Hide
Here are some issues I've found that could be improved.

1. IDEA should recognize "I18nized expression" configured in File templates and do not prompt to i18nize it's parameters (e.g. default translation can be passed as a second argument - IDEA should not consider it as 'hardcoded text') (I cannot use annotations since target JDK is 1.4).
Also when "I18nized expression" is used with a key that is missed from properties files IDEA should just prompt to add it and do not introduce recursive call, like Translator.getString(Translator.getString("abc")).

2. Instead of suppressing 'hardcoded text' inspection with // noinspection.. comment IDEA should provide intention to insert // NON-NLS comment (or whatever configured in inspection profile).

3. When running "I18nize hard coded string literal" intention IDEA could detect if corresponding property is already present in some file and automatically select the file in combo together with pre-populating property key field with appropriate value. Actually showing the dialog in such cases could even be omitted (if corresponding option is selected in profile).

4. When "adding" a property to a file which already contains it IDEA should not prompt to edit the file unless it will really be changed.

5. Usually a project contains a dozen of .properties files. It will be useful to be able to specify a mask (or even select individual files) for files that should be considered as "i18n data".

6. When editing properties files in IDEA it should highlight improper escaping as warnings and automatically add appropriate slashes when saving. E.g.
'textid=some: text' should become 'textid=some\: text ID', etc. Please, consider the way characters are escaped when using Properties.store() method.

7. Also it would be nice to highlight trailing spaces in properties files values as warnings. Problems arise quite frequently because of extra space in the end of the line.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.