source/text/sbasic/shared/03/sf_dialog.xhp |  101 ++++++++++++++++++++---------
 source/text/sbasic/shared/03/sf_l10n.xhp   |   70 +++++++++++++++++---
 2 files changed, 133 insertions(+), 38 deletions(-)

New commits:
commit 053d65c6f001c97da41cc8fc43f9e55915c9c3ca
Author:     Rafael Lima <rafael.palma.l...@gmail.com>
AuthorDate: Thu Nov 25 19:59:20 2021 +0200
Commit:     Alain Romedenne <alain.romede...@libreoffice.org>
CommitDate: Tue Nov 30 15:40:20 2021 +0100

    Document new methods in SFL10N and SF_Dialog
    
    Change-Id: I02fa64860982969b5d7580d11781906ec354502d
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125829
    Tested-by: Jenkins
    Reviewed-by: Alain Romedenne <alain.romede...@libreoffice.org>

diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp 
b/source/text/sbasic/shared/03/sf_dialog.xhp
index eef18e9e3..cc87748b0 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -251,7 +251,6 @@
       </tablerow>
    </table>
    <h2 id="hd_id421612628828054" xml-lang="en-US">Event properties</h2>
-   <embed href="text/sbasic/shared/03/avail_release.xhp#7.2.events"/>
    <paragraph role="paragraph" id="par_id41612629140856" 
xml-lang="en-US">Returns a URI string with the reference to the script 
triggered by the event. Read its specification in the <link 
href="https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification";
 name="URI specification">scripting framework URI 
specification</link>.</paragraph>
    <table id="tab_id951612628879819">
       <tablerow>
@@ -392,11 +391,13 @@
            <link href="text/sbasic/shared/03/sf_dialog.xhp#Execute" 
name="Execute method">Execute</link><br/>
        </paragraph></tablecell>
        <tablecell><paragraph id="par_id161606472825856" role="tablecontent" 
localize="false">
-           <link href="text/sbasic/shared/03/sf_dialog.xhp#Terminate" 
name="Terminate method">Terminate</link><br/>
+           <link href="text/sbasic/shared/03/sf_dialog.xhp#GetTextsFromL10N" 
name="GetTextsFromL10N method">GetTextsFromL10N</link><br/>
+         <link href="text/sbasic/shared/03/sf_dialog.xhp#Terminate" 
name="Terminate method">Terminate</link><br/>
        </paragraph></tablecell>
     </tablerow>
     </table>
-  <section id="Activate">
+
+<section id="Activate">
   <comment> Activate 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
    <bookmark xml-lang="en-US" localize="false" branch="index" 
id="bm_id721583933076548">
       <bookmark_value>Dialog service;Activate</bookmark_value>
@@ -404,9 +405,9 @@
    <h2 id="hd_id681583933076692" localize="false">Activate</h2>
    <paragraph role="paragraph" id="par_id871583933076448">Set the focus on the 
current <literal>Dialog</literal> instance. Return <literal>True</literal> if 
focusing was successful.</paragraph>
    <paragraph role="paragraph" id="par_id151598178880227" 
xml-lang="en-US">This method is called from a dialog or control event, or when 
a dialog is displayed in non-modal mode.</paragraph>
-   <h3 id="hd_id61583933076171" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
    <paragraph role="paragraph" localize="false" 
id="par_id581619625572111"><input>svc.Activate(): bool</input></paragraph>
-   <h3 id="hd_id26158393307687" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
    <bascode>
       <paragraph role="bascode" localize="false" 
id="bas_id221598179105596">Dim oDlg As Object</paragraph>
       <paragraph role="bascode" localize="false" 
id="bas_id171598179111121">Set oDlg = CreateScriptService(,, 
"myDialog")</paragraph>
@@ -421,9 +422,10 @@
      <paragraph role="pycode" localize="false" id="pyc_id781620108954143"># 
