Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: gd_on on September 16, 2013, 07:11:55 pm

Title: 3 localization plugin patches
Post by: gd_on on September 16, 2013, 07:11:55 pm
3 small patches for localizing 3 plugins.

gd_on
Title: Re: 3 plugin patches
Post by: oBFusCATed on September 18, 2013, 12:54:27 am
All 5 are in svn. Next time please use a single topic and a more descriptive topic names if possible.

Thank you for the contribution.
Can I ask you to provide a patch which adds you to the "help -> about -> thanks to" dialog?
Title: Re: 3 localization plugin patches
Post by: gd_on on September 18, 2013, 09:20:20 am
Quote
Can I ask you to provide a patch which adds you to the "help -> about -> thanks to" dialog?
Why not, but my contributions are weak until now  :-\
Here is a new patch, complementary from a previous one (I forgot it yesterday  :-[).

gd_on
Title: Re: 3 localization plugin patches
Post by: oBFusCATed on September 18, 2013, 10:25:41 am
This patch won't be applied, because it tries to translate string that are commented or part of the output of cvs, which is not good.
I've also remove these parts from the other patch, too.
Title: Re: 3 localization plugin patches
Post by: gd_on on September 18, 2013, 10:50:10 am
Quote
This patch won't be applied, because it tries to translate string that are commented or part of the output of cvs, which is not good.
Sorry. I didn't thought this may be a problem. I just prepared for an eventual future translation if the lines were uncommented. Sorry again.

gd_on
Title: Re: 3 localization plugin patches
Post by: gd_on on September 20, 2013, 11:39:33 am
Here is a corrected version : no translation in comments.
Hope it's OK now.

gd_on
Title: Re: 3 localization plugin patches
Post by: MortenMacFly on September 20, 2013, 02:21:35 pm
Hope it's OK now.
I am not sure. The code you've patched is parses the output of a cvs command after calling the cvs executable. If you localise it, the parser is broken. I think in this file there really is nothing else to localise.
Title: Re: 3 localization plugin patches
Post by: gd_on on September 20, 2013, 06:24:49 pm
Sorry, but I don't understand what do you mean by "output of a cvs command".
On my PC, it works perfectly. Strings are translated as they should be and nothing seems to be broken: menus works as expected. Without this patch, they still appear in English.

gd_on
Title: Re: 3 localization plugin patches
Post by: oBFusCATed on September 20, 2013, 06:38:53 pm
He is talking about this change:
Code
@@ -1798,17 +1798,17 @@
         VCSstate s;
         while(1)
         {
-            if(state==_T("Up-to-date"))
+            if(state==_("Up-to-date"))
             {
                 s.state=fvsVcUpToDate;
                 break;
             }
-            if(state==_T("Locally Modified"))
+            if(state==_("Locally Modified"))
             {
                 s.state=fvsVcModified;
                 break;
             }
-            if(state==_T("Locally Added"))
+            if(state==_("Locally Added"))
             {
                 s.state=fvsVcAdded;
                 break;

Can you try without it?
Title: Re: 3 localization plugin patches
Post by: gd_on on September 20, 2013, 07:19:03 pm
OK, I see now. Effectively it's not correct.
The problem now is that when I create a patch with Tortoise svn, I have some problems: I can't relly revert to the previous svn version, the one completly in english.
I tried to revert to a previous svn number, to delete the file, ... each time my previous modifications are still there and I'm not sure that the patch is correct. Strange!
I miss something ! ???

But may be I have nothing to do now because my errors have been corrected !

gd_on
Title: Re: 3 localization plugin patches
Post by: oBFusCATed on September 20, 2013, 07:30:06 pm
"svn revert file_path" should do it, if I remember correctly. I think there was a menu command, too.