Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various translation and spelling issues #1135

Merged
merged 15 commits into from Aug 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions awl/utils.cpp
Expand Up @@ -63,8 +63,7 @@ QString pitch2string(int v)
QString o;
o.sprintf("%d", octave);
int i = v % 12;
QString s(octave < 0 ? valu[i] : vall[i]);
return s + o;
return qApp->translate("awlutils", octave < 0 ? valu[i] : vall[i]) + o;
}
}

2 changes: 1 addition & 1 deletion libmscore/articulation.cpp
Expand Up @@ -104,7 +104,7 @@ ArticulationInfo Articulation::articulationList[int(ArticulationType::ARTICULATI
1.0, ArticulationShowIn::PITCHED_STAFF | ArticulationShowIn::TABLATURE
},
{ SymId::wiggleVibratoLargeSlowest, SymId::wiggleVibratoLargeSlowest,
"wigglevibratolargeslowest", QT_TRANSLATE_NOOP("articulation", "wide vibrato large slowest"),
"wigglevibratolargeslowest", QT_TRANSLATE_NOOP("articulation", "wiggle vibrato large slowest"),
1.0, ArticulationShowIn::PITCHED_STAFF | ArticulationShowIn::TABLATURE
},
{ SymId::brassMuteOpen, SymId::brassMuteOpen,
Expand Down
4 changes: 2 additions & 2 deletions libmscore/chord.cpp
Expand Up @@ -1978,7 +1978,7 @@ void Chord::layoutPitched()
case TDuration::DurationType::V_WHOLE: fc = 3.8; break;
case TDuration::DurationType::V_HALF: fc = 3.6; break;
case TDuration::DurationType::V_QUARTER: fc = 2.1; break;
case TDuration::DurationType::V_EIGHT: fc = 1.4; break;
case TDuration::DurationType::V_EIGHTH: fc = 1.4; break;
case TDuration::DurationType::V_16TH: fc = 1.2; break;
default: fc = 1;
}
Expand Down Expand Up @@ -2201,7 +2201,7 @@ void Chord::layoutTablature()
case TDuration::DurationType::V_WHOLE: fc = 3.8; break;
case TDuration::DurationType::V_HALF: fc = 3.6; break;
case TDuration::DurationType::V_QUARTER: fc = 2.1; break;
case TDuration::DurationType::V_EIGHT: fc = 1.4; break;
case TDuration::DurationType::V_EIGHTH: fc = 1.4; break;
case TDuration::DurationType::V_16TH: fc = 1.2; break;
default: fc = 1;
}
Expand Down
9 changes: 3 additions & 6 deletions libmscore/chordlist.cpp
Expand Up @@ -1693,8 +1693,7 @@ bool ChordList::read(const QString& name)
return false;
QFile f(path);
if (!f.open(QIODevice::ReadOnly)) {
QString s = QT_TRANSLATE_NOOP("file", "Cannot open chord description:\n%1\n%2");
MScore::lastError = s.arg(f.fileName()).arg(f.errorString());
MScore::lastError = QObject::tr("Cannot open chord description:\n%1\n%2").arg(f.fileName()).arg(f.errorString());
qDebug("ChordList::read failed: <%s>", qPrintable(path));
return false;
}
Expand Down Expand Up @@ -1730,8 +1729,7 @@ bool ChordList::write(const QString& name) const
QFile f(info.filePath());

if (!f.open(QIODevice::WriteOnly)) {
QString s = QT_TRANSLATE_NOOP("file", "Open Chord Description\n%1\nfailed: %2");
MScore::lastError = s.arg(f.fileName()).arg(f.errorString());
MScore::lastError = QObject::tr("Open Chord Description\n%1\nfailed: %2").arg(f.fileName()).arg(f.errorString());
return false;
}

