sc/inc/globstr.hrc                                             |   14 
+++++-----
 sc/inc/strings.hrc                                             |    2 -
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |    2 -
 sc/source/ui/view/cellsh.cxx                                   |   12 ++++----
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 9a0018a356c89baf600a72eed8ee4ac927815b9b
Author:     Laurent Balland <laurent.ball...@mailo.fr>
AuthorDate: Wed Feb 22 23:01:01 2023 +0100
Commit:     Laurent Balland <laurent.ball...@mailo.fr>
CommitDate: Wed Oct 18 17:03:07 2023 +0200

    Replace $baz by %foo for sanity checks
    
    Tools for sanity-checks like
    https://docs.weblate.org/en/latest/user/checks.html#percent-placeholders
    looks for percent instead of dollar
    Try to align with %1 as suggested by Chistian Lohmaier
    
    Change-Id: I97d353f452316b939f2eaf7d30e68b9aab9f83e5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147493
    Tested-by: Jenkins
    Reviewed-by: Laurent Balland <laurent.ball...@mailo.fr>

diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 2b949cba8264..e8e45fc01b2e 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -157,14 +157,14 @@
 #define STR_PIVOT_GROUP                         NC_("STR_PIVOT_GROUP", "Group")
 #define STR_PIVOT_ROW_LABELS                    NC_("STR_PIVOT_ROW_LABELS", 
"Row Labels")
 #define STR_PIVOT_COL_LABELS                    NC_("STR_PIVOT_COL_LABELS", 
"Column Labels")
-/* To translators: $1 == will be replaced by STR_SELCOUNT_ROWARG, and $2 by 
STR_SELCOUNT_COLARG
+/* %1 will be replaced by STR_SELCOUNT_ROWARG, and %2 by STR_SELCOUNT_COLARG
    e.g. Selected: 1 row, 2 columns */
-#define STR_SELCOUNT                            NC_("STR_SELCOUNT", "Selected: 
$1, $2")
-// To translators: STR_SELCOUNT_ROWARG is $1 of STR_SELCOUNT. $1 of 
STR_SELCOUNT_ROWARG is number of rows
-#define STR_SELCOUNT_ROWARG                     NNC_("STR_SELCOUNT_ROWARG", 
"$1 row", "$1 rows")
-// To translators: STR_SELCOUNT_COLARG is $1 of STR_SELCOUNT. $1 of 
STR_SELCOUNT_ROWARG is number of columns
-#define STR_SELCOUNT_COLARG                     NNC_("STR_SELCOUNT_COLARG", 
"$1 column", "$1 columns")
-#define STR_FILTER_SELCOUNT                     NC_("STR_FILTER_SELCOUNT", "$1 
of $2 records found")
+#define STR_SELCOUNT                            NC_("STR_SELCOUNT", "Selected: 
%1, %2")
+// STR_SELCOUNT_ROWARG is %1 of STR_SELCOUNT. %d of STR_SELCOUNT_ROWARG is 
number of rows
+#define STR_SELCOUNT_ROWARG                     NNC_("STR_SELCOUNT_ROWARG", 
"%d row", "%d rows")
+// STR_SELCOUNT_COLARG is %2 of STR_SELCOUNT. %d of STR_SELCOUNT_ROWARG is 
number of columns
+#define STR_SELCOUNT_COLARG                     NNC_("STR_SELCOUNT_COLARG", 
"%d column", "%d columns")
+#define STR_FILTER_SELCOUNT                     NC_("STR_FILTER_SELCOUNT", "%1 
of %2 records found")
 #define STR_COLUMN                              NC_("STR_COLUMN", "Column")
 #define STR_ROW                                 NC_("STR_ROW", "Row")
 #define STR_PAGE                                NC_("STR_PAGE", "Page")
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index b40ed197be4b..74c15b5b698b 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -259,7 +259,7 @@
 #define STRID_CALC_FIRST_QUARTILE                   
NC_("STRID_CALC_FIRST_QUARTILE", "First Quartile")
 #define STRID_CALC_THIRD_QUARTILE                   
NC_("STRID_CALC_THIRD_QUARTILE", "Third Quartile")
 /* RandomNumberGeneratorDialog */
-#define STR_UNDO_DISTRIBUTION_TEMPLATE              
NC_("STR_UNDO_DISTRIBUTION_TEMPLATE", "Random ($(DISTRIBUTION))")
+#define STR_UNDO_DISTRIBUTION_TEMPLATE              
NC_("STR_UNDO_DISTRIBUTION_TEMPLATE", "Random (%1)")
 #define STR_DISTRIBUTION_UNIFORM_REAL               
NC_("STR_DISTRIBUTION_UNIFORM_REAL", "Uniform")
 #define STR_DISTRIBUTION_UNIFORM_INTEGER            
NC_("STR_DISTRIBUTION_UNIFORM_INTEGER", "Uniform Integer")
 #define STR_DISTRIBUTION_NORMAL                     
NC_("STR_DISTRIBUTION_NORMAL", "Normal")
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx 
b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 2490ebf47301..38894160eff1 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -262,7 +262,7 @@ void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& 
randomGenerator, Transl
 {
     OUString aUndo = ScResId(STR_UNDO_DISTRIBUTION_TEMPLATE);
     OUString aDistributionName = ScResId(pDistributionStringId);
-    aUndo = aUndo.replaceAll("$(DISTRIBUTION)",  aDistributionName);
+    aUndo = aUndo.replaceAll("%1",  aDistributionName);
 
     ScDocShell* pDocShell = mrViewData.GetDocShell();
     SfxUndoManager* pUndoManager = pDocShell->GetUndoManager();
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 34c87d0e61c6..1a866df3c881 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -848,13 +848,13 @@ void ScCellShell::GetState(SfxItemSet &rSet)
                                 = 
Application::GetSettings().GetUILocaleDataWrapper();
                             OUString aRowArg
                                 = ScResId(STR_SELCOUNT_ROWARG, nRowsSum)
-                                      .replaceAll("$1", 
rLocaleData.getNum(nRowsSum, 0));
+                                      .replaceAll("%d", 
rLocaleData.getNum(nRowsSum, 0));
                             OUString aColArg
                                 = ScResId(STR_SELCOUNT_COLARG, nColsSum)
-                                      .replaceAll("$1", 
rLocaleData.getNum(nColsSum, 0));
+                                      .replaceAll("%d", 
rLocaleData.getNum(nColsSum, 0));
                             OUString aStr = ScResId(STR_SELCOUNT);
-                            aStr = aStr.replaceAll("$1", aRowArg);
-                            aStr = aStr.replaceAll("$2", aColArg);
+                            aStr = aStr.replaceAll("%1", aRowArg);
+                            aStr = aStr.replaceAll("%2", aColArg);
                             rSet.Put(SfxStringItem(nWhich, aStr));
                         }
                     }
@@ -865,8 +865,8 @@ void ScCellShell::GetState(SfxItemSet &rSet)
                         if( nTotal && nSelected != SCSIZE_MAX )
                         {
                             OUString aStr = ScResId( STR_FILTER_SELCOUNT );
-                            aStr = aStr.replaceAll( "$1", OUString::number( 
nSelected ) );
-                            aStr = aStr.replaceAll( "$2", OUString::number( 
nTotal ) );
+                            aStr = aStr.replaceAll( "%1", OUString::number( 
nSelected ) );
+                            aStr = aStr.replaceAll( "%2", OUString::number( 
nTotal ) );
                             rSet.Put( SfxStringItem( nWhich, aStr ) );
                         }
                     }

Reply via email to