...</paragraph>
      <paragraph role="pycode" localize="false" 
id="pyc_id391619626869458">dlg.Activate()</paragraph>
    </pycode>
-   </section>
-   <section id="Controls">
-   <comment> Controls 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
+</section>
+
+<section id="Controls">
+  <comment> Controls 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
    <bookmark xml-lang="en-US" localize="false" branch="index" 
id="bm_id41584541257826">
       <bookmark_value>Dialog service;Controls</bookmark_value>
    </bookmark>
@@ -437,12 +439,12 @@
          <paragraph id="par_id81598185229301" role="listitem" 
xml-lang="en-US">a <literal>DialogControl</literal> class instance based on its 
name</paragraph>
       </listitem>
    </list>
-   <h3 id="hd_id601584541257443" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
    <paragraph role="paragraph" localize="false" 
id="par_id81619625753895"><input>svc.Controls(): str[0..*]</input></paragraph>
    <paragraph role="paragraph" localize="false" 
id="par_id61819625753598"><input>svc.Controls(controlname: str): 
svc</input></paragraph>
-   <h3 id="hd_id291584541257237" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
    <paragraph role="paragraph" 
id="par_id1001584541257789"><emph>ControlName</emph> : A valid control name as 
a case-sensitive string. If absent, the list of control names is returned as a 
zero-based array.</paragraph>
-   <h3 id="hd_id32158454125769" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
    <bascode>
       <paragraph role="bascode" localize="false" 
id="bas_id151598185478904">Dim myDialog As Object, myList As Variant, myControl 
As Object</paragraph>
       <paragraph role="bascode" localize="false" id="bas_id21598185484092">Set 
myDialog = CreateScriptService("SFDialogs.Dialog", , "Standard", 
"Dialog1")</paragraph>
@@ -454,20 +456,21 @@
      <paragraph role="pycode" localize="false" 
id="pyc_id431619627576082">ctrls = dlg.Controls()</paragraph>
      <paragraph role="pycode" localize="false" id="pyc_id131619627576307">ctrl 
= dlg.Controls('myTextBox')</paragraph>
    </pycode>
-   </section>
-   <section id="EndExecute">
-   <comment> EndExecute 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
+</section>
+
+<section id="EndExecute">
+  <comment> EndExecute 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
    <bookmark xml-lang="en-US" localize="false" branch="index" 
id="bm_id171598185776261">
       <bookmark_value>Dialog service;EndExecute</bookmark_value>
    </bookmark>
    <h2 id="hd_id491598185776436" localize="false">EndExecute</h2>
    <paragraph role="paragraph" id="par_id381598185776500">Ends the display of 
a modal dialog and gives back the argument as return value for the current 
<literal>Execute()</literal> running action.</paragraph>
    <paragraph role="paragraph" 
id="par_id551598185953362"><literal>EndExecute()</literal> is usually contained 
in the processing of a macro triggered by a dialog or control event.</paragraph>
-   <h3 id="hd_id16159818577649" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
    <paragraph role="paragraph" localize="false" 
id="par_id451619627879243"><input>svc.EndExecute(returnvalue: 
int)</input></paragraph>
-   <h3 id="hd_id721598185776413" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
    <paragraph role="paragraph" 
id="par_id451598185776957"><emph>returnvalue</emph>: The value passed to the 
running <literal>Execute()</literal> method.</paragraph>
-   <h3 id="hd_id771598185776435" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
    <paragraph role="paragraph" id="par_id411620110780170">Using %PRODUCTNAME 
Basic:</paragraph>
    <bascode>
       <paragraph role="bascode" localize="false" 
id="bas_id521598186134426">Sub OnEvent(poEvent As 
com.sun.star.lang.EventObject)</paragraph>
@@ -484,9 +487,10 @@
      <paragraph role="pycode" localize="false" id="pyc_id191619627976590">    
