Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Code::Blocks' translation

<< < (25/57) > >>

gd_on:
You are certainly right. These setting must not be translated here.

In the code, I think its in src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp at lines 210, 212 or 214, they are initialized with the macro _, which means they can be translated, which is normal if it's used only to identify a button or something else to be displayed in the graphic user interface. Obviously, it's also used to generate code, and of course, it must not be translated. The author of this plugin should probably use here the macro _T and not _.
In the next French version, I will correct this (in fact do a workaround), simply by duplicating the English words in the French translation.

Thanks for having pointed this problem.

gd_on

MortenMacFly:

--- Quote from: gd_on on January 27, 2009, 09:42:05 am ---I think its in src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp at lines 210, 212 or 214

--- End quote ---
This is not it. This code is in no way releated to the class wizard. Nevertheless - the line of code you are referring to is here:
classwizarddlg.cpp, line 321:

--- Code: ---    m_AncestorScope    = XRCCTRL(*this, "cmbInheritanceScope", wxComboBox)->GetValue();

--- End code ---
classwizarddlg.cpp, line 435-438:

--- Code: ---    if (m_Inherits)
    {
        buffer << _T(" : ") << m_AncestorScope << _T(" ") << m_Ancestor;
    }

--- End code ---
As you see: The name is obtained via XRC. In fact I have no idea why it gets translated...?!

BTW: I realised that the class wizard features certain dialogs (message boxes) without translation - but that's another story... ;-)

Jenna:

--- Quote from: MortenMacFly on January 27, 2009, 11:06:39 am ---As you see: The name is obtained via XRC. In fact I have no idea why it gets translated...?!

--- End quote ---

Because the .xrc have been scanned  with wxrc to find textes to translate and they got translated.

The same happened for other keywords:


--- Quote ---#: plugins_xrc.cpp:63
msgid "private"
msgstr "privé"

--- End quote ---


--- Quote ---#: plugins_xrc.cpp:62
msgid "protected"
msgstr "protégé"

--- End quote ---


--- Quote ---#: plugins_xrc.cpp:61
msgid "public"
msgstr "publique"

--- End quote ---


--- Quote from: gd_on on January 27, 2009, 09:42:05 am ---In the next French version, I will correct this (in fact do a workaround), simply by duplicating the English words in the French translation.

--- End quote ---

If I remember right, it should be enough to leave the translated part (msgstr) empty.

By the way, this one is much more dangerous, because it breaks layout saving and/or loading:

--- Quote ---#: ../src/main.cpp:1238
#: ../src/main.cpp:1257
msgid "state=%d"
msgstr "État = %d"

--- End quote ---

MortenMacFly:

--- Quote from: jens on January 27, 2009, 11:43:24 am ---Because the .xrc have been scanned  with wxrc to find textes to translate and they got translated.

--- End quote ---
WTF... And I guess there is no way in a XRC file to exclude strings from translation, right?! Or can I use the _() and _T() macros there, too?!

In any ways: If I use e.g. xrced I don't see an option accordingly - so in practice it would mean hand crafted manipulation. :-(

stahta01:

--- Quote from: MortenMacFly on January 27, 2009, 11:51:41 am ---
--- Quote from: jens on January 27, 2009, 11:43:24 am ---Because the .xrc have been scanned  with wxrc to find textes to translate and they got translated.

--- End quote ---
WTF... And I guess there is no way in a XRC file to exclude strings from translation, right?! Or can I use the _() and _T() macros there, too?!

In any ways: If I use e.g. xrced I don't see an option accordingly - so in practice it would mean hand crafted manipulation. :-(

--- End quote ---

From http://biolpc22.york.ac.uk/wx/docs/html/faqcmn.htm#xrclocale

--- Quote ---translate="0" attribute in XRC files
--- End quote ---
Turns it off for whole xrc file which might work sometime. But, most likely not all the time.
Tim S

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version