AllLangHelp_sbasic.mk                            |    1 
 source/text/sbasic/shared/03/lib_ScriptForge.xhp |    2 
 source/text/sbasic/shared/03/sf_l10n.xhp         |    6 
 source/text/sbasic/shared/03/sf_platform.xhp     |  253 +++++++++++++++++++++++
 4 files changed, 259 insertions(+), 3 deletions(-)

New commits:
commit 37af11b1043178f17a2abcd415348fb353f2fc3e
Author:     Rafael Lima <rafael.palma.l...@gmail.com>
AuthorDate: Fri Mar 5 01:22:31 2021 +0100
Commit:     Jean-Pierre Ledure <j...@ledure.be>
CommitDate: Tue Mar 9 15:44:47 2021 +0100

    Create the Help page for Platform service
    
    Also in this patch:
    - sf_l10n.xhp: add new notes to explain L10N
    
    Change-Id: Id3ed5022a779f791e5a518154f9f7ffe3b84566e
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/111928
    Tested-by: Jenkins
    Reviewed-by: Rafael Lima <rafael.palma.l...@gmail.com>

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 4148d45ff..90b40453f 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -86,6 +86,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
     helpcontent2/source/text/sbasic/shared/03/sf_exception \
     helpcontent2/source/text/sbasic/shared/03/sf_filesystem \
     helpcontent2/source/text/sbasic/shared/03/sf_l10n \
+    helpcontent2/source/text/sbasic/shared/03/sf_platform \
     helpcontent2/source/text/sbasic/shared/03/sf_session \
     helpcontent2/source/text/sbasic/shared/03/sf_services \
     helpcontent2/source/text/sbasic/shared/03/sf_string \
diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp 
b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
index 10e43fda7..30520ca95 100644
--- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp
+++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
@@ -144,7 +144,7 @@
       <embed href="text/sbasic/shared/03/sf_l10n.xhp#abstract"/>
     </section>
     <section id="Platform">
-      <paragraph role="paragraph" id="par_id781606151141190" 
localize="false">Platform</paragraph>
+      <embed href="text/sbasic/shared/03/sf_platform.xhp#abstract"/>
     </section>
     <section id="Services">
       <embed href="text/sbasic/shared/03/sf_services.xhp#abstract"/>
diff --git a/source/text/sbasic/shared/03/sf_l10n.xhp 
b/source/text/sbasic/shared/03/sf_l10n.xhp
index fd84b0f71..d6e52385e 100644
--- a/source/text/sbasic/shared/03/sf_l10n.xhp
+++ b/source/text/sbasic/shared/03/sf_l10n.xhp
@@ -36,10 +36,11 @@
     </list>
 </section>
 
-    <tip id="par_id811614352321187">The <literal>L10N</literal> service is 
based on the GNU implementation of PO (portable object) files. To learn more 
about this file format, visit <link 
href="https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html"; 
name="GetText">GNU gettext Utilities: PO Files</link>.</tip>
+    <note id="par_id971614966420419">The acronym <literal>L10N</literal> 
stands for Localization and refers to a set of procedures for translating 
software to a specific country or region.</note>
     <paragraph role="paragraph" id="par_id291585843652438" xml-lang="en-US">PO 
files have long been promoted in the free software community as a means to 
providing multilingual user interfaces. This is accomplished through the use of 
human-readable text files with a well defined structure that specifies, for any 
given language, the source language string and the localized string.</paragraph>
     <paragraph role="paragraph" id="par_id181585843652814" 
xml-lang="en-US">The main advantage of the PO format is dissociation of the 
programmer and the translator. PO files are independent text files, so the 
programmer can send POT template files to translators, who will then translate 
their contents and return the translated PO files for each supported 
language.</paragraph>
-    <paragraph role="paragraph" id="par_id91585843652832" 
xml-lang="en-US">This service implements the three methods listed 
below:</paragraph>
+    <tip id="par_id811614352321187">The <literal>L10N</literal> service is 
based on the GNU implementation of PO (portable object) files. To learn more 
about this file format, visit <link 
href="https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html"; 
name="GetText">GNU gettext Utilities: PO Files</link>.</tip>  
+  <paragraph role="paragraph" id="par_id91585843652832" xml-lang="en-US">This 
service implements the three methods listed below:</paragraph>
     <list type="unordered">
       <listitem>
         <paragraph id="par_id1158584365237"  role="listitem" 
xml-lang="en-US"><emph>AddText</emph>: Used by the programmer to build a set of 
strings that will be translated later.</paragraph>
@@ -238,6 +239,7 @@
         <paragraph role="bascode" localize="false" 
id="bas_id901586165768628">myPO.GetText(MsgId As String[, Arg1[, Arg2[, ...]]]) 
As String</paragraph>
         <paragraph role="bascode" localize="false" 
id="bas_id151586352401577">myPO._(MsgId As String[, Arg1[, Arg2[, ...]]]) As 
String</paragraph>
     </bascode>