Expand All @@ -1742,8 +1740,7 @@ bool ChordList::write(const QString& name) const
write(xml);
xml.etag();
if (f.error() != QFile::NoError) {
QString s = QT_TRANSLATE_NOOP("file", "Write Chord Description failed: %1");
MScore::lastError = s.arg(f.errorString());
MScore::lastError = QObject::tr("Write Chord Description failed: %1").arg(f.errorString());
}
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions libmscore/cmd.cpp
Expand Up @@ -2138,7 +2138,7 @@ void Score::cmd(const QAction* a)
case TDuration::DurationType::V_QUARTER:
padToggle(Pad::NOTE2);
break;
case TDuration::DurationType::V_EIGHT:
case TDuration::DurationType::V_EIGHTH:
padToggle(Pad::NOTE4);
break;
case TDuration::DurationType::V_16TH:
Expand Down Expand Up @@ -2174,7 +2174,7 @@ void Score::cmd(const QAction* a)
case TDuration::DurationType::V_QUARTER:
padToggle(Pad::NOTE8);
break;
case TDuration::DurationType::V_EIGHT:
case TDuration::DurationType::V_EIGHTH:
padToggle(Pad::NOTE16);
break;
case TDuration::DurationType::V_16TH:
Expand Down
4 changes: 2 additions & 2 deletions libmscore/drumset.cpp
Expand Up @@ -179,8 +179,8 @@ void initDrumset()
smDrumset->drum(56) = DrumInstrument(QT_TRANSLATE_NOOP("drumset", "Ride (Bell)"), NoteHead::Group::HEAD_TRIANGLE, 1, MScore::Direction::UP);
smDrumset->drum(57) = DrumInstrument(QT_TRANSLATE_NOOP("drumset", "Ride (Bell)"), NoteHead::Group::HEAD_CROSS, -3, MScore::Direction::UP);
smDrumset->drum(59) = DrumInstrument(QT_TRANSLATE_NOOP("drumset", "Ride (Bell)"), NoteHead::Group::HEAD_CROSS, 2, MScore::Direction::UP);
smDrumset->drum(63) = DrumInstrument(QT_TRANSLATE_NOOP("drumset", "open high conga"), NoteHead::Group::HEAD_CROSS, 4, MScore::Direction::UP);
smDrumset->drum(64) = DrumInstrument(QT_TRANSLATE_NOOP("drumset", "low conga"), NoteHead::Group::HEAD_CROSS, 6, MScore::Direction::UP);
smDrumset->drum(63) = DrumInstrument(QT_TRANSLATE_NOOP("drumset", "Open High Conga"), NoteHead::Group::HEAD_CROSS, 4, MScore::Direction::UP);
smDrumset->drum(64) = DrumInstrument(QT_TRANSLATE_NOOP("drumset", "Low Conga"), NoteHead::Group::HEAD_CROSS, 6, MScore::Direction::UP);
}

}
Expand Down
20 changes: 10 additions & 10 deletions libmscore/durationtype.cpp
Expand Up @@ -92,7 +92,7 @@ int TDuration::ticks() const
case DurationType::V_64TH: t = MScore::division / 16; break;
case DurationType::V_32ND: t = MScore::division / 8; break;
case DurationType::V_16TH: t = MScore::division / 4; break;
case DurationType::V_EIGHT: t = MScore::division / 2; break;
case DurationType::V_EIGHTH: t = MScore::division / 2; break;
case DurationType::V_HALF: t = MScore::division * 2; break;
case DurationType::V_WHOLE: t = MScore::division * 4; break;
case DurationType::V_BREVE: t = MScore::division * 8; break;
Expand All @@ -118,7 +118,7 @@ QString TDuration::name() const
{
switch(_val) {
case DurationType::V_QUARTER: return "quarter";
case DurationType::V_EIGHT: return "eighth";
case DurationType::V_EIGHTH: return "eighth";
case DurationType::V_1024TH: return "1024th";
case DurationType::V_512TH: return "512th";
case DurationType::V_256TH: return "256th";
Expand Down Expand Up @@ -153,7 +153,7 @@ NoteHead::Type TDuration::headType() const
case DurationType::V_64TH:
case DurationType::V_32ND:
case DurationType::V_16TH:
case DurationType::V_EIGHT:
case DurationType::V_EIGHTH:
case DurationType::V_QUARTER:
headType = NoteHead::Type::HEAD_QUARTER;
break;
Expand Down Expand Up @@ -186,8 +186,8 @@ NoteHead::Type TDuration::headType() const
int TDuration::hooks() const
{
static const int table[] = {
// V_LONG, V_BREVE, V_WHOLE, V_HALF, V_QUARTER, V_EIGHT, V_16TH,
0, 0, 0, 0, 0, 1, 2,
// V_LONG, V_BREVE, V_WHOLE, V_HALF, V_QUARTER, V_EIGHTH, V_16TH,
0, 0, 0, 0, 0, 1, 2,
// V_32ND, V_64TH, V_128TH, V_256TH, V_512TH, V_1024TH,
3, 4, 5, 6, 7, 8,
// V_ZERO, V_MEASURE, V_INVALID
Expand All @@ -210,7 +210,7 @@ bool TDuration::hasStem() const
case DurationType::V_64TH:
case DurationType::V_32ND:
case DurationType::V_16TH:
case DurationType::V_EIGHT:
case DurationType::V_EIGHTH:
case DurationType::V_QUARTER:
case DurationType::V_HALF:
case DurationType::V_LONG:
Expand Down Expand Up @@ -239,7 +239,7 @@ void TDuration::setType(const QString& s)
if (s == "quarter")
_val = DurationType::V_QUARTER;
else if (s == "eighth")
_val = DurationType::V_EIGHT;
_val = DurationType::V_EIGHTH;
else if (s == "1024th")
_val = DurationType::V_1024TH;
else if (s == "512th")
Expand Down Expand Up @@ -362,7 +362,7 @@ Fraction TDuration::fraction() const
case DurationType::V_64TH: n = 64; break;
case DurationType::V_32ND: n = 32; break;
case DurationType::V_16TH: n = 16; break;
case DurationType::V_EIGHT: n = 8; break;
case DurationType::V_EIGHTH: n = 8; break;
case DurationType::V_QUARTER: n = 4; break;
case DurationType::V_HALF: n = 2; break;
case DurationType::V_WHOLE: n = 1; break;
Expand Down Expand Up @@ -394,7 +394,7 @@ TDuration::TDuration(const Fraction& _f)
case 1: _val = DurationType::V_WHOLE; break;
case 2: _val = DurationType::V_HALF; break;
case 4: _val = DurationType::V_QUARTER; break;
case 8: _val = DurationType::V_EIGHT; break;
case 8: _val = DurationType::V_EIGHTH; break;
case 16: _val = DurationType::V_16TH; break;
case 32: _val = DurationType::V_32ND; break;
case 64: _val = DurationType::V_64TH; break;
Expand Down Expand Up @@ -526,7 +526,7 @@ void TDuration::print() const
case DurationType::V_WHOLE: s = "Whole"; break;
case DurationType::V_HALF: s = "Half"; break;
case DurationType::V_QUARTER: s = "Quarter"; break;
case DurationType::V_EIGHT: s = "Eighth"; break;
case DurationType::V_EIGHTH: s = "Eighth"; break;
case DurationType::V_16TH: s = "16th"; break;
case DurationType::V_32ND: s = "32nd"; break;
case DurationType::V_64TH: s = "64th"; break;
Expand Down
2 changes: 1 addition & 1 deletion libmscore/durationtype.h
Expand Up @@ -25,7 +25,7 @@ namespace Ms {
class TDuration {
public:
enum class DurationType : char {
V_LONG, V_BREVE, V_WHOLE, V_HALF, V_QUARTER, V_EIGHT, V_16TH,
V_LONG, V_BREVE, V_WHOLE, V_HALF, V_QUARTER, V_EIGHTH, V_16TH,
V_32ND, V_64TH, V_128TH, V_256TH, V_512TH, V_1024TH,
V_ZERO, V_MEASURE, V_INVALID
};
Expand Down
14 changes: 8 additions & 6 deletions libmscore/edit.cpp
Expand Up @@ -441,12 +441,14 @@ bool Score::rewriteMeasures(Measure* fm, Measure* lm, const Fraction& ns)

static void warnTupletCrossing()
{
if (!MScore::noGui)
QMessageBox::warning(0,
QT_TRANSLATE_NOOP("addRemoveTimeSig", "MuseScore"),
QT_TRANSLATE_NOOP("addRemoveTimeSig", "Cannot rewrite measures:\n"
"tuplet would cross measure")
);
if (!MScore::noGui) {
const char* tt = QT_TRANSLATE_NOOP("addRemoveTimeSig", "MuseScore");
const char* mt = QT_TRANSLATE_NOOP("addRemoveTimeSig", "Cannot rewrite measures:\n"
"tuplet would cross measure");

QMessageBox::warning(0, qApp->translate("addRemoveTimeSig", tt),
qApp->translate("addRemoveTimeSig", mt));
}
}

//---------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions libmscore/figuredbass.cpp
Expand Up @@ -1528,9 +1528,8 @@ bool FiguredBass::readConfigFile(const QString& fileName)

QFile f(path);
if (!f.open(QIODevice::ReadOnly)) {
QString s = QT_TRANSLATE_NOOP("file", "Cannot open figured bass description:\n%1\n%2");
MScore::lastError = s.arg(f.fileName()).arg(f.errorString());
qDebug("FiguredBass::read failed: <%s>", qPrintable(path));
MScore::lastError = tr("Cannot open figured bass description:\n%1\n%2").arg(f.fileName()).arg(f.errorString());
qDebug("FiguredBass::read failed: <%s>", qPrintable(path));
return false;
}
XmlReader e(&f);
Expand Down
12 changes: 6 additions & 6 deletions libmscore/groups.cpp
Expand Up @@ -96,9 +96,9 @@ Beam::Mode Groups::beamMode(int tick, TDuration::DurationType d) const
{
int shift;
switch (d) {
case TDuration::DurationType::V_EIGHT: shift = 0; break;
case TDuration::DurationType::V_16TH: shift = 4; break;
case TDuration::DurationType::V_32ND: shift = 8; break;
case TDuration::DurationType::V_EIGHTH: shift = 0; break;
case TDuration::DurationType::V_16TH: shift = 4; break;
case TDuration::DurationType::V_32ND: shift = 8; break;
default:
return Beam::Mode::AUTO;
}
Expand Down Expand Up @@ -196,9 +196,9 @@ void Groups::addStop(int pos, TDuration::DurationType d, Beam::Mode bm)
{
int shift;
switch (d) {
case TDuration::DurationType::V_EIGHT: shift = 0; break;
case TDuration::DurationType::V_16TH: shift = 4; break;
case TDuration::DurationType::V_32ND: shift = 8; break;
case TDuration::DurationType::V_EIGHTH: shift = 0; break;
case TDuration::DurationType::V_16TH: shift = 4; break;
case TDuration::DurationType::V_32ND: shift = 8; break;
default:
return;
}
Expand Down
6 changes: 3 additions & 3 deletions libmscore/rest.cpp
Expand Up @@ -288,7 +288,7 @@ SymId Rest::getSymbol(TDuration::DurationType type, int line, int lines, int* yo
return (line <= -3 || line >= (lines - 2)) ? SymId::restHalfLegerLine : SymId::restHalf;
case TDuration::DurationType::V_QUARTER:
return SymId::restQuarter;
case TDuration::DurationType::V_EIGHT:
case TDuration::DurationType::V_EIGHTH:
return SymId::rest8th;
case TDuration::DurationType::V_16TH:
return SymId::rest16th;
Expand Down Expand Up @@ -447,7 +447,7 @@ int Rest::computeLineOffset()
case TDuration::DurationType::V_QUARTER:
lineOffset = up ? -4 : 4;
break;
case TDuration::DurationType::V_EIGHT:
case TDuration::DurationType::V_EIGHTH:
lineOffset = up ? -4 : 4;
break;
case TDuration::DurationType::V_16TH:
Expand Down Expand Up @@ -482,7 +482,7 @@ int Rest::computeLineOffset()
break;
case TDuration::DurationType::V_HALF:
case TDuration::DurationType::V_QUARTER:
case TDuration::DurationType::V_EIGHT:
case TDuration::DurationType::V_EIGHTH:
case TDuration::DurationType::V_16TH:
case TDuration::DurationType::V_32ND:
case TDuration::DurationType::V_64TH:
Expand Down
2 changes: 1 addition & 1 deletion libmscore/score.cpp
Expand Up @@ -2581,7 +2581,7 @@ void Score::padToggle(Pad n)
_is.setDuration(TDuration::DurationType::V_QUARTER);
break;
case Pad::NOTE8:
_is.setDuration(TDuration::DurationType::V_EIGHT);
_is.setDuration(TDuration::DurationType::V_EIGHTH);
break;
case Pad::NOTE16:
_is.setDuration(TDuration::DurationType::V_16TH);
Expand Down
29 changes: 9 additions & 20 deletions libmscore/scorefile.cpp
Expand Up @@ -318,8 +318,7 @@ bool Score::saveFile()
{
QString suffix = info.suffix();
if (info.exists() && !info.isWritable()) {
QString s = QT_TRANSLATE_NOOP("file", "The following file is locked: \n%1 \n\nTry saving to a different location.");
MScore::lastError = s.arg(info.filePath());
MScore::lastError = tr("The following file is locked: \n%1 \n\nTry saving to a different location.").arg(info.filePath());
return false;
}

Expand Down Expand Up @@ -350,9 +349,7 @@ bool Score::saveFile()
QString tempName = info.filePath() + QString(".temp");
QFile temp(tempName);
if (!temp.open(QIODevice::WriteOnly)) {
QString s = QT_TRANSLATE_NOOP("file", "Open Temp File\n%1\nfailed: ")
+ QString(strerror(errno));
MScore::lastError = s.arg(tempName);
MScore::lastError = tr("Open Temp File\n%1\nfailed: %2").arg(tempName).arg(QString(strerror(errno)));
return false;
}
try {
Expand All @@ -366,8 +363,7 @@ bool Score::saveFile()
return false;
}
if (temp.error() != QFile::NoError) {
MScore::lastError = QT_TRANSLATE_NOOP("file",
"MuseScore: Save File failed: ") + temp.errorString();
MScore::lastError = tr("MuseScore: Save File failed: %1").arg(temp.errorString());
temp.close();
return false;
}
Expand Down Expand Up @@ -410,9 +406,7 @@ bool Score::saveFile()
// rename temp name into file name
//
if (!QFile::rename(tempName, name)) {
QString s = QT_TRANSLATE_NOOP("file", "Renaming temp. file <%1> to <%2> failed:\n")
+ QString(strerror(errno));
MScore::lastError = s.arg(tempName).arg(name);
MScore::lastError = tr("Renaming temp. file <%1> to <%2> failed:\n%3").arg(tempName).arg(name).arg(QString(strerror(errno)));
return false;
}
// make file readable by all
Expand All @@ -433,7 +427,7 @@ void Score::saveCompressedFile(QFileInfo& info, bool onlySelection)
{
QFile fp(info.filePath());
if (!fp.open(QIODevice::WriteOnly)) {
QString s = QT_TRANSLATE_NOOP("file", "Open File\n%1\nfailed: ")
QString s = tr("Open File\n%1\nfailed: ")
+ QString(strerror(errno));
throw(s.arg(info.filePath()));
}
Expand Down Expand Up @@ -523,9 +517,7 @@ bool Score::saveFile(QFileInfo& info)
info.setFile(info.filePath() + ".mscx");
QFile fp(info.filePath());
if (!fp.open(QIODevice::WriteOnly)) {
QString s = QT_TRANSLATE_NOOP("file", "Open File\n%1\nfailed: ")
+ QString(strerror(errno));
MScore::lastError = s.arg(info.filePath());
MScore::lastError = tr("Open File\n%1\nfailed: %2").arg(info.filePath()).arg(QString(strerror(errno)));
return false;
}
saveFile(&fp, false);
Expand Down Expand Up @@ -568,9 +560,7 @@ bool Score::saveStyle(const QString& name)
info.setFile(info.filePath() + ext);
QFile f(info.filePath());
if (!f.open(QIODevice::WriteOnly)) {
QString s = QT_TRANSLATE_NOOP("file", "Open Style File\n%1\nfailed: ")
+ QString(strerror(errno));
MScore::lastError = s.arg(f.fileName());
MScore::lastError = tr("Open Style File\n%1\nfailed: %2").arg(f.fileName().arg(QString(strerror(errno))));
return false;
}

Expand All @@ -580,8 +570,7 @@ bool Score::saveStyle(const QString& name)
_style.save(xml, false); // save complete style
xml.etag();
if (f.error() != QFile::NoError) {
MScore::lastError = QT_TRANSLATE_NOOP("file", "Write Style failed: ")
+ f.errorString();
MScore::lastError = tr("Write Style failed: %1").arg(f.errorString());
return false;
}
return true;
Expand Down Expand Up @@ -674,7 +663,7 @@ Score::FileError Score::loadCompressedMsc(QString name, bool ignoreVersionError)
MQZipReader uz(name);
if (!uz.exists()) {
qDebug("loadCompressedMsc: <%s> not found", qPrintable(name));
MScore::lastError = QT_TRANSLATE_NOOP("file", "file not found");
MScore::lastError = tr("file not found");
return FileError::FILE_NOT_FOUND;
}

Expand Down
2 changes: 1 addition & 1 deletion libmscore/staff.cpp
Expand Up @@ -601,7 +601,7 @@ SwingParameters Staff::swing(int tick) const
int swingUnit;
QString unit = score()->styleSt(StyleIdx::swingUnit);
int swingRatio = score()->styleI(StyleIdx::swingRatio);
if (unit == TDuration(TDuration::DurationType::V_EIGHT).name()) {
if (unit == TDuration(TDuration::DurationType::V_EIGHTH).name()) {
swingUnit = MScore::division / 2;
}
else if (unit == TDuration(TDuration::DurationType::V_16TH).name())
Expand Down