forked from qt-creator/qt-creator
Git: Simplify translations
Change-Id: I6b1af54d6cb5bc5569f5fffdec29f00b37a34436 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
0bcfc977e9
commit
b98f2a3059
@@ -195,27 +195,27 @@ QString CommitData::stateDisplayName(const FileStates &state)
|
||||
{
|
||||
QString resultState;
|
||||
if (state == UntrackedFile)
|
||||
return QCoreApplication::translate("Git::Internal::CommitData", "untracked");
|
||||
return tr("untracked");
|
||||
|
||||
if (state & StagedFile)
|
||||
resultState = QCoreApplication::translate("Git::Internal::CommitData", "staged + ");
|
||||
resultState = tr("staged + ");
|
||||
if (state & ModifiedFile)
|
||||
resultState.append(QCoreApplication::translate("Git::Internal::CommitData", "modified"));
|
||||
resultState.append(tr("modified"));
|
||||
else if (state & AddedFile)
|
||||
resultState.append(QCoreApplication::translate("Git::Internal::CommitData", "added"));
|
||||
resultState.append(tr("added"));
|
||||
else if (state & DeletedFile)
|
||||
resultState.append(QCoreApplication::translate("Git::Internal::CommitData", "deleted"));
|
||||
resultState.append(tr("deleted"));
|
||||
else if (state & RenamedFile)
|
||||
resultState.append(QCoreApplication::translate("Git::Internal::CommitData", "renamed"));
|
||||
resultState.append(tr("renamed"));
|
||||
else if (state & CopiedFile)
|
||||
resultState.append(QCoreApplication::translate("Git::Internal::CommitData", "copied"));
|
||||
resultState.append(tr("copied"));
|
||||
if (state & UnmergedUs) {
|
||||
if (state & UnmergedThem)
|
||||
resultState.append(QCoreApplication::translate("Git::Internal::CommitData", " by both"));
|
||||
resultState.append(tr(" by both"));
|
||||
else
|
||||
resultState.append(QCoreApplication::translate("Git::Internal::CommitData", " by us"));
|
||||
resultState.append(tr(" by us"));
|
||||
} else if (state & UnmergedThem) {
|
||||
resultState.append(QCoreApplication::translate("Git::Internal::CommitData", " by them"));
|
||||
resultState.append(tr(" by them"));
|
||||
}
|
||||
return resultState;
|
||||
}
|
||||
|
@@ -82,6 +82,8 @@ Q_DECLARE_FLAGS(FileStates, FileState)
|
||||
|
||||
class CommitData
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Git::Internal::CommitData)
|
||||
|
||||
public:
|
||||
CommitData(CommitType type = SimpleCommit);
|
||||
// A pair of state string/file name ('modified', 'file.cpp').
|
||||
|
Reference in New Issue
Block a user