News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

XML based compilers

Started by Alpha, June 15, 2012, 01:00:36 PM

Previous topic - Next topic

MortenMacFly

Quote from: oBFusCATed on October 06, 2012, 11:46:44 PM
The hack is already in svn...
...the description now, too.
I was able to reproduce it with one of my own projects, too btw. But I could swear this came with more recent version of either Ubuntu or wxWidgets. I've never seen such before. So it would either be a wxWidgets or Ubuntu thing. I wonder how a more recent wx294 demo case would behave.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot

I would refactor this in a little method which name says it is a hack, since now (just looking at the diff), there is code duplication, and will be easier to remove (function calls and implementation), and easier to test if hack is still needed (temporarily make the function empty)

What do you think ?

MortenMacFly

Quote from: killerbot on October 07, 2012, 10:40:36 AM
What do you think ?
Why not? I though in this case, as both hacks are directly after each other it would not be needed. Because if you see the one hack you'll also see the other.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Alpha


MortenMacFly

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Alpha

Quote from: MortenMacFly on October 09, 2012, 07:12:38 AM
Wouldn't the wxWidgets bug-tracker be the right place to report?!
I actually was not quite sure where it belonged.  I will submit it there as well.  (It appears that this was reported a while ago as well.)

Alpha

About rev. 8553, would the following be more friendly for translators?  Or should this type of pseudo-intelligent logging be avoided?

Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 8554)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -3728,8 +3728,9 @@

wxString CompilerGCC::GetErrWarnStr()
{
-    return wxString::Format(_("%u error(s), %u warning(s)"),
-                            m_Errors.GetCount(cltError), m_Errors.GetCount(cltWarning));
+    return wxString::Format(_("%u %s, %u %s"),
+                            m_Errors.GetCount(cltError),   wxString(m_Errors.GetCount(cltError)   == 1 ? _("error")   : _("errors")).wx_str(),
+                            m_Errors.GetCount(cltWarning), wxString(m_Errors.GetCount(cltWarning) == 1 ? _("warning") : _("warnings")).wx_str());
}

wxString CompilerGCC::GetMinSecStr()
@@ -3737,6 +3738,7 @@
     long int elapsed = (wxGetLocalTimeMillis() - m_StartTime).ToLong() / 1000;
     int mins =  elapsed / 60;
     int secs = (elapsed % 60);
-    return wxString::Format(_("%d minute(s), %d second(s)"), mins, secs);
-;
+    return wxString::Format(_("%d %s, %d %s"),
+                            mins, wxString(mins == 1 ? _("minute") : _("minutes")).wx_str(),
+                            secs, wxString(secs == 1 ? _("second") : _("seconds")).wx_str());
}
Index: src/plugins/compilergcc/directcommands.cpp
===================================================================
--- src/plugins/compilergcc/directcommands.cpp (revision 8554)
+++ src/plugins/compilergcc/directcommands.cpp (working copy)
@@ -613,8 +613,8 @@
     if (!fileMissing.IsEmpty())
     {
         wxString warn;
-        warn.Printf(_("WARNING: Target '%s': Unable to resolve %lu external dependenc%s:"),
-                    target->GetFullTitle().wx_str(), static_cast<unsigned long>(fileMissing.Count()), wxString(fileMissing.Count() == 1 ? _("y") : _("ies")).wx_str());
+        warn.Printf(_("WARNING: Target '%s': Unable to resolve %lu external %s:"),
+                    target->GetFullTitle().wx_str(), static_cast<unsigned long>(fileMissing.Count()), wxString(fileMissing.Count() == 1 ? _("dependency") : _("dependencies")).wx_str());
         ret.Add(wxString(COMPILER_SIMPLE_LOG) + warn);
         for (size_t i=0; i<fileMissing.Count(); i++)
             ret.Add(wxString(COMPILER_SIMPLE_LOG) + fileMissing[i]);

oBFusCATed

I see no problem with the current version ... KISS for the win.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

Quote from: oBFusCATed on November 12, 2012, 11:53:08 PM
I see no problem with the current version ... KISS for the win.
I agree. Either we do it like that in all places or we just keep it simple. It has some more advantages: You don't have to translate many units. Already now we have several thousands of units to translate anyways - adding even more might not be the best thing to do you know... ;)
@Alpha: If you want to, make a poEdit session on Code::Blocks. Then you know what I am talking about... ;D

However - you pointed me to a place that I missed to simplify. :P
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Alpha

I think this might be a side effect from having an overzealous English teacher :).

Quote from: MortenMacFly on November 13, 2012, 08:58:19 AM
@Alpha: If you want to, make a poEdit session on Code::Blocks. Then you know what I am talking about... ;D
I can imagine :o (and I have enough trouble as it is when I need to translate just a few sentences).

Alpha

Do not worry, I am not trying to argue you change your mind ;).  In my reading, I had bumped into the following, and thought I would post some links in case the topic of plural translations was ever revisited in the future.

MortenMacFly

Quote from: Alpha on November 20, 2012, 12:42:16 AM
Do not worry, I am not trying to argue you change your mind ;).  In my reading, I had bumped into the following, and thought I would post some links in case the topic of plural translations was ever revisited in the future.
I know about these, but they all cause to double the units to translate in the worst case. The question is: In an IDE - is "dependency/ies" enough, or do you really want to be that super correct. I mean its not a scientific thesis we are doing here. And (most important to me) we don't want to scare away translators.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

Morten: Can you show us if you can do a pain free svn merge?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Alpha

I have some changes in my local copy; would you prefer to have them now (some changes are not yet thoroughly tested), or after the merge (assuming it will be soon)?

MortenMacFly

Quote from: Alpha on December 10, 2012, 02:50:30 AM
I have some changes in my local copy; would you prefer to have them now (some changes are not yet thoroughly tested), or after the merge (assuming it will be soon)?
After.

Quote from: oBFusCATed on December 10, 2012, 12:51:58 AM
Morten: Can you show us if you can do a pain free svn merge?
Sorry, no time atm, but I'll see what I can do later this or next week.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]