Bug 107308 - [nls tooling] Add perference to Externalization wizard to not sort keys
Summary: [nls tooling] Add perference to Externalization wizard to not sort keys
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P4 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 69995 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-18 04:09 EDT by Markus Wurm CLA
Modified: 2010-05-18 10:31 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Wurm CLA 2005-08-18 04:09:23 EDT
Situation
     We are developing a multilingual program in English.
     We do the German translation ourselves as we are German speakers.
     For the translations we use the wizard.
     We use one central property file for the application

Problem
     Since Eclipse 3.0 the wizard adds the new translated properties
anywhere in the file (and not at the end as in 2.1). So for us it is not
possible to copy the new English externalizations in the German file and
translate them. This way it is impossible to add the new German translations
by hand. The consequence is that we do not use the wizard anmore, and
externalize manually at the file end :-(

Questions
- Is this a bug, or did it happen on purpose?   
- Is there a possibility to configure the wizard to add the new
translations at the end again?
   - Do you have any suggestions how we shall change the way we externalize
to resolve this problem?
Comment 1 Jerome Lanneluc CLA 2005-08-18 04:11:34 EDT
Moving to JDT UI
Comment 2 Dirk Baeumer CLA 2005-08-18 04:21:43 EDT
This change is by design. The new key/value pairs are inserted alphabetically
using the key (which IMO makes more sense than simply adding them at the end).
This will keep group of keys together.
Comment 3 Dani Megert CLA 2005-08-18 04:51:44 EDT
Questions
- Is this a bug, or did it happen on purpose? 
By design. Happened a long time ago (3.0 I think)
- Is there a possibility to configure the wizard to add the new
translations at the end again?
No.
>- Do you have any suggestions how we shall change the way we externalize
>to resolve this problem?
No, except to switch to the new Eclipse NLS mode
(http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-core-home/documents/3.1/message_bundles.html),
which is currently unsorted but might be sorted in the future as well (see bug
89503).


Comment 4 Dani Megert CLA 2006-03-21 05:35:52 EST
*** Bug 69995 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2007-07-30 02:24:04 EDT
*** Bug 197999 has been marked as a duplicate of this bug. ***
Comment 6 gillesGaillard CLA 2010-05-18 10:31:48 EDT
Here are a couple of reasons why sorting should not happen:
- as suggested by Markus, leaving unsorted makes easier maintenance tasks when resources are added, removed
- for the persons actually performing the translation, it is often helpful that resources related to the same context stay grouped together. 

On the other hand, it is practical that all keys with the same prefix are grouped.

Therefore what would be the ideal for me is the following:
- inside a file, resources are grouped by their prefix
- inside each group, keys are left unsorted
- when the resource file is created, resource groups are sorted by the prefix (if any)
- completing an existing resource file: add new resource to existing group if it exists, otherwise insert the new group where it should.