dlg.EndExecute(25)</paragraph>
    </pycode>
      <tip id="par_id81620201915101">Above <link 
href="https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1lang_1_1EventObject.html";
 name="com.sun.star.lang.EventObject">com.sun.star.lang.EventObject</link> 
mentions are optional. Such annotations help identify %PRODUCTNAME Application 
Programming Interface (API).</tip>
-   </section>
-   <section id="Execute">
-   <comment> Execute 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
+</section>
+
+<section id="Execute">
+  <comment> Execute 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
     <bookmark xml-lang="en-US" localize="false" branch="index" 
id="bm_id351598186461621">
    <bookmark_value>Dialog service;Execute</bookmark_value></bookmark>
    <h2 id="hd_id531598186461915" localize="false">Execute</h2>
@@ -503,11 +507,11 @@
       </listitem>
    </list>
    <paragraph role="paragraph" id="par_id741598187335869" xml-lang="en-US">For 
non-modal dialog boxes the method always returns 0 and the execution of the 
macro continues.</paragraph>
-   <h3 id="hd_id491598186461869" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
    <paragraph role="paragraph" localize="false" 
id="par_id291619628195418"><input>svc.Execute(modal: bool = True): 
int</input></paragraph>
-   <h3 id="hd_id331598186461152" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
    <paragraph role="paragraph" id="par_id11598186461227"><emph>modal</emph>: 
<literal>False</literal> when non-modal dialog. Default = 
<literal>True</literal>.</paragraph>
-   <h3 id="hd_id28159818646198" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
    <paragraph role="paragraph" id="par_id231620110023843">In this Basic 
example <literal>myDialog</literal> dialog is stored in current document's 
<literal>Standard</literal> library.</paragraph>
    <bascode>
       <paragraph role="bascode" localize="false" 
id="bas_id591598186461923">Dim oDlg As Object, lReturn As Long</paragraph>
@@ -524,17 +528,53 @@
      <paragraph role="pycode" localize="false" id="pyc_id211620109965604">if 
rc == dlg.CANCELBUTTON:</paragraph>
      <paragraph role="pycode" localize="false" id="pyc_id61620109984292">    # 
...</paragraph>
    </pycode>
