[Libreoffice-commits] core.git: editeng/source

Caolán McNamara caolanm at redhat.com
Wed Mar 13 08:06:39 PDT 2013


 editeng/source/items/optitems.cxx |    6 ++----
 editeng/source/items/paraitem.cxx |    9 +++------
 editeng/source/items/svxitems.src |    6 +++---
 3 files changed, 8 insertions(+), 13 deletions(-)

New commits:
commit 251200d25c6a53e43aa91055622b931d3b4ed738
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 13 15:04:03 2013 +0000

    don't jam numbers directly on text, leave a space
    
    ...for the "X characters at start/end of line" in the paragraph style dialog
    style-description entry when hyphenation is not default
    
    Move it into the resource string, that way translators have the chance to
    position the numbers in the right place of the string.
    
    Change-Id: I04217e27336bc032548645fc46a6daf58cccd0c4

diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx
index 3c51334..c3f315e 100644
--- a/editeng/source/items/optitems.cxx
+++ b/editeng/source/items/optitems.cxx
@@ -156,11 +156,9 @@ SfxItemPresentation SfxHyphenRegionItem::GetPresentation
         case SFX_ITEM_PRESENTATION_COMPLETE:
         {
             rText = rText +
-                    OUString::number( nMinLead ) +
-                    EE_RESSTR( RID_SVXITEMS_HYPHEN_MINLEAD ) +
+                    EE_RESSTR(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
                     "," +
-                    OUString::number( nMinTrail ) +
-                    EE_RESSTR( RID_SVXITEMS_HYPHEN_MINTRAIL );
+                    EE_RESSTR(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail));
             return ePres;
         }
         default:
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index fd2f757..ec97047 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -791,14 +791,11 @@ SfxItemPresentation SvxHyphenZoneItem::GetPresentation
             rText = rText +
                     EE_RESSTR(nId) +
                     cpDelimTmp +
-                    OUString::number( nMinLead ) +
-                    EE_RESSTR(RID_SVXITEMS_HYPHEN_MINLEAD) +
+                    EE_RESSTR(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
                     cpDelimTmp +
-                    OUString::number( nMinTrail ) +
-                    EE_RESSTR(RID_SVXITEMS_HYPHEN_MINTRAIL) +
+                    EE_RESSTR(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail)) +
                     cpDelimTmp +
-                    OUString::number( nMaxHyphens ) +
-                    EE_RESSTR(RID_SVXITEMS_HYPHEN_MAX);
+                    EE_RESSTR(RID_SVXITEMS_HYPHEN_MAX).replaceAll("%1", OUString::number(nMaxHyphens));
             return SFX_ITEM_PRESENTATION_COMPLETE;
         }
         default: ;//prevent warning
diff --git a/editeng/source/items/svxitems.src b/editeng/source/items/svxitems.src
index 8bd371b..94d2b8d 100644
--- a/editeng/source/items/svxitems.src
+++ b/editeng/source/items/svxitems.src
@@ -824,15 +824,15 @@ String RID_SVXITEMS_ORPHANS_COMPLETE
 };
 String RID_SVXITEMS_HYPHEN_MINLEAD
 {
-    Text [ en-US ] = "Characters at end of line" ;
+    Text [ en-US ] = "%1 characters at end of line" ;
 };
 String RID_SVXITEMS_HYPHEN_MINTRAIL
 {
-    Text [ en-US ] = "Characters at beginning of line" ;
+    Text [ en-US ] = "%1 characters at beginning of line" ;
 };
 String RID_SVXITEMS_HYPHEN_MAX
 {
-    Text [ en-US ] = "Hyphens" ;
+    Text [ en-US ] = "%1 hyphens" ;
 };
 String RID_SVXITEMS_PAGEMODEL_COMPLETE
 {


More information about the Libreoffice-commits mailing list