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|
|Target Version||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:
Other translations where the dynamic links do work:
- Russian (incomplete translation, some English remains)
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.|
||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:
"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:
t = s.getvalue()
||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!|
|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|