-   </section>
-   <section id="Terminate">
-   <comment> Terminate 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
+</section>
+
+<section id="GetTextsFromL10N">
+  <comment> GetTextsFromL10N 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
+   <bookmark xml-lang="en-US" localize="false" branch="index" 
id="bm_id141598187953209">
+      <bookmark_value>Dialog service;GetTextsFromL10N</bookmark_value>
+   </bookmark>
+   <h2 id="hd_id101598187950391" localize="false">GetTextsFromL10N</h2>
+   <paragraph role="paragraph" id="par_id21598187900349">Replaces all fixed 
text strings in a dialog by their translated versions based on a 
<literal>L10N</literal> service instance. This method translates the following 
strings:</paragraph>
+   <embed href="text/sbasic/shared/03/sf_l10n.xhp#L10NDlgControls"/>
+   <paragraph role="paragraph" id="par_id641625855723650">The method returns 
<literal>True</literal> if successful.</paragraph>
+   <paragraph role="paragraph" id="par_id61637871260604">To create a list of 
translatable strings in a dialog use the <link 
href="text/sbasic/shared/03/sf_l10n.xhp#AddTextsFromDialog" 
name="AddTextsFromDialog">AddTextsFromDialog</link> method from the L10N 
service.</paragraph>
+   <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+   <paragraph role="paragraph" localize="false" id="par_id171619628383909">
+     <input>svc.GetTextsFromL10N(l10n: svc): bool</input>
+   </paragraph>
+   <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+   <paragraph role="paragraph" id="par_id451598185776205"><emph>l10n</emph>: A 
<literal>L10N</literal> service instance from which translated strings will be 
retrieved.</paragraph>
+   <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+   <paragraph role="paragraph" id="par_id951620300689850">The following 
example loads translated strings and applies them to the dialog 
"MyDialog".</paragraph>
+   <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+   <bascode>
+     <paragraph role="bascode" localize="false" 
id="bas_id971620301083254">oDlg = CreateScriptService("Dialog", "GlobalScope", 
"Standard", "MyDialog")</paragraph>
+     <paragraph role="bascode" localize="false" 
id="bas_id981620301085205">myPO = CreateScriptService("L10N", 
"/home/user/po_files/")</paragraph>
+     <paragraph role="bascode" localize="false" 
id="bas_id916203010852399">oDlg.GetTextsFromL10N(myPO)</paragraph>
+     <paragraph role="bascode" localize="false" 
id="bas_id121598187953341">oDlg.Execute()</paragraph>
+   </bascode>
+   <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+   <pycode>
+     <paragraph role="pycode" localize="false" id="pyc_id491620303073122">dlg 
= CreateScriptService("Dialog", "GlobalScope", "Standard", 
"MyDialog")</paragraph>
+     <paragraph role="pycode" localize="false" id="pyc_id841620302327011">myPO 
= CreateScriptService("L10N", "/home/user/po_files/")</paragraph>
+     <paragraph role="pycode" localize="false" 
id="pyc_id381620302328388">dlg.GetTextsFromL10N(myPO)</paragraph>
+     <paragraph role="pycode" localize="false" 
id="pyc_id251620302328896">dlg.Execute()</paragraph>
+   </pycode>
+   <tip id="par_id901637872163895">Read the <link 
href="text/sbasic/shared/03/sf_l10n.xhp" name="L10N">L10N service</link> help 
page to learn more about how PO and POT files are handled.</tip>
+</section>
+
+<section id="Terminate">
+  <comment> Terminate 
--------------------------------------------------------------------------------------------------------------------------
 </comment>
    <bookmark xml-lang="en-US" localize="false" branch="index" 
id="bm_id141598187953729">
       <bookmark_value>Dialog service;Terminate</bookmark_value>
    </bookmark>
    <h2 id="hd_id101598187953201" localize="false">Terminate</h2>
    <paragraph role="paragraph" id="par_id21598187953679">Terminate the 
<literal>Dialog</literal> service for the current instance. Return 
<literal>True</literal> if the termination was successful.</paragraph>
-   <h3 id="hd_id221598187953425" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
    <paragraph role="paragraph" localize="false" 
id="par_id171619628389339"><input>svc.Terminate(): bool</input></paragraph>
-   <h3 id="hd_id361598187953840" localize="false"><embedvar 
href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
+   <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
    <paragraph role="paragraph" id="par_id951620300687150">Below Basic and 
Python examples open <literal>DlgConsole</literal> and 
<literal>dlgTrace</literal> non-modal dialogs. They are respectively stored in 
<literal>ScriptForge</literal> and <literal>Access2Base</literal> shared 
libraries. Dialog close buttons are disabled and explicit termination is 
performed at the end of a running process.</paragraph>
    <paragraph role="paragraph" id="par_id301620302137482">In this example a 
button in <literal>DlgConsole</literal> is substituting inhibited window 
closing:</paragraph>
    <bascode>
@@ -551,11 +591,12 @@
      <paragraph role="pycode" localize="false" 
id="pyc_id251620302328330">sleep 5</paragraph>
      <paragraph role="pycode" localize="false" 
id="pyc_id101620302328498">dlg.Terminate()</paragraph>
    </pycode>
-   </section>
+</section>
+
    <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/>
    <section id="relatedtopics">
       <embed href="text/sbasic/shared/03/sf_dialogcontrol.xhp#ctrls_h1"/>
       <embed href="text/sbasic/shared/03/sf_ui.xhp#UIService"/>
    </section>
 </body>
