View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000654 | FreeCAD | Bug | public | 2012-03-25 21:24 | 2012-03-28 10:58 |
Reporter | normandc | Assigned To | yorik | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.13 | ||||
Summary | 0000654: FreeCAD Start Center dynamic links not working on some translations | ||||
Description | The Start Center has dynamic links in separate text blocks. Under "Start a new project", hovering the mouse cursor over the "PartDesign" link shows content-specific text and image to the far right, as shown in attached screen capture. The problem is with translations. In French, these dynamic links don't work in the "Stark a new project" block, and only one works in the "On the web" block. But they work in the "Recent files" block. Other translations where the dynamic links do not work: - Italian Other translations where the dynamic links do work: - Chinese - Croatian - Dutch - Portuguese - Russian (incomplete translation, some English remains) - Swedish Other languages not listed do not have translations for these text strings, English is used and appears correctly. | ||||
Additional Information | Steps to reproduce - Go to Edit --> Preferences/General/General - Set Auto load module at start up to Start - Change the language - Restart FreeCAD FreeCAD 0.13-git201203231848~oneiric1 (but all FreeCAD versions since v0.12 are affected) | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
2012-03-25 21:25
|
|
2012-03-25 21:25
|
|
|
Oh, good that you remembered this one, as always, I had totally forgotten. I suspect some problem with quotes... |
|
I assume it's a problem with Unicode strings. In the StartPage.py script there is the function show() and this fails if theText contains e.g. accents. |
|
Aah, that must be it. I'll see how to fix. Thanks for looking Werner! |
|
No, Unicode is not the problem. I checked various examples with umlauts and other non-ASCII characters. The actual problem is an apostrophe because it seems that JS interprets this as end of string and thus may have some parsing trouble. The trick is to mark an apostrophe with a special escape sequence. Here is the modified translate() function: def translate(context,text): "convenience function for the Qt translator" u = QtGui.QApplication.translate(context, text, None, QtGui.QApplication.UnicodeUTF8).toUtf8() s = cStringIO.StringIO() for i in u: if ord(i) == 39: s.write("\\'") else: s.write(i) t = s.getvalue() s.close() return t |
|
Okay I think it's fixed now (commit 54f8375). I'll wait for Normand to test before closing... |
|
I confirm that it's fixed in the latest PPA (0.13-git201203272322~oneiric1). Thanks Yorik! |
|
Hurray, one more bug closed! Thanks for the solution Werner! |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-03-25 21:24 | normandc | New Issue | |
2012-03-25 21:25 | normandc | File Added: FCStartCenter-en.jpg | |
2012-03-25 21:25 | normandc | File Added: FCStartCenter-fr.jpg | |
2012-03-25 22:32 | yorik | Note Added: 0001815 | |
2012-03-25 22:32 | yorik | Status | new => assigned |
2012-03-25 22:32 | yorik | Assigned To | => yorik |
2012-03-26 18:22 | wmayer | Note Added: 0001819 | |
2012-03-26 18:24 | yorik | Note Added: 0001820 | |
2012-03-27 10:36 | wmayer | Note Added: 0001821 | |
2012-03-27 13:38 | yorik | Note Added: 0001822 | |
2012-03-28 02:21 | normandc | Note Added: 0001823 | |
2012-03-28 10:57 | yorik | Note Added: 0001824 | |
2012-03-28 10:58 | yorik | Status | assigned => closed |
2012-03-28 10:58 | yorik | Resolution | open => fixed |
2012-03-28 10:58 | yorik | Fixed in Version | => 0.13 |