From 7c1c258ce3396984a5c57874f5ab1e28758c9ed5 Mon Sep 17 00:00:00 2001 From: Rafael Lima Date: Fri, 22 Jan 2021 21:19:07 +0100 Subject: Fixes localization issues in ScriptForge Help pages Some code blocks with comments need translation and therefore need to have the localize="false" removed. Also, other parts of the text shouldn't be localized, so localize="false" was added. Change-Id: Id072eb88f95ee8759f86d2ca3736698855b50b4b Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109801 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- source/text/sbasic/shared/03/sf_array.xhp | 18 +++++++++--------- source/text/sbasic/shared/03/sf_dictionary.xhp | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/source/text/sbasic/shared/03/sf_array.xhp b/source/text/sbasic/shared/03/sf_array.xhp index d78af99e01..45f9760992 100644 --- a/source/text/sbasic/shared/03/sf_array.xhp +++ b/source/text/sbasic/shared/03/sf_array.xhp @@ -305,14 +305,14 @@

Sub Example_ExtractColumn - 'Creates a 3x3 matrix: |1, 2, 3| + 'Creates a 3x3 matrix: |1, 2, 3| ' |4, 5, 6| ' |7, 8, 9| Dim mat as Variant, col as Variant mat = SF_Array.AppendRow(Array(), Array(1, 2, 3)) mat = SF_Array.AppendRow(mat, Array(4, 5, 6)) mat = SF_Array.AppendRow(mat, Array(7, 8, 9)) - 'Extracts the third column: |3, 6, 9| + 'Extracts the third column: |3, 6, 9| col = SF_Array.ExtractColumn(mat, 2) End Sub @@ -335,14 +335,14 @@

Sub Example_ExtractRow - 'Creates a 3x3 matrix: |1, 2, 3| + 'Creates a 3x3 matrix: |1, 2, 3| ' |4, 5, 6| ' |7, 8, 9| Dim mat as Variant, row as Variant mat = SF_Array.AppendRow(Array(), Array(1, 2, 3)) mat = SF_Array.AppendRow(mat, Array(4, 5, 6)) mat = SF_Array.AppendRow(mat, Array(7, 8, 9)) - 'Extracts the first row: |1, 2, 3| + 'Extracts the first row: |1, 2, 3| row = SF_Array.ExtractRow(mat, 0) End Sub @@ -369,16 +369,16 @@ End Sub You can use the Flatten method along with other methods such as Append or Prepend to concatenate a set of 1D arrays into a single 1D array. -

+

Next is an example of how the methods Flatten and Append can be combined to concatenate three arrays. Sub Concatenate_Example - 'Creates three arrays for this example + 'Creates three arrays for this example Dim a as Variant, b as Variant, c as Variant a = Array(1, 2, 3) b = Array(4, 5) c = Array(6, 7, 8, 9) - 'Concatenates the three arrays into a single 1D array + 'Concatenates the three arrays into a single 1D array Dim arr as Variant arr = SF_Array.Flatten(SF_Array.Append(a, b, c)) '(1, 2, 3, 4, 5, 6, 7, 8, 9) @@ -408,7 +408,7 @@

Given this CSV file: - Name,DateOfBirth,Address,City + Name,DateOfBirth,Address,City Anna,2002/03/31,"Rue de l'église, 21",Toulouse Fred,1998/05/04,"Rue Albert Einstein, 113A",Carcassonne @@ -416,7 +416,7 @@ Sub Example_ImportFromCSVFile() Dim a As Variant a = SF_Array.ImportFromCSVFile("C:\Temp\myFile.csv", DateFormat := "YYYY/MM/DD") - MsgBox a(0, 3) ' City + MsgBox a(0, 3) ' City MsgBox TypeName(a(1, 2)) ' Date MsgBox a(2, 2) ' Rue Albert Einstein, 113A End Sub diff --git a/source/text/sbasic/shared/03/sf_dictionary.xhp b/source/text/sbasic/shared/03/sf_dictionary.xhp index aab563fcff..be4602d2bb 100644 --- a/source/text/sbasic/shared/03/sf_dictionary.xhp +++ b/source/text/sbasic/shared/03/sf_dictionary.xhp @@ -54,7 +54,7 @@ Name - Readonly + Read-only Type @@ -126,19 +126,19 @@ - + Add
ConvertToArray
ConvertToJson
ConvertToPropertyValues
- + Exists
ImportFromJson
ImportFromPropertyValues
Item
- + Remove
RemoveAll
ReplaceItem
@@ -240,10 +240,10 @@ Dim myDict as Variant myDict = CreateScriptService("Dictionary") - 'Adds some properties to the dictionary + 'Adds some properties to the dictionary myDict.Add("Color", "Blue") myDict.Add("Width", 20) - 'Converts to an Array of PropertyValue objects + 'Converts to an Array of PropertyValue objects Dim prop as Variant prop = myDict.ConvertToPropertyValues() @@ -267,7 +267,7 @@ Dim myDict as Variant myDict = CreateScriptService("Dictionary") - 'Adds some properties to the dictionary + 'Adds some properties to the dictionary myDict.Add("Color", "Blue") myDict.Add("Width", 20) '(...) -- cgit