-</helpdocument>
\ No newline at end of file
+</helpdocument>
diff --git a/source/text/sbasic/shared/03/sf_l10n.xhp 
b/source/text/sbasic/shared/03/sf_l10n.xhp
index e7422c9e7..c2e359ef8 100644
--- a/source/text/sbasic/shared/03/sf_l10n.xhp
+++ b/source/text/sbasic/shared/03/sf_l10n.xhp
@@ -38,12 +38,15 @@
     <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>
-    <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>
+    <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 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>
       </listitem>
+      <listitem>
+        <paragraph id="par_id81637866601151" 
role="listitem"><emph>AddTextsFromDialog</emph>: Extracts all strings from a 
<literal>Dialog</literal> service instance.</paragraph>
+      </listitem>
       <listitem>
         <paragraph id="par_id681585843652331"  role="listitem" 
xml-lang="en-US"><emph>ExportToPOTFile</emph>: Exports the strings added by the 
<literal>AddText</literal> method to a POT file.</paragraph>
       </listitem>
@@ -172,17 +175,18 @@
    <tablerow>
        <tablecell>
          <paragraph id="par_id611614360519255" role="tablecontent" 
localize="false">
-           <link href="text/sbasic/shared/03/sf_l10n.xhp#AddText" 
name="AddText">AddText</link>
+           <link href="text/sbasic/shared/03/sf_l10n.xhp#AddText" 
name="AddText">AddText</link><br/>
+           <link href="text/sbasic/shared/03/sf_l10n.xhp#AddTextsFromDialog" 
name="AddTextsFromDialog">AddTextsFromDialog</link>
          </paragraph>
        </tablecell>
        <tablecell>
          <paragraph id="par_id611614360519104" role="tablecontent" 
localize="false">
-           <link href="text/sbasic/shared/03/sf_l10n.xhp#ExportToPOTFile" 
name="ExportToPOTFile">ExportToPOTFile</link>
+           <link href="text/sbasic/shared/03/sf_l10n.xhp#ExportToPOTFile" 
name="ExportToPOTFile">ExportToPOTFile</link><br/><br/>
          </paragraph>
        </tablecell>
        <tablecell>
          <paragraph id="par_id611614360518452" role="tablecontent" 
localize="false">
-           <link href="text/sbasic/shared/03/sf_l10n.xhp#GetText" 
name="GetText">GetText</link>
+           <link href="text/sbasic/shared/03/sf_l10n.xhp#GetText" 
name="GetText">GetText</link><br/><br/>
          </paragraph>
        </tablecell>
    </tablerow>
@@ -216,9 +220,59 @@
     </bascode>
     <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
     <pycode>
