lokalize
catalog.cpp
Go to the documentation of this file.
70 QString Catalog::supportedMimeFilters("text/x-gettext-translation application/x-xliff application/x-linguist");
75 I18N_NOOP("New"),I18N_NOOP("Needs translation"),I18N_NOOP("Needs full localization"),I18N_NOOP("Needs adaptation"),I18N_NOOP("Translated"),
76 I18N_NOOP("Needs translation review"),I18N_NOOP("Needs full localization review"),I18N_NOOP("Needs adaptation review"),I18N_NOOP("Final"),
224 return m_storage->catalogString(pos.part==DocPosition::Source?alterForSinglePlural(this, pos):pos);
282 kDebug()<<"ignoring"<<altCat->url().prettyUrl()<<"this time because"<<pos.entry<<"<"<<altCat->numberOfEntries();
641 if (KDE_ISUNLIKELY( !file->open(QIODevice::WriteOnly) )) //i18n("Wasn't able to open file %1",filename.ascii());
795 bool CatalogPrivate::addToEmptyIndexIfAppropriate(CatalogStorage* storage, const DocPosition& pos, bool alreadyEmpty)
818 bool CatalogPrivate::removeFromUntransIndexIfAppropriate(CatalogStorage* storage, const DocPosition& pos)
Definition: xliffstorage.h:32
void setInterval(int msec)
CatalogString targetWithTags(const DocPosition &pos) const
Definition: catalog.cpp:211
QVector< AltTrans > altTrans(const DocPosition &pos) const
Definition: catalog.cpp:272
virtual void targetInsert(const DocPosition &pos, const QString &arg)=0
virtual QString source(const DocPosition &pos) const =0
flat-model interface (ignores XLIFF grouping)
bool contains(const Key &key) const
bool removeFromUntransIndexIfAppropriate(CatalogStorage *, const DocPosition &pos)
Definition: catalog.cpp:818
virtual TargetState setState(const DocPosition &, TargetState)
Definition: catalogstorage.h:136
int loadFromUrl(const KUrl &url, const KUrl &saidUrl=KUrl(), int *fileSize=0, bool fast=false)
Definition: catalog.cpp:508
void setEquivTrans(const DocPosition &, bool equivTrans)
Definition: catalog.cpp:910
QString readLine(qint64 maxlen)
bool isApproved(TargetState state, ProjectLocal::PersonRole role)
Definition: catalog.cpp:993
virtual CatalogString catalogString(const DocPosition &pos) const =0
Definition: state.h:36
TargetState setState(const DocPosition &pos, TargetState state)
Definition: catalog.cpp:872
virtual void targetInsertTag(const DocPosition &, const InlineTag &)
Definition: catalogstorage.h:76
void clear()
virtual void setApproved(const DocPosition &, bool approved)
Definition: catalogstorage.h:134
iterator begin()
T takeFirst()
void signalNumberOfFuzziesChanged()
const T & at(int i) const
QString fileName() const
void generatePhaseForCatalogIfNeeded(Catalog *catalog)
Definition: phase.cpp:47
T & last()
QVector< Note > phaseNotes(const QString &phase) const
Definition: catalog.cpp:390
virtual QVector< Note > notes(const DocPosition &pos) const =0
iterator insert(iterator before, const T &value)
Q_SCRIPTABLE void signalFileLoaded()
virtual QString target(const DocPosition &pos) const =0
int binUnitsCount() const
so DocPosition::entry may actually be < size()+binUnitsCount()
Definition: catalog.cpp:448
const_iterator insert(const T &value)
CatalogString catalogString(const DocPosition &pos) const
Definition: catalog.cpp:219
void clear()
void attachAltTrans(int entry, const AltTrans &trans)
Definition: catalog.cpp:267
int findPrevInList(const QLinkedList< int > &list, int index)
Definition: catalog.cpp:964
QDir root()
virtual void setTarget(const DocPosition &pos, const QString &arg)=0
virtual QString mimetype() const =0
void setActivePhase(const QString &phase, ProjectLocal::PersonRole role=ProjectLocal::Approver)
Definition: catalog.cpp:339
iterator end()
virtual QString phase(const DocPosition &pos) const
Definition: catalogstorage.h:94
virtual QStringList sourceFiles(const DocPosition &pos) const =0
int size() const
Definition: state.h:33
QVector< Note > developerNotes(const DocPosition &pos) const
Definition: catalog.cpp:236
QLinkedList< int > _nonApprovedIndex
Definition: catalog_private.h:89
virtual QVector< Note > phaseNotes(const QString &phase) const
Definition: catalogstorage.h:96
void setTarget(DocPosition pos, const CatalogString &s)
Definition: catalog.cpp:866
InlineTag targetDeleteTag(const DocPosition &pos)
Definition: catalog.cpp:852
int elapsed() const
virtual CatalogString sourceWithTags(DocPosition pos) const =0
Definition: tsstorage.h:32
void append(const T &value)
void setIndex(int idx)
bool atEnd() const
bool isEmpty() const
static DocPosition alterForSinglePlural(const Catalog *th, DocPosition pos)
Definition: catalog.cpp:179
Q_SCRIPTABLE void signalFileSaved()
void targetInsertTag(const DocPosition &pos, const InlineTag &tag)
Definition: catalog.cpp:840
void flushUpdateDBBuffer()
updates DB for _posBuffer and accompanying _originalForLastModified
Definition: catalog.cpp:752
bool isEmpty() const
virtual bool isEquivTrans(const DocPosition &) const
Definition: catalogstorage.h:130
virtual CatalogString targetWithTags(DocPosition pos) const =0
virtual QVector< Note > developerNotes(const DocPosition &pos) const =0
int cleanIndex() const
Definition: state.h:37
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
void setClean()
virtual bool open(QFlags< QIODevice::OpenModeFlag > flags)
void deleteLater()
T & first()
QVector< Note > setPhaseNotes(const QString &phase, QVector< Note >)
Definition: catalog.cpp:395
virtual KAutoSaveFile * checkAutoSave(const KUrl &url)
Definition: catalog.cpp:489
Definition: phase.h:34
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
Definition: state.h:41
virtual int unitById(const QString &id) const
Definition: catalogstorage.h:141
const QByteArray & data() const
virtual QVector< Note > setPhaseNotes(const QString &phase, QVector< Note > notes)
Definition: catalogstorage.h:97
virtual void setEquivTrans(const DocPosition &, bool equivTrans)
Definition: catalogstorage.h:131
Definition: alttrans.h:33
void indexChanged(int idx)
virtual QVector< AltTrans > altTrans(const DocPosition &pos) const =0
void activePhaseChanged()
Definition: state.h:40
bool contains(QChar ch, Qt::CaseSensitivity cs) const
virtual qint64 size() const
void signalNumberOfEmptyChanged()
virtual bool save(QIODevice *device, bool belongsToProject=false)=0
void targetInsert(const DocPosition &pos, const QString &arg)
Definition: catalog.cpp:828
virtual void close()
bool contains(const T &value) const
Note setNote(const DocPosition &pos, const Note ¬e)
pos.form is note number
Definition: catalog.cpp:244
static void updateDB(const QString &filePath, const QString &ctxt, const CatalogString &english, const CatalogString &newTarget, int form, bool approved)
helper method to keep db in a good shape :) called on 1) entry switch 2) automatic editing code like ...
Definition: catalog.cpp:722
data structure used to pass info about inline elements a XLIFF tag is represented by a TAGRANGE_IMAGE...
Definition: catalogstring.h:128
bool isClean() const
bool addToEmptyIndexIfAppropriate(CatalogStorage *, const DocPosition &pos, bool alreadyEmpty)
Definition: catalog.cpp:795
virtual void close()
void redo()
bool remove(const T &value)
Definition: catalogcapabilities.h:32
void signalEntryModified(const DocPosition &)
virtual bool isEmpty(const DocPosition &) const =0
QMap< int, AltTrans > _altTranslations
Definition: catalog_private.h:99
virtual bool isPlural(const DocPosition &) const =0
virtual int size() const =0
CatalogString sourceWithTags(const DocPosition &pos) const
Definition: catalog.cpp:203
Definition: pos.h:43
virtual Note setNote(DocPosition pos, const Note ¬e)=0
void targetDelete(const DocPosition &pos, int count)
Definition: catalog.cpp:805
QVector< QLinkedList< int > > _statesIndex
Definition: catalog_private.h:95
virtual void targetDelete(const DocPosition &pos, int count)=0
edit operations used by undo/redo system and sync-mode
virtual QMap< QString, Tool > allTools() const
Definition: catalogstorage.h:80
void undo()
virtual int load(QIODevice *device)=0
void start()
This class represents a catalog It uses CatalogStorage interface to work with catalogs in different f...
Definition: catalog.h:74
iterator insert(const Key &key, const T &value)
virtual int capabilities() const =0
int findNextInList(const QLinkedList< int > &list, int index)
Definition: catalog.cpp:950
void signalFileAutoSaveFailed(const QString &)
void clear()
Implementation of storage for Gettext PO.
Definition: gettextstorage.h:39
QStringList sourceFiles(const DocPosition &pos) const
Definition: catalog.cpp:306
Definition: catalog_private.h:60
QString absolutePath() const
void updateApprovedEmptyIndexCache()
Definition: catalog.cpp:347
int removeAll(const T &value)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual TargetState state(const DocPosition &) const
Definition: catalogstorage.h:135
void setLastModifiedPos(const DocPosition &)
(EDITING) accessed from undo/redo code called BEFORE modification
Definition: catalog.cpp:783
QString setPhase(const DocPosition &pos, const QString &phase)
Definition: catalog.cpp:330
virtual QStringList context(const DocPosition &) const =0
Definition: alttrans.h:30
virtual InlineTag targetDeleteTag(const DocPosition &)
Definition: catalogstorage.h:77
data structure used to pass info about inline elements a XLIFF tag is represented by a TAGRANGE_IMAGE...
Definition: catalogstring.h:44
virtual QString setPhase(const DocPosition &pos, const QString &phase)
Definition: catalogstorage.h:93
void push(QUndoCommand *cmd)
void append(const T &value)
void clear()
const T value(const Key &key) const
void setSingleShot(bool singleShot)
TargetState closestState(bool approved, ProjectLocal::PersonRole role)
Definition: catalog.cpp:1005
QLinkedList< Catalog * > _altTransCatalogs
Definition: catalog_private.h:98
virtual bool isApproved(const DocPosition &) const
Definition: catalogstorage.h:133
void copyToBaseCatalog(DocPosition &pos)
Definition: mergecatalog.cpp:263
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.