Opened 16 years ago
Closed 15 years ago
#3698 closed New Feature (fixed)
CKLangTool should sort language entries
Reported by: | Wiktor Walc | Owned by: | Wiktor Walc |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Project : CKPackager | Version: | |
Keywords: | Confirmed Review+ | Cc: |
Description
(as the title says)
Attachments (4)
Change History (10)
comment:1 Changed 15 years ago by
Milestone: | CKEditor 3.0 → CKEditor 3.1 |
---|
Changed 15 years ago by
Attachment: | 3698.patch added |
---|
Changed 15 years ago by
Attachment: | test_assets.zip added |
---|
comment:2 Changed 15 years ago by
Keywords: | Review? added |
---|
comment:3 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Milestone: | CKEditor 3.1 |
I'm afraid we have a big misunderstanding here. I think the ticket has been originally created for a very small thing, to have the _translationstatus.txt file entries ordered alphabetically, so we avoid changes like this: [4564/CKEditor/trunk/_source/lang/_translationstatus.txt].
The feature that's being proposed instead is about the entries in the files, which is definitely something not to be done. The entries in the en.js file are added in a certain logical order and that order must not change. For example, we leave "width" and "height" together because they refer to the same kind of thing... dialog titles are in the beginning of their lang blocks, etc.
All this shows us that "(as the title says)" is something really bad to have in the ticket description.
Changed 15 years ago by
Attachment: | 3698_2.patch added |
---|
comment:4 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
The attached patch contains code that sorts lines with translation status before saving them to _translationstatus.txt.
Changed 15 years ago by
Attachment: | langtool.jar added |
---|
comment:5 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
Few words about new patch..
Previously en.js was used as a template, all language files were constructed just like the English translation, including spacing (tabs, multiple spaces, new lines etc.).
In the new CKLangTool version also the English file is modified. It means that is no longer used as a template (per se), but only as a source of language entries.
Inline and block comments are detected and assigned to the nearest language entry. It means that in current en.js file, the following part of file:
will be changed into:
so be careful when adding comments.
As a result of sorting, note that two special entries in language files:
are sorted just like the other entries and are no longer at the top.