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

Bug 327924

Summary: Localization Files Editor allows users to create keys with spaces
Product: z_Archived Reporter: Vinicius Hernandes <xrgc84>
Component: SequoyahAssignee: Project Inbox <localization.sequoyah-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ericc, kpqb38, nkvg64, wmg040
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix for this bug
wmg040: iplog+
Little change in the fix for this bug wmg040: iplog+

Description Vinicius Hernandes CLA 2010-10-15 13:24:28 EDT
Build Identifier: 

LFE allows users to create keys with spaces in the name, resulting in a R.java error for Android applications.

Reproducible: Always
Comment 1 Vinicius Hernandes CLA 2010-10-18 07:56:12 EDT
Created attachment 181085 [details]
Fix for this bug

A new abstract method was added to ILocalizationSchema  [boolean keyAcceptsBlankSpaces()]. All localization schemas must implement this method, returning true if keys with blank spaces are permitted in that schema or false otherwise. The "New key" dialog was also modified to validate that accordingly, displaying a message to the user in case the key has blank spaces but it's not permitted.
Comment 2 Vinicius Hernandes CLA 2010-10-18 11:33:59 EDT
Created attachment 181106 [details]
Little change in the fix for this bug

Adding a default implementation for keyAcceptsBlankSpaces() returning false as the default. This way, new localization schemas don't need to implement that, they only override the method if they want to change the default behavior. Additionally, it doesn't break the API for existent localization schemas either.
Comment 3 Eric Cloninger CLA 2011-01-19 13:28:52 EST
+1 from Eric Cloninger
Comment 4 Marcel Gorri CLA 2011-01-20 10:44:32 EST
Fix already integrated on trunk and on branch 3.6_SR.