Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7456 from signedav/translation_projects
Translation of .qgs project data
- Loading branch information
Showing
41 changed files
with
1,954 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsprojecttranslator.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
class QgsProjectTranslator | ||
{ | ||
%Docstring | ||
Wherever an object of this class is available, the derived translate function can be called from. | ||
|
||
.. versionadded:: 3.4 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsprojecttranslator.h" | ||
%End | ||
public: | ||
|
||
|
||
virtual QString translate( const QString &context, const QString &sourceText, const char *disambiguation = 0, int n = -1 ) const = 0; | ||
%Docstring | ||
The derived translate() translates with QTranslator and qm file the sourceText. | ||
It | ||
:return: the result string and in case there is no QTranslator loaded, the sourceText. | ||
This function can be called from wherever the QgsReadWriteContext is available. | ||
|
||
:param context: describing layer etc. | ||
:param sourceText: is the identifier of this text | ||
:param disambiguation: it's the disambiguation | ||
:param n: if -1 uses the appropriate form | ||
|
||
.. versionadded:: 3.4 | ||
%End | ||
|
||
virtual ~QgsProjectTranslator(); | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsprojecttranslator.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgstranslationcontext.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsTranslationContext | ||
{ | ||
%Docstring | ||
Used for the collecting of strings from projects for translation and creation of ts files. | ||
|
||
.. versionadded:: 3.4 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgstranslationcontext.h" | ||
%End | ||
public: | ||
|
||
QgsTranslationContext(); | ||
%Docstring | ||
Constructor | ||
%End | ||
|
||
QgsProject *project() const; | ||
%Docstring | ||
Returns the project | ||
|
||
.. seealso:: :py:func:`setProject` | ||
%End | ||
|
||
void setProject( QgsProject *project ); | ||
%Docstring | ||
Sets the ``project`` being translated. | ||
|
||
.. seealso:: :py:func:`project` | ||
%End | ||
|
||
QString fileName() const; | ||
%Docstring | ||
Returns the TS fileName | ||
|
||
.. seealso:: :py:func:`setFileName` | ||
%End | ||
|
||
void setFileName( const QString &fileName ); | ||
%Docstring | ||
Sets the ``fileName`` of the TS file | ||
|
||
.. seealso:: :py:func:`fileName` | ||
%End | ||
|
||
void registerTranslation( const QString &context, const QString &source ); | ||
%Docstring | ||
Registers the ``source`` to be translated. It's the text of the object needed to be translated. | ||
The ``context`` defines in what context the object is used. Means layer name and sub category of object needed to be translated. | ||
%End | ||
|
||
void writeTsFile( const QString &locale ); | ||
%Docstring | ||
Writes the Ts-file | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgstranslationcontext.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.