Skip to content

Commit

Permalink
Make the Preview bar buttons translatable ("Two Page" and "One Page" …
Browse files Browse the repository at this point in the history
…are not yet translatable...) refs #2083, #2079
  • Loading branch information
sdottaka committed Nov 6, 2023
1 parent 11bc950 commit a0abf31
Show file tree
Hide file tree
Showing 42 changed files with 766 additions and 43 deletions.
12 changes: 12 additions & 0 deletions Src/Merge.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4205,6 +4205,18 @@ BEGIN
IDS_JUMPLIST_CLIPBOARD_COMPARE "Clipboard Compare"
END

STRINGTABLE
BEGIN
IDS_PREVIEWBAR_PRINT "&Print..."
IDS_PREVIEWBAR_NEXTPAGE "&Next Page"
IDS_PREVIEWBAR_PREVPAGE "Pre&v Page"
IDS_PREVIEWBAR_TWOPAGE "&Two Page"
IDS_PREVIEWBAR_ONEPAGE "&One Page"
IDS_PREVIEWBAR_ZOOMIN "Zoom &In"
IDS_PREVIEWBAR_ZOOMOUT "Zoom &Out"
IDS_PREVIEWBAR_CLOSE "&Close"
END

#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////

Expand Down
18 changes: 18 additions & 0 deletions Src/MergeEditFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ BEGIN_MESSAGE_MAP(CMergeEditFrame, CMergeFrameCommon)
END_MESSAGE_MAP()

constexpr UINT_PTR IDT_SAVEPOSITION = 2;
constexpr UINT_PTR IDT_PREVIEWMODE = 3;

/////////////////////////////////////////////////////////////////////////////
// CMergeEditFrame construction/destruction
Expand Down Expand Up @@ -317,6 +318,13 @@ void CMergeEditFrame::OnClose()
CMergeFrameCommon::OnClose();
}

void CMergeEditFrame::OnSetPreviewMode(BOOL bPreview, CPrintPreviewState* pState)
{
KillTimer(IDT_PREVIEWMODE);
SetTimer(IDT_PREVIEWMODE, 100, nullptr);
__super::OnSetPreviewMode(bPreview, pState);
}

