View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002102 | JEDI VCL | 00 JVCL Components | public | 2004-08-27 15:53 | 2004-10-22 14:18 |
Reporter | bgn | Assigned To | user72 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | not fixable | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0002102: TjvTranslator and ActionBars problem | ||||
Description | When using the Translator component and you have for example a ActionMainMenuBar item the generated xml file isn't valid. Then tags contains invalid tags. I.e. <ActionBar ->ActionMainMenuBar1, or <&Edit. When you try to read back the translated xml the load fails. | ||||
Additional Information | I've made a minimal test program to demonstrate the problem. Press Create Language File to create the lang.xml file. Press Load Language file (this will fail silently). And press Xml Load to get a visual error message. | ||||
Tags | No tags attached. | ||||
2004-08-27 15:53
|
TranslateProblem.zip (4,827 bytes) |
|
You should switch to using dxgettext (http://dxgettext.sf.net) which is also supported by JVCL. |
|
The problem is caused by the actionbar component settings its DisplayName to "ActionBar -> SomeActionBarName" and the spaces creates an invalid xml tag (or, rather, the "->" and "SomeActionBarName" are parsed as properties without values which are invalid in xml). TJvTranslator cannot handle that. |
|
Ok. So if i want to use ActionBars/ActionMenus i can't use TJvTranslator ? The dxget software looks intresting. I will try that. |
|
> Ok. So if i want to use ActionBars/ActionMenus i can't use TJvTranslator ? Well, you could massage the CollectionToXML procedure to "fix" the DisplayName so it represents a valid XML tag name (f ex removing the first "ActionBar -> " part). |
|
I did a test where I massaged the TagName in the TJvSimpleXml parser. I.e. replaced ' ' with 0000032 and '&' with #26 and restored them when reading the xml file. So far so good. I could no save/read the xml data ok. But it seems that the TJvTranslator can't handle the actionbars anyway. Did a test and removed some of the menu's and tried to rename the 'File' menu. But no luck. So I guess if I want to be able to change the menu's I have to use something else (The dxgettext doesn't adress this). |
|
I'd go with dxgettext if it was me. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-08-27 15:53 | bgn | New Issue | |
2004-08-27 15:53 | bgn | File Added: TranslateProblem.zip | |
2004-08-31 04:56 |
|
Note Added: 0005117 | |
2004-08-31 05:44 |
|
Note Added: 0005118 | |
2004-08-31 06:38 | anonymous | Note Added: 0005119 | |
2004-08-31 07:11 |
|
Note Added: 0005120 | |
2004-09-01 14:47 | anonymous | Note Added: 0005136 | |
2004-09-02 01:10 |
|
Note Added: 0005139 | |
2004-10-22 14:18 |
|
Status | new => resolved |
2004-10-22 14:18 |
|
Resolution | open => not fixable |
2004-10-22 14:18 |
|
Assigned To | => user72 |