[Libreoffice-commits] .: sw/source
Andras Timar
timar at kemper.freedesktop.org
Mon Jan 2 04:58:14 PST 2012
sw/source/ui/app/mn.src | 2 --
sw/source/ui/docvw/HeaderFooterWin.cxx | 18 +++++++++---------
sw/source/ui/docvw/docvw.hrc | 6 ++++--
sw/source/ui/docvw/docvw.src | 17 +++++++++++++----
4 files changed, 26 insertions(+), 17 deletions(-)
New commits:
commit 95adf2a3d6c7cfa17f36f9b00e2357e4b7b7bbee
Author: Andras Timar <atimar at suse.com>
Date: Mon Jan 2 13:53:27 2012 +0100
another string composition bad for l10n
Delete $1 / Format $1 where $1 can be Header / Footer
It turned out that translation of Header and Footer
can be different when deleting and when formatting, at
least in Estonian.
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index edcaa8e..e1f2aa1 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -1442,7 +1442,6 @@ Menu MN_HEADERFOOTER_BUTTON
{
Identifier = FN_HEADERFOOTER_EDIT ;
HelpID = CMD_FN_HEADERFOOTER_EDIT ;
- Text [ en-US ] = "Format $1..." ;
};
MenuItem
{
@@ -1454,7 +1453,6 @@ Menu MN_HEADERFOOTER_BUTTON
{
Identifier = FN_HEADERFOOTER_DELETE ;
HelpID = CMD_FN_HEADERFOOTER_DELETE ;
- Text [ en-US ] = "Delete $1..." ;
};
};
};
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx
index b5a3c70..70e5b3d 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -171,17 +171,17 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
m_pPopupMenu = new PopupMenu( SW_RES( MN_HEADERFOOTER_BUTTON ) );
// Rewrite the menu entries' text
- String sType = SW_RESSTR( STR_FOOTER );
if ( m_bIsHeader )
- sType = SW_RESSTR( STR_HEADER );
- SwRewriter aRewriter;
- aRewriter.AddRule( String::CreateFromAscii( "$1" ), sType );
-
- String aText = m_pPopupMenu->GetItemText( FN_HEADERFOOTER_EDIT );
- m_pPopupMenu->SetItemText( FN_HEADERFOOTER_EDIT, aRewriter.Apply( aText ) );
+ {
+ m_pPopupMenu->SetItemText( FN_HEADERFOOTER_EDIT, SW_RESSTR( STR_FORMAT_HEADER ) );
+ m_pPopupMenu->SetItemText( FN_HEADERFOOTER_DELETE, SW_RESSTR( STR_DELETE_HEADER ) );
+ }
+ else
+ {
+ m_pPopupMenu->SetItemText( FN_HEADERFOOTER_EDIT, SW_RESSTR( STR_FORMAT_FOOTER ) );
+ m_pPopupMenu->SetItemText( FN_HEADERFOOTER_DELETE, SW_RESSTR( STR_DELETE_FOOTER ) );
+ }
- aText = m_pPopupMenu->GetItemText( FN_HEADERFOOTER_DELETE );
- m_pPopupMenu->SetItemText( FN_HEADERFOOTER_DELETE, aRewriter.Apply( aText ) );
SetPopupMenu( m_pPopupMenu );
m_aFadeTimer.SetTimeout( 50 );
diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc
index 7e318ab..305fb5b 100644
--- a/sw/source/ui/docvw/docvw.hrc
+++ b/sw/source/ui/docvw/docvw.hrc
@@ -83,8 +83,10 @@
#define STR_HEADER_TITLE (RC_DOCVW_BEGIN + 22)
#define STR_FOOTER_TITLE (RC_DOCVW_BEGIN + 23)
-#define STR_HEADER (RC_DOCVW_BEGIN + 24)
-#define STR_FOOTER (RC_DOCVW_BEGIN + 25)
+#define STR_DELETE_HEADER (RC_DOCVW_BEGIN + 24)
+#define STR_FORMAT_HEADER (RC_DOCVW_BEGIN + 25)
+#define STR_DELETE_FOOTER (RC_DOCVW_BEGIN + 26)
+#define STR_FORMAT_FOOTER (RC_DOCVW_BEGIN + 27)
#define MSG_READONLY_CONTENT (RC_DOCVW_BEGIN + 1)
diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src
index a843c08..6787306 100644
--- a/sw/source/ui/docvw/docvw.src
+++ b/sw/source/ui/docvw/docvw.src
@@ -301,13 +301,22 @@ String STR_FOOTER_TITLE
Text [ en-US ] = "Footer (%1)" ;
};
-String STR_HEADER
+String STR_DELETE_HEADER
{
- Text [ en-US ] = "Header" ;
+ Text [ en-US ] = "Delete Header..." ;
};
-String STR_FOOTER
+String STR_FORMAT_HEADER
{
- Text [ en-US ] = "Footer" ;
+ Text [ en-US ] = "Format Header..." ;
};
+String STR_DELETE_FOOTER
+{
+ Text [ en-US ] = "Delete Footer..." ;
+};
+
+String STR_FORMAT_FOOTER
+{
+ Text [ en-US ] = "Format Footer..." ;
+};
More information about the Libreoffice-commits
mailing list