Bug 257363 - [localization]: localization constants must be generated in uppercase
Summary: [localization]: localization constants must be generated in uppercase
Status: CLOSED FIXED
Alias: None
Product: MTJ (Archived)
Classification: Tools
Component: UI (show other bugs)
Version: 0.9   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.1   Edit
Assignee: Diego Madruga Sandin CLA
QA Contact:
URL:
Whiteboard:
Keywords: core, ui
Depends on: 257362
Blocks:
  Show dependency tree
 
Reported: 2008-12-03 07:58 EST by Gustavo de Paula CLA
Modified: 2008-12-30 14:23 EST (History)
3 users (show)

See Also:


Attachments
Patch with bug resolution (905 bytes, patch)
2008-12-09 12:38 EST, David Marques CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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