Bug 257363

Summary: [localization]: localization constants must be generated in uppercase
Product: [Tools] MTJ (Archived) Reporter: Gustavo de Paula <wgp010>
Component: UIAssignee: Diego Madruga Sandin <wds057>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dsdp.mtj-inbox, wds057, wtv368
Version: 0.9Keywords: core, ui
Target Milestone: 0.9.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 257362    
Bug Blocks:    
Attachments:
Description Flags
Patch with bug resolution none

Description Gustavo de Paula CLA 2008-12-03 07:58:32 EST
currently all constants are generated in lower case. this might cause issue with the developer set the constant id to some java reserved word, such as private
Comment 1 David Marques CLA 2008-12-09 11:16:23 EST
Hello everyone,

I am taking a look at this bug. I will soon attach a patch with the resolution.

[],

David Marques
Comment 2 David Marques CLA 2008-12-09 12:38:18 EST
Created attachment 119934 [details]
Patch with bug resolution

Hello everyone,

I am attaching a patch with this bug resolution.

[],

David Marques
Comment 3 Diego Madruga Sandin CLA 2008-12-09 16:23:19 EST
If the user add in one locale the key "key1" and in other "Key1" the generated L10nConstants, will have duplicated KEY1 constants.

Shouldn't it be better to append an "_" before the constant name and keep it the in the same case of the key available in the location data file, for example, for the keys "key1" and "Key1", create the "_key1" and "_Key1" constants?


(In reply to comment #2)
> Created an attachment (id=119934) [details]
> Patch with bug resolution
> 
> Hello everyone,
> 
> I am attaching a patch with this bug resolution.
> 
> [],
> 
> David Marques
> 

Comment 4 Gustavo de Paula CLA 2008-12-10 12:06:26 EST
i think it make more sense that constants are not case sensitive. at least a never saw / used case sensitive constants on any midlet.

when keys are added on the location editor we should be able to validate that and make sure that the constants are not duplicated.

:)
gep

(In reply to comment #3)
> If the user add in one locale the key "key1" and in other "Key1" the generated
> L10nConstants, will have duplicated KEY1 constants.
> 
> Shouldn't it be better to append an "_" before the constant name and keep it
> the in the same case of the key available in the location data file, for
> example, for the keys "key1" and "Key1", create the "_key1" and "_Key1"
> constants?
> 
> 
> (In reply to comment #2)
> > Created an attachment (id=119934) [details] [details]
> > Patch with bug resolution
> > 
> > Hello everyone,
> > 
> > I am attaching a patch with this bug resolution.
> > 
> > [],
> > 
> > David Marques
> > 
> 

Comment 5 Gustavo de Paula CLA 2008-12-10 13:04:32 EST
is current patch valid?


(In reply to comment #4)
> i think it make more sense that constants are not case sensitive. at least a
> never saw / used case sensitive constants on any midlet.
> 
> when keys are added on the location editor we should be able to validate that
> and make sure that the constants are not duplicated.
> 
> :)
> gep
> 
> (In reply to comment #3)
> > If the user add in one locale the key "key1" and in other "Key1" the generated
> > L10nConstants, will have duplicated KEY1 constants.
> > 
> > Shouldn't it be better to append an "_" before the constant name and keep it
> > the in the same case of the key available in the location data file, for
> > example, for the keys "key1" and "Key1", create the "_key1" and "_Key1"
> > constants?
> > 
> > 
> > (In reply to comment #2)
> > > Created an attachment (id=119934) [details] [details] [details]
> > > Patch with bug resolution
> > > 
> > > Hello everyone,
> > > 
> > > I am attaching a patch with this bug resolution.
> > > 
> > > [],
> > > 
> > > David Marques
> > > 
> > 
> 

Comment 6 David Marques CLA 2008-12-10 13:19:49 EST
Hi guys,

The patch itself generates all keys in upper case. Although it does not validate user entry on the editor.

[],

David Marques

(In reply to comment #5)
> is current patch valid?
> 
> 
> (In reply to comment #4)
> > i think it make more sense that constants are not case sensitive. at least a
> > never saw / used case sensitive constants on any midlet.
> > 
> > when keys are added on the location editor we should be able to validate that
> > and make sure that the constants are not duplicated.
> > 
> > :)
> > gep
> > 
> > (In reply to comment #3)
> > > If the user add in one locale the key "key1" and in other "Key1" the generated
> > > L10nConstants, will have duplicated KEY1 constants.
> > > 
> > > Shouldn't it be better to append an "_" before the constant name and keep it
> > > the in the same case of the key available in the location data file, for
> > > example, for the keys "key1" and "Key1", create the "_key1" and "_Key1"
> > > constants?
> > > 
> > > 
> > > (In reply to comment #2)
> > > > Created an attachment (id=119934) [details] [details] [details] [details]
> > > > Patch with bug resolution
> > > > 
> > > > Hello everyone,
> > > > 
> > > > I am attaching a patch with this bug resolution.
> > > > 
> > > > [],
> > > > 
> > > > David Marques
> > > > 
> > > 
> > 
> 

Comment 7 David Marques CLA 2008-12-15 14:10:11 EST
Comment on attachment 119934 [details]
Patch with bug resolution

This patch is obsolete.
Comment 8 Diego Madruga Sandin CLA 2008-12-16 07:34:18 EST
This bug was fixed in bug 257362.
Comment 9 Gustavo de Paula CLA 2008-12-30 14:23:59 EST
bug released into 0.9.1