Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333122

Summary: Re-work localization system
Product: z_Archived Reporter: Konstantin Komissarchik <konstantin>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: ling.hao
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2010-12-22 18:24:57 EST
Sapphire localization story is spread over a few different places with similar, but slightly different approaches. This bug tracks creating a single API to consolidate all of those use cases.
Comment 1 Konstantin Komissarchik CLA 2011-01-04 19:35:11 EST
Localization support has been significantly improved. Without going too deep into API changes, there is a new @Localizable annotation that can be applied to fields of annotations or model properties. This annotation serves as a signal at build-time to the automatic externalizer. The improves extensibility of the externalizer as the items to externalize are no longer hardcodded.

The externalizer now use SHA-256 algorithm for generating resource file keys. This replaces two separate less effective approaches.

The samples now include localization fragments for a non-existing language that can be used to test localizability. The fragments are generated during Sapphire build by reversing all externalized strings. To test localizability, install samples, launch Eclipse with "-nl re" switch and open any sample editor or dialog (such as the contacts database editor).
Comment 2 Ling Hao CLA 2011-01-06 14:22:49 EST
Verified localization of re fragment and the automatic exteranlizer.

It is not clear to me what the @Localizable annotation does. The generated property file looks the same with and without the annotation. More details in the docs?