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