QGIS API Documentation
3.6.0-Noosa (5873452)
|
Used for the collecting of strings from projects for translation and creation of ts files. More...
#include <qgstranslationcontext.h>
Public Member Functions | |
QgsTranslationContext ()=default | |
Constructor. More... | |
QString | fileName () const |
Returns the TS fileName. More... | |
QgsProject * | project () const |
Returns the project. More... | |
void | registerTranslation (const QString &context, const QString &source) |
Registers the source to be translated. More... | |
void | setFileName (const QString &fileName) |
Sets the fileName of the TS file. More... | |
void | setProject (QgsProject *project) |
Sets the project being translated. More... | |
void | writeTsFile (const QString &locale) |
Writes the Ts-file. More... | |
Used for the collecting of strings from projects for translation and creation of ts files.
Definition at line 35 of file qgstranslationcontext.h.
|
default |
Constructor.
QString QgsTranslationContext::fileName | ( | ) | const |
Returns the TS fileName.
Definition at line 35 of file qgstranslationcontext.cpp.
QgsProject * QgsTranslationContext::project | ( | ) | const |
void QgsTranslationContext::registerTranslation | ( | const QString & | context, |
const QString & | source | ||
) |
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.
Definition at line 45 of file qgstranslationcontext.cpp.
void QgsTranslationContext::setFileName | ( | const QString & | fileName | ) |
Sets the fileName of the TS file.
Definition at line 40 of file qgstranslationcontext.cpp.
void QgsTranslationContext::setProject | ( | QgsProject * | project | ) |
Sets the project being translated.
Definition at line 30 of file qgstranslationcontext.cpp.
void QgsTranslationContext::writeTsFile | ( | const QString & | locale | ) |
Writes the Ts-file.
Definition at line 53 of file qgstranslationcontext.cpp.