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

Code::Blocks' translation

<< < (27/57) > >>

Xaviou:
So, here is a first one : wasn't so hard to do as I thought :)

A lot of things in this patch concern the ThreadSearch Plugin. It seems that the interface code whas been auto-generated by wxGlade, it's why it contains a lot of "wxT" instead of "_". I'm afraid that next update of this plugin will replace the corrected macros by the _T one.

Regards

Xav'

[attachment deleted by admin]

dje:

--- Quote from: Xaviou on February 05, 2009, 11:14:59 pm ---A lot of things in this patch concern the ThreadSearch Plugin. It seems that the interface code whas been auto-generated by wxGlade, it's why it contains a lot of "wxT" instead of "_". I'm afraid that next update of this plugin will replace the corrected macros by the _T one.

--- End quote ---
I'll see  :)
I will apply a patch to spare place for small screen.
But my approach is to generate files in a temporary directory and then merge the graphical stuff so my code is not modified. That's why I think it should work, unless you propose a patch for this tool  :wink:

Dje

Xaviou:
Hi.

Here is a patch for the translation of the "Start here" page.
Not sure it is the best way to do this, but it works...

--- Code: ---Index: src/src/main.cpp
===================================================================
--- src/src/main.cpp (révision 5480)
+++ src/src/main.cpp (copie de travail)
@@ -1861,7 +1861,7 @@
     wxString buf = event.GetString();
     wxString links;
 
-    links << _T("<b>Recent projects</b><br>\n");
+    links << _("<b>Recent projects</b><br>\n");
     if (m_pProjectsHistory->GetCount())
     {
         links << _T("<ul>");
@@ -1877,7 +1877,7 @@
     else
         links << _T("&nbsp;&nbsp;&nbsp;&nbsp;No recent projects<br>\n");
 
-    links << _T("<br><b>Recent files</b><br>\n");
+    links << _("<br><b>Recent files</b><br>\n");
     if (m_pFilesHistory->GetCount())
     {
         links << _T("<ul>");
@@ -1896,6 +1896,11 @@
 
     // update page
     buf.Replace(_T("CB_VAR_RECENT_FILES_AND_PROJECTS"), links);
+ buf.Replace(_T("CB_TXT_NEW_PROJECT"), _("Create a new project"));
+ buf.Replace(_T("CB_TXT_OPEN_PROJECT"), _("Open an existing project"));
+ buf.Replace(_T("CB_TXT_VISIT_FORUMS"), _("Visit the Code::Blocks forums"));
+ buf.Replace(_T("CB_TXT_REPORT_BUG"), _("Report a bug"));
+ buf.Replace(_T("CB_TXT_REQ_NEW_FEATURE"), _("Request a new feature"));
     ((StartHerePage*)sh)->SetPageContent(buf);
 }
 
Index: src/src/resources/start_here/start_here.html
===================================================================
--- src/src/resources/start_here/start_here.html (révision 5480)
+++ src/src/resources/start_here/start_here.html (copie de travail)
@@ -27,29 +27,27 @@
 <tr>
 <td><a href="CB_CMD_NEW_PROJECT"><img style=
 "width: 47px; height: 42px;" alt="" src="new.png"></a></td>
-<td><a href="CB_CMD_NEW_PROJECT">Create a new project</a></td>
+<td><a href="CB_CMD_NEW_PROJECT">CB_TXT_NEW_PROJECT</a></td>
 </tr>
 <tr>
 <td><a href="CB_CMD_OPEN_PROJECT"><img style=
 "width: 47px; height: 47px;" alt="" src="open.png"></a></td>
-<td><a href="CB_CMD_OPEN_PROJECT">Open an existing project</a></td>
+<td><a href="CB_CMD_OPEN_PROJECT">CB_TXT_OPEN_PROJECT</a></td>
 </tr>
 <tr>
 <td width="56" rowspan="4"><img alt="" src="www.png"></td>
 </tr>
 <tr>
-<td><a href="http://forums.codeblocks.org/">Visit the Code::Blocks
-forums</a></td>
+<td><a href="http://forums.codeblocks.org/">CB_TXT_VISIT_FORUMS</a></td>
 </tr>
 <tr>
 <td><a href=
-"http://developer.berlios.de/bugs/?func=addbug&amp;group_id=5358">Report
-a bug</a></td>
+"http://developer.berlios.de/bugs/?func=addbug&amp;group_id=5358">CB_TXT_REPORT_BUG</a></td>
 </tr>
 <tr>
 <td><a href=
 "http://developer.berlios.de/feature/?func=addfeature&amp;group_id=5358">
-Request a new feature</a></td>
+CB_TXT_REQ_NEW_FEATURE</a></td>
 </tr>
 </table>
 </td>

--- End code ---

And here is a link to an archive containing the modified revision 5480 including the french language file (if someone is interested for testing) :
CB_20090304_rev5480_win32_fr.7z

Regards

Xav'

[attachment deleted by admin]

gd_on:
A few updates to the .pot file extracted from svn 5481 are here.
Translation in French, also updated from svn 5481 in the .po and .mo file is here.
Works if Xaviou's patches for translation are installed (adding 2 missed items : file name and file path).
No changes to the extracting tools. See previous posts here particularly or/and here.

gd_on

GeO:
Since the Class Wizard translation is still not fixed i wrote a little workaround that should work
with every language:
In src\plugins\classwizard\classwizarddlg.cpp on line 322 replace

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

--- Code: ---int scope = XRCCTRL(*this, "cmbInheritanceScope", wxComboBox)->GetCurrentSelection();
switch (scope)
{
case 0:
    m_AncestorScope = _T("public");
    break;
case 1:
    m_AncestorScope = _T("protected");
    break;
case 2:
    m_AncestorScope = _T("private");
    break;

default:
    break;
}

--- End code ---
Greets GeO

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version