-      <paragraph role="pycode" localize="false" 
id="pyc_id821625856085583">myPO.AddText(msgid = 'This is a string to be 
included in a POT file')</paragraph>
-      <paragraph role="pycode" localize="false" 
id="pyc_id821625856440596">myPO.AddText('CTX1', 'A string with a 
context')</paragraph>
-      <paragraph role="pycode" localize="false" 
id="pyc_id521625856443065">myPO.AddText(msgid = 'Provide a String value', 
comment = 'Do not translate the word String')</paragraph>
+      <paragraph role="pycode" localize="false" 
id="pyc_id821625856085258">myPO.AddText(msgid = 'This is a string to be 
included in a POT file')</paragraph>
+      <paragraph role="pycode" localize="false" 
id="pyc_id821625856440025">myPO.AddText('CTX1', 'A string with a 
context')</paragraph>
+      <paragraph role="pycode" localize="false" 
id="pyc_id521625856443322">myPO.AddText(msgid = 'Provide a String value', 
comment = 'Do not translate the word String')</paragraph>
+    </pycode>
+</section>
+  
+<section id="AddTextsFromDialog">
+  <comment> AddTextsFromDialog 
-------------------------------------------------------------------------------------
 </comment>
+  <bookmark xml-lang="en-US" localize="false" branch="index" 
id="bm_id951585843650024">
+    <bookmark_value>L10N service;AddTextsFromDialog</bookmark_value>
+  </bookmark>
+  <h2 id="hd_id191585843652058" localize="false">AddTextsFromDialog</h2>
+  <paragraph role="paragraph" id="par_id1001585843659821">Automatically 
extracts strings from a dialog and adds them to the list of localizable text 
strings. The following strings are extracted:</paragraph>
+  <section id="L10NDlgControls">
+    <list type="unordered">
+      <listitem>
+          <paragraph id="par_id621637863440015" role="listitem">The title of 
the dialog.</paragraph>
+      </listitem>
+      <listitem>
+          <paragraph id="par_id61637863440399" role="listitem">The caption of 
the following control types: Button, CheckBox, FixedLine, FixedText, GroupBox 
and RadioButton.</paragraph>
+      </listitem>
+      <listitem>
+          <paragraph id="par_id251637863440626" role="listitem">Static strings 
in ListBoxes and ComboBoxes.</paragraph>
+      </listitem>
+      <listitem>
+          <paragraph id="par_id811637863596791" role="listitem">The tooltip or 
help text displayed when the mouse hovers over the control.</paragraph>
+      </listitem>
+    </list>
+  </section>
+  <paragraph role="paragraph" id="par_id641625855723650">The method returns 
<literal>True</literal> if successful.</paragraph>
+  <note id="par_id731637863894577">The dialog from which strings will be 
extracted must not be open when the method is called.</note>
+  <paragraph role="paragraph" id="par_id911637864050221">When a 
<literal>L10N</literal> service instance is created from an existing PO file, 
use the <link href="text/sbasic/shared/03/sf_dialog.xhp#GetTextsFromL10N" 
name="GetTextsFromL10N">GetTextsFromL10N</link> method from the 
<literal>Dialog</literal> service to automatically load all translated strings 
into the dialog.</paragraph>
+    <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+    <paragraph role="paragraph" localize="false" id="par_id241625855910158">
+      <input>svc.AddTextsFromDialog(dialog: svc): bool</input>
+    </paragraph>
+    <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+    <paragraph role="paragraph" 
id="par_id391585843652113"><emph>dialog</emph>: a Dialog service instance 
corresponding to the dialog from which strings will be extracted.</paragraph>
+    <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+    <paragraph role="paragraph" id="par_id461614364298983">The following 
example extracts all strings from the dialog "MyDialog" stored in the 
"Standard" library and exports them to a POT file:</paragraph>
+    <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+    <bascode>
+      <paragraph role="bascode" localize="false" 
id="bas_id61585843652225">oDlg = CreateScriptService("Dialog", "GlobalScope", 
"Standard", "MyDialog")</paragraph>
+      <paragraph role="bascode" localize="false" 
id="bas_id61585843652012">myPO = CreateScriptService("L10N")</paragraph>
+      <paragraph role="bascode" localize="false" 
id="bas_id61585843653117">myPO.AddTextsFromDialog(oDlg)</paragraph>
+      <paragraph role="bascode" localize="false" 
id="bas_id68163786595435">myPO.ExportToPOTFile("en-US.pot")</paragraph>
+    </bascode>
+    <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+    <pycode>
+      <paragraph role="pycode" localize="false" id="pyc_id821625856085583">dlg 
= CreateScriptService("Dialog", "GlobalScope", "Standard", 
"Dialog1")</paragraph>
+      <paragraph role="pycode" localize="false" 
id="pyc_id821625856440596">myPO = CreateScriptService("L10N")</paragraph>
+      <paragraph role="pycode" localize="false" 
id="pyc_id521625856443065">myPO.AddTextsFromDialog(dlg)</paragraph>
+      <paragraph role="pycode" localize="false" 
id="pyc_id401637866328706">myPO.ExportToPOTFile("en-US.pot")</paragraph>
     </pycode>
 </section>
 

Reply via email to