#2012 Untranslated strings in folder compare window

Branch_+_Trunk
closed-fixed
5
2010-10-21
2010-07-06
No

To reproduce:

1. Change another language except English if your GUI language is English.

2. Compare folders.

3. Move your mouse pointer on the header bar

-> You can see the untranslated string on the status bar.

I found that the bug is not caused on File Compare Window and CFrameWnd::GetMessageString() method is overridden in ChildFrm.cpp but not overridden in DirFrame.cpp.

Fix:

Index: DirFrame.cpp

--- DirFrame.cpp (revision 7223)
+++ DirFrame.cpp (working copy)
@@ -151,6 +151,20 @@
}

/**
+ * @brief Handle translation of default messages on the status bar
+ */
+void CDirFrame::GetMessageString(UINT nID, CString& rMessage) const
+{
+ // load appropriate string
+ const String s = theApp.LoadString(nID);
+ if (!AfxExtractSubString(rMessage, &*s.begin(), 0))
+ {
+ // not found
+ TRACE1("Warning: no message line prompt for ID 0x%04X.\n", nID);
+ }
+}
+
+/**
* @brief Get the interface to the header (path) bar
*/
IHeaderBar * CDirFrame::GetHeaderInterface() {
Index: DirFrame.h
===================================================================
--- DirFrame.h (revision 7223)
+++ DirFrame.h (working copy)
@@ -57,6 +57,7 @@
void SetSharedMenu(HMENU hMenu) { m_hMenuShared = hMenu; };

// Overrides
+ virtual void GetMessageString(UINT nID, CString& rMessage) const;
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDirFrame)
public:

Discussion

  • Kimmo Varis

    Kimmo Varis - 2010-07-08

    Yes, the fix is correct. Please apply it.

     
  • Takashi Sawanaka

    • summary: Untranslated strings in folder window --> Untranslated strings in folder compare window
    • assigned_to: nobody --> sdottaka
    • milestone: --> 102450
    • status: open --> closed-fixed
     
  • Takashi Sawanaka

    Commited to SVN trunk. Completed: At revision: 7224

     
  • Tim Gerundt

    Tim Gerundt - 2010-10-21

    Backported to branch R2_14 (In Revision 7331)...

     
  • Tim Gerundt

    Tim Gerundt - 2010-10-21
    • milestone: 102450 --> Branch_+_Trunk
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks