[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - cui/source sw/source
Andras Timar
timar at kemper.freedesktop.org
Tue Jan 3 06:25:04 PST 2012
cui/source/dialogs/insrc.cxx | 2 +-
cui/source/dialogs/insrc.src | 5 ++---
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 +++++++++++++----
6 files changed, 29 insertions(+), 21 deletions(-)
New commits:
commit 228ee3900058ed13efd99dfdaa22de492826c090
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 64e75e4..df39978 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..." ;
+};
commit 6242fd72f2385860251067fd5bb123e10f4932ea
Author: Andras Timar <atimar at suse.com>
Date: Sat Dec 31 20:31:43 2011 +0100
"Insert" + "Rows" and "Insert" + "Columns" are not OK l10n-wise
never compose strings from two separate parts
see http://listarchives.libreoffice.org/global/l10n/msg03714.html
diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx
index d514ef4..d6bb8b2 100644
--- a/cui/source/dialogs/insrc.cxx
+++ b/cui/source/dialogs/insrc.cxx
@@ -58,7 +58,7 @@ SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, const rtl::OString&
bColumn( bCol )
{
FreeResource();
- String aTmp( GetText() );
+ String aTmp;
if( bColumn )
{
aTmp += aCol;
diff --git a/cui/source/dialogs/insrc.src b/cui/source/dialogs/insrc.src
index f655620..630be3d 100644
--- a/cui/source/dialogs/insrc.src
+++ b/cui/source/dialogs/insrc.src
@@ -35,7 +35,6 @@ ModalDialog DLG_INS_ROW_COL
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 136 , 84 ) ;
- Text [ en-US ] = "Insert" ;
Moveable = TRUE ;
OKButton BT_OK
{
@@ -110,10 +109,10 @@ ModalDialog DLG_INS_ROW_COL
};
String STR_ROW
{
- Text [ en-US ] = " Rows" ;
+ Text [ en-US ] = "Insert Rows" ;
};
String STR_COL
{
- Text [ en-US ] = " Columns" ;
+ Text [ en-US ] = "Insert Columns" ;
};
};
More information about the Libreoffice-commits
mailing list