/// update splitting position for panels 1/2 and headerbar and statusbar
void CMergeEditFrame::UpdateHeaderSizes()
{
Expand Down Expand Up @@ -390,6 +398,16 @@ void CMergeEditFrame::OnTimer(UINT_PTR nIDEvent)
SavePosition();
KillTimer(IDT_SAVEPOSITION);
}
else if (nIDEvent == IDT_PREVIEWMODE)
{
KillTimer(IDT_PREVIEWMODE);
CWnd* pPreviewBar = GetDlgItem(AFX_IDW_PREVIEW_BAR);
if (pPreviewBar)
{
pPreviewBar->Invalidate();
theApp.TranslateDialog(pPreviewBar->GetSafeHwnd());
}
}
else
{
UpdateHeaderSizes();
Expand Down
1 change: 1 addition & 0 deletions Src/MergeEditFrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class CMergeEditFrame : public CMergeFrameCommon
virtual BOOL OnBarCheck(UINT nID);
virtual void ActivateFrame(int nCmdShow = -1);
virtual BOOL DestroyWindow();
virtual void OnSetPreviewMode(BOOL bPreview, CPrintPreviewState* pState) override;
protected:
//}}AFX_VIRTUAL

Expand Down
8 changes: 8 additions & 0 deletions Src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,14 @@
#define IDS_EXPANDSUBDIRS_ALL 44528
#define IDS_EXPANDSUBDIRS_DIFFERENT 44529
#define IDS_EXPANDSUBDIRS_IDENTICAL 44530
#define IDS_PREVIEWBAR_PRINT 44531
#define IDS_PREVIEWBAR_NEXTPAGE 44532
#define IDS_PREVIEWBAR_PREVPAGE 44533
#define IDS_PREVIEWBAR_TWOPAGE 44534
#define IDS_PREVIEWBAR_ONEPAGE 44535
#define IDS_PREVIEWBAR_ZOOMIN 44536
#define IDS_PREVIEWBAR_ZOOMOUT 44537
#define IDS_PREVIEWBAR_CLOSE 44538


// Next default values for new objects
Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Arabic.po
Original file line number Diff line number Diff line change
Expand Up @@ -4020,6 +4020,24 @@ msgstr ""
msgid "Clipboard Compare"
msgstr ""

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr ""

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Basque.po
Original file line number Diff line number Diff line change
Expand Up @@ -4625,6 +4625,24 @@ msgstr ""
msgid "Clipboard Compare"
msgstr ""

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr ""

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Brazilian.po
Original file line number Diff line number Diff line change
Expand Up @@ -3702,6 +3702,24 @@ msgstr "Nova Comparação de Página Web"
msgid "Clipboard Compare"
msgstr "Comparação da Área de Transferência"

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr "Embelezamento"

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Bulgarian.po
Original file line number Diff line number Diff line change
Expand Up @@ -4104,6 +4104,24 @@ msgstr ""
msgid "Clipboard Compare"
msgstr ""

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr ""

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Catalan.po
Original file line number Diff line number Diff line change
Expand Up @@ -4784,6 +4784,24 @@ msgstr ""
msgid "Clipboard Compare"
msgstr ""

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr "Embellir"

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/ChineseSimplified.po
Original file line number Diff line number Diff line change
Expand Up @@ -4134,6 +4134,24 @@ msgstr "新的网页比较"
msgid "Clipboard Compare"
msgstr "剪贴板比较"

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr "格式美化"

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/ChineseTraditional.po
Original file line number Diff line number Diff line change
Expand Up @@ -4784,6 +4784,24 @@ msgstr "新網頁比較"
msgid "Clipboard Compare"
msgstr "剪貼簿比較"

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr "美化"

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Corsican.po
Original file line number Diff line number Diff line change
Expand Up @@ -4099,6 +4099,24 @@ msgstr "Paragone novu di pagina web"
msgid "Clipboard Compare"
msgstr "Paragone di preme’papei"

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr "Imbellimentu"

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Croatian.po
Original file line number Diff line number Diff line change
Expand Up @@ -4624,6 +4624,24 @@ msgstr ""
msgid "Clipboard Compare"
msgstr ""

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr ""

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Czech.po
Original file line number Diff line number Diff line change
Expand Up @@ -4557,6 +4557,24 @@ msgstr ""
msgid "Clipboard Compare"
msgstr ""

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr ""

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Danish.po
Original file line number Diff line number Diff line change
Expand Up @@ -4662,6 +4662,24 @@ msgstr ""
msgid "Clipboard Compare"
msgstr ""

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr ""

Expand Down
18 changes: 18 additions & 0 deletions Translations/WinMerge/Dutch.po
Original file line number Diff line number Diff line change
Expand Up @@ -4085,6 +4085,24 @@ msgstr ""
msgid "Clipboard Compare"
msgstr ""

msgid "&Print..."
msgstr ""

msgid "Pre&v Page"
msgstr ""

msgid "&Two Page"
msgstr ""

msgid "&One Page"
msgstr ""

msgid "Zoom &In"
msgstr ""

msgid "Zoom &Out"
msgstr ""

msgid "Prettification"
msgstr "Mooi maken"

Expand Down
Loading

3 comments on commit a0abf31

@Marcellomco
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've put "Prev Page", but left "Next Page" out of the translation file. Is that right?

@sdottaka
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've put "Prev Page", but left "Next Page" out of the translation file. Is that right?

"Next Page" already existed so it was not added to the pot file.

@Need74
Copy link
Contributor

@Need74 Need74 commented on a0abf31 Nov 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi
I'm sorry but I just replied to the previous message and I hadn't read this point on "Next page"

As for Close, I assume that the word is already translated in the .po file and that there is no point in doing it a second time.

Sincerely
Dennis

Please sign in to comment.