Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
ts.cpp File Reference

(5859c5b4acb70b8796817e49fa20e121898f9ad2)

#include "translator.h"
#include <QtCore/QByteArray>
#include <QtCore/QDebug>
#include <QtCore/QRegularExpression>
#include <QtCore/QTextStream>
#include <QtCore/QXmlStreamReader>
#include <algorithm>
+ Include dependency graph for ts.cpp:

Go to the source code of this file.

Classes

class  TSReader
 

Functions

QT_BEGIN_NAMESPACE QDebugoperator<< (QDebug &d, const QXmlStreamAttribute &attr)
 
static QString byteValue (QString value)
 
static QString tsNumericEntity (int ch)
 
static QString tsProtect (const QString &str)
 
static void writeExtras (QTextStream &t, const char *indent, const TranslatorMessage::ExtraData &extras, QRegularExpression drops)
 
static void writeVariants (QTextStream &t, const char *indent, const QString &input)
 
bool saveTS (const Translator &translator, QIODevice &dev, ConversionData &cd)
 
bool loadTS (Translator &translator, QIODevice &dev, ConversionData &cd)
 
int initTS ()
 

Function Documentation

◆ byteValue()

static QString byteValue ( QString value)
static

Definition at line 92 of file ts.cpp.

◆ initTS()

int initTS ( )

Definition at line 650 of file ts.cpp.

References Translator::FileFormat::loader, loadTS(), Translator::FileFormat::priority, Translator::registerFileFormat(), Translator::FileFormat::saver, saveTS(), Translator::FileFormat::TranslationSource, and Translator::FileFormat::untranslatedDescription.

+ Here is the call graph for this function:

◆ loadTS()

bool loadTS ( Translator & translator,
QIODevice & dev,
ConversionData & cd )

Definition at line 644 of file ts.cpp.

References TSReader::TSReader(), and TSReader::read().

Referenced by initTS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator<<()

QT_BEGIN_NAMESPACE QDebug & operator<< ( QDebug & d,
const QXmlStreamAttribute & attr )

Definition at line 19 of file ts.cpp.

◆ saveTS()

bool saveTS ( const Translator & translator,
QIODevice & dev,
ConversionData & cd )

Definition at line 485 of file ts.cpp.

References Translator::extras(), and ConversionData::sortContexts().

Referenced by initTS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tsNumericEntity()

static QString tsNumericEntity ( int ch)
static

Definition at line 407 of file ts.cpp.

◆ tsProtect()

static QString tsProtect ( const QString & str)
static

Definition at line 413 of file ts.cpp.

◆ writeExtras()

static void writeExtras ( QTextStream & t,
const char * indent,
const TranslatorMessage::ExtraData & extras,
QRegularExpression drops )
static

Definition at line 446 of file ts.cpp.

◆ writeVariants()

static void writeVariants ( QTextStream & t,
const char * indent,
const QString & input )
static

Definition at line 462 of file ts.cpp.

References Translator::BinaryVariantSeparator.