ProjectFlask/Documentation/source/Plugin_Project_Flask.ProjectFlask.FlaskBabelExtension.PyBabelProjectExtension.html

changeset 19
f8e3c1676f9b
child 37
1bd8d19a3aa7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ProjectFlask/Documentation/source/Plugin_Project_Flask.ProjectFlask.FlaskBabelExtension.PyBabelProjectExtension.html	Sun Nov 22 14:12:44 2020 +0100
@@ -0,0 +1,456 @@
+<!DOCTYPE html>
+<html><head>
+<title>Plugin_Project_Flask.ProjectFlask.FlaskBabelExtension.PyBabelProjectExtension</title>
+<meta charset="UTF-8">
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body>
+<a NAME="top" ID="top"></a>
+<h1>Plugin_Project_Flask.ProjectFlask.FlaskBabelExtension.PyBabelProjectExtension</h1>
+
+<p>
+Module implementing the project support for flask-babel.
+</p>
+<h3>Global Attributes</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+
+<table>
+
+<tr>
+<td><a href="#PyBabelProject">PyBabelProject</a></td>
+<td>Class implementing the Flask project support.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr />
+<hr />
+<a NAME="PyBabelProject" ID="PyBabelProject"></a>
+<h2>PyBabelProject</h2>
+
+<p>
+    Class implementing the Flask project support.
+</p>
+<h3>Derived from</h3>
+QObject
+<h3>Class Attributes</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Class Methods</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+
+<table>
+
+<tr>
+<td><a href="#PyBabelProject.__init__">PyBabelProject</a></td>
+<td>Constructor</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.__createBabelCfg">__createBabelCfg</a></td>
+<td>Private method to create a template pybabel configuration file.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.__ensurePybabelConfigured">__ensurePybabelConfigured</a></td>
+<td>Private method to ensure, that PyBabel has been configured.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.__getLocale">__getLocale</a></td>
+<td>Private method to extract the locale out of a file name.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.__projectLanguageAdded">__projectLanguageAdded</a></td>
+<td>Private slot handling the addition of a new language.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.compileCatalogs">compileCatalogs</a></td>
+<td>Public method to compile the message catalogs.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.compileSelectedCatalogs">compileSelectedCatalogs</a></td>
+<td>Public method to update the message catalogs.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.configurePyBabel">configurePyBabel</a></td>
+<td>Public slot to show a dialog to edit the pybabel configuration.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.determineCapability">determineCapability</a></td>
+<td>Public method to determine the availability of flask-babel.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.extractMessages">extractMessages</a></td>
+<td>Public method to extract the messages catalog template file.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.flaskBabelAvailable">flaskBabelAvailable</a></td>
+<td>Public method to check, if the 'flask-babel' package is available.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.getBabelCommand">getBabelCommand</a></td>
+<td>Public method to build the Babel command.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.openPOEditor">openPOEditor</a></td>
+<td>Public method to edit the given file in an external .po editor.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.projectClosedHooks">projectClosedHooks</a></td>
+<td>Public method to remove our hook methods.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.projectOpenedHooks">projectOpenedHooks</a></td>
+<td>Public method to add our hook methods.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.registerOpenHook">registerOpenHook</a></td>
+<td>Public method to register the open hook to open a translations file in a translations editor.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.updateCatalogs">updateCatalogs</a></td>
+<td>Public method to update the message catalogs.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.updateCatalogsObsolete">updateCatalogsObsolete</a></td>
+<td>Public method to update the message catalogs keeping obsolete translations.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.updateSelectedCatalogs">updateSelectedCatalogs</a></td>
+<td>Public method to update the selected message catalogs.</td>
+</tr>
+<tr>
+<td><a href="#PyBabelProject.updateSelectedCatalogsObsolete">updateSelectedCatalogsObsolete</a></td>
+<td>Public method to update the message catalogs keeping obsolete translations.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<a NAME="PyBabelProject.__init__" ID="PyBabelProject.__init__"></a>
+<h4>PyBabelProject (Constructor)</h4>
+<b>PyBabelProject</b>(<i>plugin, project, parent=None</i>)
+
+<p>
+        Constructor
+</p>
+<dl>
+
+<dt><i>plugin</i> (ProjectFlaskPlugin)</dt>
+<dd>
+reference to the plugin object
+</dd>
+<dt><i>project</i> (Project)</dt>
+<dd>
+reference to the project object
+</dd>
+<dt><i>parent</i> (QObject)</dt>
+<dd>
+parent
+</dd>
+</dl>
+<a NAME="PyBabelProject.__createBabelCfg" ID="PyBabelProject.__createBabelCfg"></a>
+<h4>PyBabelProject.__createBabelCfg</h4>
+<b>__createBabelCfg</b>(<i>configFile</i>)
+
+<p>
+        Private method to create a template pybabel configuration file.
+</p>
+<dl>
+
+<dt><i>configFile</i> (str)</dt>
+<dd>
+name of the configuration file to be created
+</dd>
+</dl>
+<dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating successful configuration file creation
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl>
+<a NAME="PyBabelProject.__ensurePybabelConfigured" ID="PyBabelProject.__ensurePybabelConfigured"></a>
+<h4>PyBabelProject.__ensurePybabelConfigured</h4>
+<b>__ensurePybabelConfigured</b>(<i></i>)
+
+<p>
+        Private method to ensure, that PyBabel has been configured.
+</p>
+<dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating successful configuration
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl>
+<a NAME="PyBabelProject.__getLocale" ID="PyBabelProject.__getLocale"></a>
+<h4>PyBabelProject.__getLocale</h4>
+<b>__getLocale</b>(<i>filename</i>)
+
+<p>
+        Private method to extract the locale out of a file name.
+</p>
+<dl>
+
+<dt><i>filename</i> (str)</dt>
+<dd>
+name of the file used for extraction
+</dd>
+</dl>
+<dl>
+<dt>Returns:</dt>
+<dd>
+extracted locale
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str or None
+</dd>
+</dl>
+<a NAME="PyBabelProject.__projectLanguageAdded" ID="PyBabelProject.__projectLanguageAdded"></a>
+<h4>PyBabelProject.__projectLanguageAdded</h4>
+<b>__projectLanguageAdded</b>(<i>code</i>)
+
+<p>
+        Private slot handling the addition of a new language.
+</p>
+<dl>
+
+<dt><i>code</i> (str)</dt>
+<dd>
+language code of the new language
+</dd>
+</dl>
+<a NAME="PyBabelProject.compileCatalogs" ID="PyBabelProject.compileCatalogs"></a>
+<h4>PyBabelProject.compileCatalogs</h4>
+<b>compileCatalogs</b>(<i>filenames</i>)
+
+<p>
+        Public method to compile the message catalogs.
+</p>
+<dl>
+
+<dt><i>filenames</i> (list of str)</dt>
+<dd>
+list of filenames (not used)
+</dd>
+</dl>
+<a NAME="PyBabelProject.compileSelectedCatalogs" ID="PyBabelProject.compileSelectedCatalogs"></a>
+<h4>PyBabelProject.compileSelectedCatalogs</h4>
+<b>compileSelectedCatalogs</b>(<i>filenames</i>)
+
+<p>
+        Public method to update the message catalogs.
+</p>
+<dl>
+
+<dt><i>filenames</i> (list of str)</dt>
+<dd>
+list of file names
+</dd>
+</dl>
+<a NAME="PyBabelProject.configurePyBabel" ID="PyBabelProject.configurePyBabel"></a>
+<h4>PyBabelProject.configurePyBabel</h4>
+<b>configurePyBabel</b>(<i></i>)
+
+<p>
+        Public slot to show a dialog to edit the pybabel configuration.
+</p>
+<a NAME="PyBabelProject.determineCapability" ID="PyBabelProject.determineCapability"></a>
+<h4>PyBabelProject.determineCapability</h4>
+<b>determineCapability</b>(<i></i>)
+
+<p>
+        Public method to determine the availability of flask-babel.
+</p>
+<a NAME="PyBabelProject.extractMessages" ID="PyBabelProject.extractMessages"></a>
+<h4>PyBabelProject.extractMessages</h4>
+<b>extractMessages</b>(<i></i>)
+
+<p>
+        Public method to extract the messages catalog template file.
+</p>
+<a NAME="PyBabelProject.flaskBabelAvailable" ID="PyBabelProject.flaskBabelAvailable"></a>
+<h4>PyBabelProject.flaskBabelAvailable</h4>
+<b>flaskBabelAvailable</b>(<i></i>)
+
+<p>
+        Public method to check, if the 'flask-babel' package is available.
+</p>
+<dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating the availability of 'flask-babel'
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl>
+<a NAME="PyBabelProject.getBabelCommand" ID="PyBabelProject.getBabelCommand"></a>
+<h4>PyBabelProject.getBabelCommand</h4>
+<b>getBabelCommand</b>(<i></i>)
+
+<p>
+        Public method to build the Babel command.
+</p>
+<dl>
+<dt>Returns:</dt>
+<dd>
+full pybabel command
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
+<a NAME="PyBabelProject.openPOEditor" ID="PyBabelProject.openPOEditor"></a>
+<h4>PyBabelProject.openPOEditor</h4>
+<b>openPOEditor</b>(<i>poFile</i>)
+
+<p>
+        Public method to edit the given file in an external .po editor.
+</p>
+<dl>
+
+<dt><i>poFile</i> (str)</dt>
+<dd>
+name of the .po file
+</dd>
+</dl>
+<a NAME="PyBabelProject.projectClosedHooks" ID="PyBabelProject.projectClosedHooks"></a>
+<h4>PyBabelProject.projectClosedHooks</h4>
+<b>projectClosedHooks</b>(<i></i>)
+
+<p>
+        Public method to remove our hook methods.
+</p>
+<a NAME="PyBabelProject.projectOpenedHooks" ID="PyBabelProject.projectOpenedHooks"></a>
+<h4>PyBabelProject.projectOpenedHooks</h4>
+<b>projectOpenedHooks</b>(<i></i>)
+
+<p>
+        Public method to add our hook methods.
+</p>
+<a NAME="PyBabelProject.registerOpenHook" ID="PyBabelProject.registerOpenHook"></a>
+<h4>PyBabelProject.registerOpenHook</h4>
+<b>registerOpenHook</b>(<i></i>)
+
+<p>
+        Public method to register the open hook to open a translations file
+        in a translations editor.
+</p>
+<a NAME="PyBabelProject.updateCatalogs" ID="PyBabelProject.updateCatalogs"></a>
+<h4>PyBabelProject.updateCatalogs</h4>
+<b>updateCatalogs</b>(<i>filenames, withObsolete=False</i>)
+
+<p>
+        Public method to update the message catalogs.
+</p>
+<dl>
+
+<dt><i>filenames</i> (list of str)</dt>
+<dd>
+list of filenames (not used)
+</dd>
+<dt><i>withObsolete</i> (bool)</dt>
+<dd>
+flag indicating to keep obsolete translations
+</dd>
+</dl>
+<a NAME="PyBabelProject.updateCatalogsObsolete" ID="PyBabelProject.updateCatalogsObsolete"></a>
+<h4>PyBabelProject.updateCatalogsObsolete</h4>
+<b>updateCatalogsObsolete</b>(<i>filenames</i>)
+
+<p>
+        Public method to update the message catalogs keeping obsolete
+        translations.
+</p>
+<dl>
+
+<dt><i>filenames</i> (list of str)</dt>
+<dd>
+list of filenames (not used)
+</dd>
+</dl>
+<a NAME="PyBabelProject.updateSelectedCatalogs" ID="PyBabelProject.updateSelectedCatalogs"></a>
+<h4>PyBabelProject.updateSelectedCatalogs</h4>
+<b>updateSelectedCatalogs</b>(<i>filenames, withObsolete=False</i>)
+
+<p>
+        Public method to update the selected message catalogs.
+</p>
+<dl>
+
+<dt><i>filenames</i> (list of str)</dt>
+<dd>
+list of filenames
+</dd>
+<dt><i>withObsolete</i> (bool)</dt>
+<dd>
+flag indicating to keep obsolete translations
+</dd>
+</dl>
+<a NAME="PyBabelProject.updateSelectedCatalogsObsolete" ID="PyBabelProject.updateSelectedCatalogsObsolete"></a>
+<h4>PyBabelProject.updateSelectedCatalogsObsolete</h4>
+<b>updateSelectedCatalogsObsolete</b>(<i>filenames</i>)
+
+<p>
+        Public method to update the message catalogs keeping obsolete
+        translations.
+</p>
+<dl>
+
+<dt><i>filenames</i> (list of str)</dt>
+<dd>
+list of filenames (not used)
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file

eric ide

mercurial