View Issue Details

IDProjectCategoryView StatusLast Update
0002486FreeCADBugpublic2016-07-24 08:59
Reporterpablogil Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMacOSOS XOS Version10.11.3
Fixed in Version0.17 
Summary0002486: Menu "Preferences..." entry changes depending on language
DescriptionIf you use English (default) as your FreeCAD language the "Preferences..." menu entry is located under FreeCAD menu and it allows you to shortcut it with cmd+, but if you have set any other language the menu entry moves under "Edit" menu which is inconsistent, it should be placed inside FreeCAD menu as all OS X apps... or if not possible due to any coding limitation move it to "Edit" so that it is always on the same place.
Additional InformationOS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6665 (Git)
Build type: Unknown
Branch: (detached from f631127)
Hash: f63112778534194e7dbbb681edf159a99acd8802
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
TagsNo tags attached.
FreeCAD Information

Activities

pablogil

2016-03-31 13:00

reporter  

english.png (Attachment missing)

pablogil

2016-03-31 13:00

reporter  

spanish.png (Attachment missing)

pablogil

2016-03-31 13:00

reporter  

spanish_editar.png (Attachment missing)

wmayer

2016-07-17 12:22

administrator   ~0007193

Please check with latest master if this is fixed now.

pablogil

2016-07-18 06:52

reporter   ~0007194

Solved!
Anyway, the word "Preferences..." is showed in English instead of in Spanish: "Preferencias..."

Thanks

wmayer

2016-07-18 07:43

administrator   ~0007195

That the text is now in English might come from the OS itself.

pablogil

2016-07-18 08:41

reporter   ~0007196

I have surfed FreeCAD_es-ES.ts and I think is a simple "space error": now it is written:
    <message>
        <source>&Preferences ...</source>
        <translation>&Preferencias...</translation>
    </message>

While deleting the space between "Preferences" and "..." would detect the text string and translate it. That is:
    <message>
        <source>&Preferences...</source>
        <translation>&Preferencias...</translation>
    </message>

Could it be that?

wmayer

2016-07-19 07:13

administrator   ~0007202

Last edited: 2016-07-19 09:04

No.

Obviously it was translated before setting the menu role of the action to "PreferencesRole".
The source in the C++ indeed says "&Preferences ...", i.e. there is a space in between.

So, you should revert your changes in the .ts file. Then try to replace the "PreferencesRole" with "ApplicationSpecificRole" and check if the text is kept in Spanish.

FYI, in the screenshot the "About FreeCAD" is in Spanish and there we used the "ApplicationSpecificRole" instead of the "AboutRole". Maybe this does the trick.

pablogil

2016-07-19 14:17

reporter   ~0007204

I haven't tried with my own build... I just had a look at the .ts file and thought it was because of the space, because on OSX it has no space.
I have tried the last development build and the issue that opened this bug thread is fixed, do you want me to open a new one in order to solve this "language" problem?

pablogil

2016-07-19 14:18

reporter  

english2.png (Attachment missing)

pablogil

2016-07-19 14:18

reporter  

spanish2.png (Attachment missing)

wmayer

2016-07-20 07:06

administrator   ~0007205

No, there is no need to open a new ticket. When the menu item was part of the Edit menu it was kept in Spanish and it must be an OSX functionality that automatically sets it to English when it becomes part of the OSX menu -- which I guess is expected because your system language is English.

All what we can try is to "outwit" OSX not to replace the menu text. Therefore open the file CommandStd.cpp and go to the function

Action * StdCmdDlgPreferences::createAction(void)
{
    Action *pcAction = Command::createAction();
    pcAction->setMenuRole(QAction::PreferencesRole);
    return pcAction;
}

And replace "PreferencesRole" with "ApplicationSpecificRole". If this doesn't work then there is nothing more we can do. Am I right that you are able to compile the sources yourself?

Btw, when using any other application whose language is set to Spanish how does it show the "Preferences" menu item -- in English or in Spanish?

wmayer

2016-07-24 08:21

administrator   ~0007212

This answers the question how to translate the application menu entries:
https://forum.qt.io/topic/37492/solved-mac-application-menu-items-not-translated

wmayer

2016-07-24 08:59

administrator   ~0007213

Commit 3e1ce240 prepares FreeCAD to translate the OSX application menu. Now it's a matter of doing the actual translation on crowdin.

Related Changesets

FreeCAD: master 2a9be8ab

2016-07-17 14:20:53

wmayer

Details Diff
issue 0002486: Menu 'Preferences...' entry changes depending on language Affected Issues
0002486
mod - src/Gui/CommandStd.cpp Diff File

FreeCAD: master 3e1ce240

2016-07-24 10:56:12

wmayer

Details Diff
translation items of OSX application menu Affected Issues
0002486
mod - src/Gui/Workbench.cpp Diff File

Issue History

Date Modified Username Field Change
2016-03-31 13:00 pablogil New Issue
2016-03-31 13:00 pablogil File Added: english.png
2016-03-31 13:00 pablogil File Added: spanish.png
2016-03-31 13:00 pablogil File Added: spanish_editar.png
2016-07-17 12:21 wmayer Changeset attached => FreeCAD Master master 2a9be8ab
2016-07-17 12:22 wmayer Note Added: 0007193
2016-07-17 12:22 wmayer Assigned To => wmayer
2016-07-17 12:22 wmayer Status new => feedback
2016-07-18 06:52 pablogil Note Added: 0007194
2016-07-18 06:52 pablogil Status feedback => assigned
2016-07-18 07:43 wmayer Note Added: 0007195
2016-07-18 07:43 wmayer Status assigned => closed
2016-07-18 07:43 wmayer Resolution open => fixed
2016-07-18 07:43 wmayer Fixed in Version => 0.17
2016-07-18 08:41 pablogil Note Added: 0007196
2016-07-18 08:41 pablogil Status closed => feedback
2016-07-18 08:41 pablogil Resolution fixed => reopened
2016-07-19 07:13 wmayer Note Added: 0007202
2016-07-19 09:04 wmayer Note Edited: 0007202
2016-07-19 14:17 pablogil Note Added: 0007204
2016-07-19 14:17 pablogil Status feedback => assigned
2016-07-19 14:18 pablogil File Added: english2.png
2016-07-19 14:18 pablogil File Added: spanish2.png
2016-07-20 07:06 wmayer Note Added: 0007205
2016-07-24 08:21 wmayer Note Added: 0007212
2016-07-24 08:57 wmayer Changeset attached => FreeCAD Master master 3e1ce240
2016-07-24 08:59 wmayer Note Added: 0007213
2016-07-24 08:59 wmayer Status assigned => closed
2016-07-24 08:59 wmayer Resolution reopened => fixed