+    <note id="par_id421614967136502">In the ScriptForge library, all methods 
starting with the "_" character are reserved for internal use only. However, 
the shortcut <literal>_</literal> used for <literal>GetText</literal> is the 
only exception to this rule, hence it can be safely used in Basic 
scripts.</note>
     <h3 id="hd_id771586165768201" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
     <paragraph role="paragraph" id="par_id51586165768525" 
xml-lang="en-US"><emph>MsgId</emph>: The untranslated string, which is the text 
appearing in the program code. It must not be empty. It may contain any number 
of placeholders (%1 %2 %3 ...) that can be used to dynamically insert text at 
runtime.</paragraph>
     <paragraph role="paragraph" id="par_id11614365537450">Besides using a 
single <literal>MsgId</literal> string, this method also accepts the following 
formats:</paragraph>
diff --git a/source/text/sbasic/shared/03/sf_platform.xhp 
b/source/text/sbasic/shared/03/sf_platform.xhp
new file mode 100644
index 000000000..e719ea8b9
--- /dev/null
+++ b/source/text/sbasic/shared/03/sf_platform.xhp
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<helpdocument version="1.0">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<meta>
+  <topic id="SF_Platform" indexer="include" status="PUBLISH">
+    <title id="tit" xml-lang="en-US">ScriptForge.Platform service</title>
+    <filename>/text/sbasic/shared/03/sf_platform.xhp</filename>
+  </topic>
+  </meta>
+
+<body>
+<section id="ScriptForge-sf_platform">
+    <bookmark xml-lang="en-US" localize="false" branch="index" 
id="bm_id501600788076381">
+        <bookmark_value>Platform service</bookmark_value>
+    </bookmark>
+</section>
+
+<section id="abstract">
+    <h1 id="bm_id681600788076499" xml-lang="en-US"><variable 
id="PlatformService"><link href="text/sbasic/shared/03/sf_platform.xhp" 
name="Platform 
service"><literal>ScriptForge</literal>.<literal>Platform</literal> 
service</link></variable></h1>
+
+  <paragraph role="paragraph" id="par_id181600788076612" xml-lang="en-US">The 
<literal>Platform</literal> service provides a collection of properties about 
the current execution environment and context, such as:</paragraph>
+  <list type="unordered">
+      <listitem>
+          <paragraph id="par_id301600788076785"  role="listitem" 
xml-lang="en-US">The hardware platform (architecture, CPU count, machine type, 
etc)</paragraph>
+      </listitem>
+      <listitem>
+          <paragraph id="par_id1001600788076848"  role="listitem" 
xml-lang="en-US">Operating system information (OS type, release, version, 
etc)</paragraph>
+      </listitem>
+      <listitem>
+          <paragraph id="par_id67160078807676"  role="listitem" 
xml-lang="en-US">The LibreOffice version</paragraph>
+      </listitem>
+      <listitem>
+          <paragraph id="par_id671600788076855"  role="listitem" 
xml-lang="en-US">The current user name</paragraph>
+      </listitem>
+  </list>
+</section>
+  <note id="par_id951614903258253">All properties of the 
<literal>Platform</literal> service are read-only.</note>
+
+
+    <h2 id="hd_id281600788076359" xml-lang="en-US">Service invocation</h2>
+    <paragraph role="paragraph" id="par_id321614902851541">The code snippet 
below instantiates the <literal>Platform</literal> service and accesses the 
<literal>Architecture</literal> property.</paragraph>
+    <bascode>
+        <paragraph role="bascode" localize="false" 
id="bas_id851600788076202">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph>
+        <paragraph role="bascode" localize="false" 
id="bas_id1001600788076254">Dim platform As Variant</paragraph>
+        <paragraph role="bascode" localize="false" 
id="bas_id721600788076288">platform = 
CreateScriptService("Platform")</paragraph>
+        <paragraph role="bascode" localize="false" 
id="bas_id791600788431935">MsgBox platform.Architecture</paragraph>
+    </bascode>
+
+    <bookmark xml-lang="en-US" branch="index" localize="false" 
id="bm_id111614901524769">
+      <bookmark_value>Platform service;Arcitecture</bookmark_value>
+      <bookmark_value>Platform service;ComputerName</bookmark_value>
+      <bookmark_value>Platform service;CPUCount</bookmark_value>
+      <bookmark_value>Platform service;CurrentUser</bookmark_value>
+      <bookmark_value>Platform service;Machine</bookmark_value>
+      <bookmark_value>Platform service;OfficeVersion</bookmark_value>
+      <bookmark_value>Platform service;OSName</bookmark_value>
+      <bookmark_value>Platform service;OSPlatform</bookmark_value>
+      <bookmark_value>Platform service;OSRelease</bookmark_value>
+      <bookmark_value>Platform service;OSVersion</bookmark_value>
+      <bookmark_value>Platform service;Processor</bookmark_value>
+    </bookmark>
+    <h2 id="hd_id711600788076834" xml-lang="en-US">Properties</h2>
+    <table id="tab_id701600788076583">
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id461600788076917" role="tablehead" 
xml-lang="en-US">Name</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id221600788076591" role="tablehead" 
xml-lang="en-US">Readonly</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id761600788076328" role="tablehead" 
xml-lang="en-US">Type</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id67160078807636" role="tablehead" 
xml-lang="en-US">Description</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id491600788076621" role="tablecontent" 
xml-lang="en-US" localize="false">Architecture</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id311600788076756" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id831600788076785" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id441600788076826" role="tablecontent" 
xml-lang="en-US">The hardware bit architecture. Example: 
'<literal>32bit</literal>' or '<literal>64bit</literal>'</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id941600788076595" role="tablecontent" 
xml-lang="en-US" localize="false">ComputerName</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id49160078807654" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id961600788076376" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id81600788076419" role="tablecontent" 
xml-lang="en-US">The computer's network name.</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id721600788076638" role="tablecontent" 
xml-lang="en-US" localize="false">CPUCount</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id711600788076534" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id911600788076842" role="tablecontent" 
xml-lang="en-US" localize="false">Integer</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id541600788076645" role="tablecontent" 
xml-lang="en-US">The number of central processor units.</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id961600788076890" role="tablecontent" 
xml-lang="en-US" localize="false">CurrentUser</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id891600788076190" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id761600788076562" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id91600788076674" role="tablecontent" 
xml-lang="en-US">The name of the currently logged user.</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id951600788076443" role="tablecontent" 
xml-lang="en-US" localize="false">Machine</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id391600788076253" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id381600788076799" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id21600788076541" role="tablecontent" 
xml-lang="en-US">The machine type. Examples are: '<literal>i386</literal>' or 
'<literal>x86_64</literal>'.</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id41600788076936" role="tablecontent" 
xml-lang="en-US" localize="false">OfficeVersion</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id211600788076138" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id221600788076518" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id521600788076371" role="tablecontent" 
xml-lang="en-US">The actual LibreOffice version expressed as<br 
/>'<literal>LibreOffice w.x.y.z (The Document 
Foundation)</literal>'.</paragraph>
+                <paragraph role="paragraph" 
id="par_id621614902220807">Example: '<literal>LibreOffice 7.1.1.2 (The Document 
Foundation, Debian and Ubuntu)</literal>'</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id161600788076362" role="tablecontent" 
xml-lang="en-US" localize="false">OSName</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id21600788076758" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id871600788076196" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id781600788076694" role="tablecontent" 
xml-lang="en-US">The operating system type. Example: '<literal>Linux</literal>' 
or '<literal>Windows</literal>'.</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id471600788076885" role="tablecontent" 
xml-lang="en-US" localize="false">OSPlatform</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id261600788076841" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id661600788076636" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id11600788076757" role="tablecontent" 
xml-lang="en-US">A single string identifying the underlying platform with as 
much useful and human-readable information as possible.</paragraph>
+                <paragraph role="paragraph" 
id="par_id501614902381381">Example: 
'<literal>Linux-5.8.0-44-generic-x86_64-with-glibc2.32</literal>'</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id221600789141781" role="tablecontent" 
xml-lang="en-US" localize="false">OSRelease</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id531600789141795" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id561600789141282" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id301600789141619" role="tablecontent" 
xml-lang="en-US">The operating system's release. Example: 
'<literal>5.8.0-44-generic</literal>'</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id821600789286339" role="tablecontent" 
xml-lang="en-US" localize="false">OSVersion</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id541600789286532" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id181600789286889" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id701600789286280" role="tablecontent" 
xml-lang="en-US">The operating system's build or version.</paragraph>
+                <paragraph role="paragraph" 
id="par_id351614902520555">Example: '<literal>#50-Ubuntu SMP Tue Feb 9 06:29:41 
UTC 2021</literal>'</paragraph>
+            </tablecell>
+        </tablerow>
+        <tablerow>
+            <tablecell>
+                <paragraph id="par_id31600789527717" role="tablecontent" 
xml-lang="en-US" localize="false">Processor</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id941600789527698" role="tablecontents" 
xml-lang="en-US">Yes</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id100160078952791" role="tablecontent" 
xml-lang="en-US" localize="false">String</paragraph>
+            </tablecell>
+            <tablecell>
+                <paragraph id="par_id631600789527859" role="tablecontent" 
xml-lang="en-US">The real processor name. Example: 
'<literal>amdk6</literal>'.</paragraph>
+                <paragraph role="paragraph" id="par_id111614902598396">This 
property may return the same value as the <literal>Machine</literal> 
property.</paragraph>
+            </tablecell>
+        </tablerow>
+    </table>
+
+    <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/>
+    <section id="relatedtopics">
+      <paragraph role="paragraph" id="par_id301613075694148"><link 
href="text/sbasic/shared/03132100.xhp" name="GetGuiType Function">GetGuiType 
function</link></paragraph>
+      <paragraph role="paragraph" id="par_id301613075694148"><link 
href="text/sbasic/shared/03/lib_tools.xhp" name="Tools library">Tools 
library</link></paragraph>
+      <paragraph role="paragraph" id="par_id301613075694148"><link 
href="text/sbasic/python/python_platform.xhp" name="OS python"> Identifying the 
operating system</link></paragraph>
+    </section>
+</body>
+</helpdocument>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to