[Solved] Bug #2609 ship worbench doen't work in spanish menu

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

[Solved] Bug #2609 ship worbench doen't work in spanish menu

Post by Kunda1 »

issue #2609 Posting here to generate conversation
Last edited by Kunda1 on Thu Aug 17, 2017 2:08 am, edited 1 time in total.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
wmayer
Founder
Posts: 20113
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by wmayer »

It's still a problem. When e.g. trying in German then I get this error message:
Traceback (most recent call last):
File "C:\Projects\FreeCAD-git\ReleaseOCC\Mod\Ship\shipCreateShip\TaskPanel.py", line 53, in accept
Locale.fromString(form.draft.text()))
File "C:\Projects\FreeCAD-git\ReleaseOCC\Mod\Ship\shipCreateShip\Tools.py", line 57, in createShip
ship = Instance.Ship(obj, solids)
File "C:\Projects\FreeCAD-git\ReleaseOCC\Mod\Ship\Instance.py", line 47, in __init__
None))
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\xfc' in position 20: ordinal not in range(128)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by Kunda1 »

wmayer wrote:It's still a problem. When e.g. trying in German then I get this error message:
Traceback (most recent call last):
File "C:\Projects\FreeCAD-git\ReleaseOCC\Mod\Ship\shipCreateShip\TaskPanel.py", line 53, in accept
Locale.fromString(form.draft.text()))
File "C:\Projects\FreeCAD-git\ReleaseOCC\Mod\Ship\shipCreateShip\Tools.py", line 57, in createShip
ship = Instance.Ship(obj, solids)
File "C:\Projects\FreeCAD-git\ReleaseOCC\Mod\Ship\Instance.py", line 47, in __init__
None))
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\xfc' in position 20: ordinal not in range(128)
@wmayer then if you don't mind, lets rename issue #2609 to reflect that it's not just an issue in Spanish? Also if you could move this thread to the 'Developers' sub-forum instead?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
a.palazzi
Posts: 8
Joined: Sat Jul 29, 2017 9:12 am

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by a.palazzi »

Hi,

I've replaced all the str() calls in the Ship module with calls to unicode(), this fixes the problem; there seems to be other issues however, I'll try to also fix them.
I'm not too used to the pull request tool, so I've prepared a patch.

Bye,
Andrea
Attachments
0001-Replaced-str-with-unicode-in-Ship-module-fixes-2609.txt
(6.09 KiB) Downloaded 66 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by Kunda1 »

a.palazzi wrote: Sat Jul 29, 2017 9:19 am Hi,

I've replaced all the str() calls in the Ship module with calls to unicode(), this fixes the problem; there seems to be other issues however, I'll try to also fix them.
I'm not too used to the pull request tool, so I've prepared a patch.

Bye,
Andrea
Thanks Andrea!
yorik wrote:ping
just giving @yorik a heads up ;)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by Kunda1 »

Submitted patch as PR 906
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by Kunda1 »

a.palazzi wrote: Sat Jul 29, 2017 9:19 am Hi,

I've replaced all the str() calls in the Ship module with calls to unicode(), this fixes the problem; there seems to be other issues however, I'll try to also fix them.
I'm not too used to the pull request tool, so I've prepared a patch.

Bye,
Andrea
@a.palazzi FYI patch was merged in git commit 7f4d089715efb2e662
Got any more patches? :)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
a.palazzi
Posts: 8
Joined: Sat Jul 29, 2017 9:12 am

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by a.palazzi »

Hi,

no more patches - tested yesterday, this one fixes #2609 without other issues.

Bye
Andrea
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by Kunda1 »

@a.palazzi i was refferring to this:
a.palazzi wrote: Sat Jul 29, 2017 9:19 am I've replaced all the str() calls in the Ship module with calls to unicode(), this fixes the problem; there seems to be other issues however, I'll try to also fix them.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
a.palazzi
Posts: 8
Joined: Sat Jul 29, 2017 9:12 am

Re: Bug #2609 ship worbench doen't work in spanish menu

Post by a.palazzi »

Kunda1 wrote: Sat Aug 12, 2017 11:56 am @a.palazzi i was refferring to this:
a.palazzi wrote: Sat Jul 29, 2017 9:19 am I've replaced all the str() calls in the Ship module with calls to unicode(), this fixes the problem; there seems to be other issues however, I'll try to also fix them.
Yes; the fact is that after replacing all the str() calls I tested it and got another, different error. However, when some days later I tested it again, it worked fine and couldn't reproduce the issue.
I finally re-tested it by downloading the binary with my fix from the site, and again I couldn't reproduce the issue, so it seems to work properly as it is.

Bye
Andrea
Post Reply