Developer forums (C::B DEVELOPMENT STRICTLY!) > Compiler Framework Redesign
XML based compilers
Alpha:
--- Quote from: gd_on on October 28, 2013, 10:39:07 am ---I tried your patch but I obtain a compilation error : [...]
--- End quote ---
I wonder why it worked for me then...
Try this:
--- Code: ---Index: src/plugins/compilergcc/compilerXML.cpp
===================================================================
--- src/plugins/compilergcc/compilerXML.cpp (revision 9423)
+++ src/plugins/compilergcc/compilerXML.cpp (working copy)
@@ -15,7 +15,7 @@
#include "compilerXML.h"
CompilerXML::CompilerXML(const wxString& name, const wxString& ID, const wxString& file)
- : Compiler(name, ID), m_fileName(file)
+ : Compiler(wxGetTranslation(name), ID), m_fileName(file)
{
wxXmlDocument compiler;
compiler.Load(m_fileName);
Index: src/sdk/compiler.cpp
===================================================================
--- src/sdk/compiler.cpp (revision 9423)
+++ src/sdk/compiler.cpp (working copy)
@@ -963,12 +963,12 @@
wxString exclusive;
if (!node->GetAttribute(wxT("exclusive"), &exclusive))
exclusive = (exclu ? wxT("true") : wxT("false"));
- m_Options.AddOption(node->GetAttribute(wxT("name"), wxEmptyString),
+ m_Options.AddOption(wxGetTranslation(node->GetAttribute(wxT("name"), wxEmptyString)),
node->GetAttribute(wxT("option"), wxEmptyString),
- category,
+ wxGetTranslation(category),
node->GetAttribute(wxT("additionalLibs"), wxEmptyString),
node->GetAttribute(wxT("checkAgainst"), wxEmptyString),
- node->GetAttribute(wxT("checkMessage"), wxEmptyString),
+ wxGetTranslation(node->GetAttribute(wxT("checkMessage"), wxEmptyString)),
node->GetAttribute(wxT("supersedes"), wxEmptyString),
exclusive == wxT("true"));
}
@@ -1121,7 +1121,7 @@
else if (tp == wxT("info"))
clt = cltInfo;
wxArrayString msg = GetArrayFromString(node->GetAttribute(wxT("msg"), wxEmptyString) + wxT(";0;0"));
- m_RegExes.Add(RegExStruct(node->GetAttribute(wxT("name"), wxEmptyString), clt,
+ m_RegExes.Add(RegExStruct(wxGetTranslation(node->GetAttribute(wxT("name"), wxEmptyString)), clt,
node->GetNodeContent().Trim().Trim(false), wxAtoi(msg[0]),
wxAtoi(node->GetAttribute(wxT("file"), wxT("0"))),
wxAtoi(node->GetAttribute(wxT("line"), wxT("0"))),
--- End code ---
gd_on:
With this last patch, it works ;) (at least on the string I mentioned in my previous post).
Now, my job is : extract all "name" strings from .xml file and add them in my .po file.
Thanks
gd_on
BlueHazzard:
This is OT but anyway:
Do you really think localizating the compiler flags is a good idea? I mean, if you learn c/c++ or programming in general, you will be forced to learn and use english. If now a noob, who want learn to code, uses a localized IDE (only the compiler flags here) needs help, he will find it with more difficulties, because of the localization. GCC introduced localization a few releases back. I used it 2 times, and tried then to remove it, because i didn't could find any help in my language...
In short: Is compiler specific translation a goof idea?
greetings
gd_on:
This is the text accompanying and explaining the flag which is translated, not the flag itself!
So, I think that translating this text may help, a noob or a standard (experienced) user.
Myself, when I doubt on a translation (even on mine :o), I revert C::B to English, and can see the "official" meaning. Just one or two click and a C::B restart !
I know that many people prefer to use C::B in English and not in their native language. This is their choice.
Myself, I generally prefer to see most of the interface in French, even if in English I understand generally. This is my choice, because I'm more comfortable then.
Both choices have their advantages and disadvantages.
So, yes I like a localized IDE ;). And you are not obliged to use it.
gd_on
Alpha:
--- Quote from: gd_on on October 28, 2013, 02:19:53 pm ---With this last patch, it works ;) (at least on the string I mentioned in my previous post).
--- End quote ---
Okay, I will commit soon, if no further problems are identified.
--- Quote from: gd_on on October 28, 2013, 02:19:53 pm ---Now, my job is : extract all "name" strings from .xml file and add them in my .po file.
--- End quote ---
Maybe a script could extract the strings? It would likely be easier in the long run, for when the .xml files are updated.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version