fix translation of some accessibility infos

fix translation of some accessibility infos:
* accidentals
* articulations
* clefs
* jumps  (need to run thru Transifex first to be seen)
* keysigs
* marker (need to run thru Transifex first to be seen)
* noteheadnames (not shown anywhere currently)
* tremolo
* trills (need to run thru Transifex first to be seen)

fix some capitalization issues
This commit is contained in:
Joachim Schmitz 2014-08-22 16:25:50 +02:00
parent 24facb5918
commit 6b1a7192b0
19 changed files with 51 additions and 51 deletions

View file

@ -481,7 +481,7 @@ bool Accidental::setProperty(P_ID propertyId, const QVariant& v)
QString Accidental::accessibleInfo()
{
return QString("%1: %2").arg(Element::accessibleInfo()).arg(Accidental::subtype2name(accidentalType()));
return QString("%1: %2").arg(Element::accessibleInfo()).arg(qApp->translate("accidental", Accidental::subtype2name(accidentalType())));
}
}

View file

@ -433,7 +433,7 @@ ChordRest* Articulation::chordRest() const
QString Articulation::subtypeUserName() const
{
return articulationList[int(articulationType())].description;
return qApp->translate("articulation", qPrintable(articulationList[int(articulationType())].description));
}
//---------------------------------------------------------

View file

@ -658,7 +658,7 @@ Element* Clef::prevElement()
QString Clef::accessibleInfo()
{
return ClefInfo::name(clefType());
return qApp->translate("clefTable", ClefInfo::name(clefType()));
}
}

View file

@ -444,7 +444,7 @@ static void warnTupletCrossing()
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");
"Tuplet would cross measure");
QMessageBox::warning(0, qApp->translate("addRemoveTimeSig", tt),
qApp->translate("addRemoveTimeSig", mt));

View file

@ -1712,7 +1712,7 @@ FiguredBass* Score::addFiguredBass()
QMessageBox::information(0,
QMessageBox::tr("MuseScore"),
QMessageBox::tr("No note or figured bass selected:\n"
"please select a single note or figured bass and retry.\n"),
"Please select a single note or figured bass and retry.\n"),
QMessageBox::Ok, QMessageBox::NoButton);
return 0;
}

View file

@ -22,12 +22,12 @@ namespace Ms {
//---------------------------------------------------------
const JumpTypeTable jumpTypeTable[] = {
{ Jump::Type::DC, TextStyleType::REPEAT_RIGHT, "D.C.", "start", "end", "", QObject::tr("Da Capo") },
{ Jump::Type::DC_AL_FINE, TextStyleType::REPEAT_RIGHT, "D.C. al Fine", "start", "fine", "" , QObject::tr("Da Capo al Fine")},
{ Jump::Type::DC_AL_CODA, TextStyleType::REPEAT_RIGHT, "D.C. al Coda", "start", "coda", "codab", QObject::tr("Da Capo al Coda")},
{ Jump::Type::DS_AL_CODA, TextStyleType::REPEAT_RIGHT, "D.S. al Coda", "segno", "coda", "codab", QObject::tr("D.S. al Coda") },
{ Jump::Type::DS_AL_FINE, TextStyleType::REPEAT_RIGHT, "D.S. al Fine", "segno", "fine", "", QObject::tr("D.S. al Fine") },
{ Jump::Type::DS, TextStyleType::REPEAT_RIGHT, "D.S.", "segno", "end", "", QObject::tr("D.S.") }
{ Jump::Type::DC, TextStyleType::REPEAT_RIGHT, "D.C.", "start", "end", "", QT_TRANSLATE_NOOP("jumpType", "Da Capo") },
{ Jump::Type::DC_AL_FINE, TextStyleType::REPEAT_RIGHT, "D.C. al Fine", "start", "fine", "" , QT_TRANSLATE_NOOP("jumpType", "Da Capo al Fine")},
{ Jump::Type::DC_AL_CODA, TextStyleType::REPEAT_RIGHT, "D.C. al Coda", "start", "coda", "codab", QT_TRANSLATE_NOOP("jumpType", "Da Capo al Coda")},
{ Jump::Type::DS_AL_CODA, TextStyleType::REPEAT_RIGHT, "D.S. al Coda", "segno", "coda", "codab", QT_TRANSLATE_NOOP("jumpType", "D.S. al Coda") },
{ Jump::Type::DS_AL_FINE, TextStyleType::REPEAT_RIGHT, "D.S. al Fine", "segno", "fine", "", QT_TRANSLATE_NOOP("jumpType", "D.S. al Fine") },
{ Jump::Type::DS, TextStyleType::REPEAT_RIGHT, "D.S.", "segno", "end", "", QT_TRANSLATE_NOOP("jumpType", "D.S.") }
};
int jumpTypeTableSize()
@ -82,7 +82,7 @@ QString Jump::jumpTypeUserName() const
{
int idx = static_cast<int>(this->jumpType());
if(idx < jumpTypeTableSize())
return jumpTypeTable[idx].userText;
return qApp->translate("jumpType", qPrintable(jumpTypeTable[idx].userText));
return QString("Custom");
}

View file

@ -535,12 +535,12 @@ QString KeySig::accessibleInfo()
return tr("%1: Custom").arg(Element::accessibleInfo());
if (key() == Key::C)
return QString("%1: %2").arg(Element::accessibleInfo()).arg(keyNames[14]);
return QString("%1: %2").arg(Element::accessibleInfo()).arg(qApp->translate("MuseScore", keyNames[14]));
int keyInt = static_cast<int>(key());
if (keyInt < 0)
keySigType = keyNames[(7 + keyInt) * 2 + 1];
keySigType = qApp->translate("MuseScore", keyNames[(7 + keyInt) * 2 + 1]);
else
keySigType = keyNames[(keyInt - 1) * 2];
keySigType = qApp->translate("MuseScore", keyNames[(keyInt - 1) * 2]);
return QString("%1: %2").arg(Element::accessibleInfo()).arg(keySigType);
}

View file

@ -20,14 +20,14 @@ namespace Ms {
//must be in sync with Marker::Type enum
const MarkerTypeItem markerTypeTable[] = {
{ Marker::Type::SEGNO , QObject::tr("Segno") },
{ Marker::Type::VARSEGNO, QObject::tr("Segno Variation")},
{ Marker::Type::CODA , QObject::tr("Coda") },
{ Marker::Type::VARCODA , QObject::tr("Varied coda") },
{ Marker::Type::CODETTA , QObject::tr("Codetta") },
{ Marker::Type::FINE , QObject::tr("Fine") },
{ Marker::Type::TOCODA , QObject::tr("To Coda") },
{ Marker::Type::USER , QObject::tr("Custom") }
{ Marker::Type::SEGNO , QT_TRANSLATE_NOOP("markerType", "Segno") },
{ Marker::Type::VARSEGNO, QT_TRANSLATE_NOOP("markerType", "Segno Variation")},
{ Marker::Type::CODA , QT_TRANSLATE_NOOP("markerType", "Coda") },
{ Marker::Type::VARCODA , QT_TRANSLATE_NOOP("markerType", "Varied coda") },
{ Marker::Type::CODETTA , QT_TRANSLATE_NOOP("markerType", "Codetta") },
{ Marker::Type::FINE , QT_TRANSLATE_NOOP("markerType", "Fine") },
{ Marker::Type::TOCODA , QT_TRANSLATE_NOOP("markerType", "To Coda") },
{ Marker::Type::USER , QT_TRANSLATE_NOOP("markerType", "Custom") }
};
int markerTypeTableSize()
@ -107,7 +107,7 @@ void Marker::setMarkerType(Type t)
QString Marker::markerTypeUserName()
{
return markerTypeTable[static_cast<int>(_markerType)].name;
return qApp->translate("musescore", qPrintable(markerTypeTable[static_cast<int>(_markerType)].name));
}
//---------------------------------------------------------

View file

@ -2504,7 +2504,7 @@ const char* NoteHead::groupToGroupName(NoteHead::Group group)
QString Note::subtypeName() const
{
return NoteHead::groupToGroupName(_headGroup);
return qApp->translate("noteheadnames", NoteHead::groupToGroupName(_headGroup));
}
//---------------------------------------------------------

View file

@ -344,7 +344,7 @@ Fraction Tremolo::tremoloLen() const
QString Tremolo::subtypeName() const
{
return tremoloName[subtype() - int(TremoloType::R8)];
return qApp->translate("Tremolo", tremoloName[subtype() - int(TremoloType::R8)]);
}
//---------------------------------------------------------

View file

@ -26,11 +26,11 @@ namespace Ms {
// must be in sync with Trill::Type
const TrillTableItem trillTable[] = {
{ Trill::Type::TRILL_LINE, "trill", QObject::tr("Trill line") },
{ Trill::Type::UPPRALL_LINE, "upprall", QObject::tr("Upprall line") },
{ Trill::Type::DOWNPRALL_LINE, "downprall", QObject::tr("Downprall line") },
{ Trill::Type::PRALLPRALL_LINE, "prallprall", QObject::tr("Prallprall line") },
{ Trill::Type::PURE_LINE , "pure", QObject::tr("Wavy line") }
{ Trill::Type::TRILL_LINE, "trill", QT_TRANSLATE_NOOP("trillType", "Trill line") },
{ Trill::Type::UPPRALL_LINE, "upprall", QT_TRANSLATE_NOOP("trillType", "Upprall line") },
{ Trill::Type::DOWNPRALL_LINE, "downprall", QT_TRANSLATE_NOOP("trillType", "Downprall line") },
{ Trill::Type::PRALLPRALL_LINE, "prallprall", QT_TRANSLATE_NOOP("trillType", "Prallprall line") },
{ Trill::Type::PURE_LINE , "pure", QT_TRANSLATE_NOOP("trillType", "Wavy line") }
};
int trillTableSize() {
@ -440,7 +440,7 @@ QString Trill::trillTypeName() const
QString Trill::trillTypeUserName()
{
return trillTable[static_cast<int>(trillType())].userName;
return qApp->translate("trillType", qPrintable(trillTable[static_cast<int>(trillType())].userName));
}
//---------------------------------------------------------

View file

@ -376,7 +376,7 @@ void selectNoteMessage()
QMessageBox::information(0,
QMessageBox::tr("MuseScore"),
QMessageBox::tr("No note selected:\n"
"please select a single note and retry operation\n"),
"Please select a single note and retry operation\n"),
QMessageBox::Ok, QMessageBox::NoButton);
}
@ -386,7 +386,7 @@ void selectNoteRestMessage()
QMessageBox::information(0,
QMessageBox::tr("MuseScore"),
QMessageBox::tr("No note or rest selected:\n"
"please select a single note or rest and retry operation\n"),
"Please select a single note or rest and retry operation\n"),
QMessageBox::Ok, QMessageBox::NoButton);
}

View file

@ -1177,7 +1177,7 @@ Shortcut Shortcut::sc[] = {
ShortcutFlags::A_CMD,
"pad-note-8",
QT_TRANSLATE_NOOP("action","Eighth note"),
QT_TRANSLATE_NOOP("action","Note duration: Eighth"),
QT_TRANSLATE_NOOP("action","Note duration: eighth"),
QT_TRANSLATE_NOOP("action","Eighth note"),
Icons::note8_ICON
),
@ -1386,9 +1386,9 @@ Shortcut Shortcut::sc[] = {
0,
/* no stroke: Eighth*/
"grace8after",
QT_TRANSLATE_NOOP("action","Grace: Eighth after"),
QT_TRANSLATE_NOOP("action","Grace: eighth after"),
QT_TRANSLATE_NOOP("action","Add Eighth grace note after"),
QT_TRANSLATE_NOOP("action","Grace: Eighth after"),
QT_TRANSLATE_NOOP("action","Grace: eighth after"),
Icons::grace8after_ICON
),
Shortcut(
@ -2043,7 +2043,7 @@ Shortcut Shortcut::sc[] = {
0,
"rest-8",
QT_TRANSLATE_NOOP("action","Eighth rest"),
QT_TRANSLATE_NOOP("action","Note entry: Eighth rest")
QT_TRANSLATE_NOOP("action","Note entry: eighth rest")
),
Shortcut( // mapped to undo in note entry mode
MsWidget::SCORE_TAB,
@ -2621,7 +2621,7 @@ Shortcut Shortcut::sc[] = {
ShortcutFlags::A_CMD,
"pad-note-8-TAB",
QT_TRANSLATE_NOOP("action","Eighth note (TAB)"),
QT_TRANSLATE_NOOP("action","Note duration: Eighth (TAB)"),
QT_TRANSLATE_NOOP("action","Note duration: eighth (TAB)"),
QT_TRANSLATE_NOOP("action","Eighth note"),
Icons::note8_ICON
),

View file

@ -434,7 +434,7 @@ static bool initMusicXmlSchema(QXmlSchema& schema)
QFile schemaFile(":/schema/musicxml.xsd");
if (!schemaFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
qDebug("initMusicXmlSchema() could not open resource musicxml.xsd");
MScore::lastError = QObject::tr("Internal error: could not open resource musicxml.xsd\n");
MScore::lastError = QObject::tr("Internal error: Could not open resource musicxml.xsd\n");
return false;
}

View file

@ -339,13 +339,13 @@ Palette* MuseScore::newRepeatsPalette()
Marker* mk = new Marker(gscore);
mk->setMarkerType(markerTypeTable[i].type);
sp->append(mk, markerTypeTable[i].name);
sp->append(mk, qApp->translate("markerType", qPrintable(markerTypeTable[i].name)));
}
for (int i = 0; i < jumpTypeTableSize(); i++) {
Jump* jp = new Jump(gscore);
jp->setJumpType(jumpTypeTable[i].type);
sp->append(jp, jumpTypeTable[i].userText);
sp->append(jp, qApp->translate("jumpType", qPrintable(jumpTypeTable[i].userText)));
}
return sp;
@ -831,7 +831,7 @@ Palette* MuseScore::newLinesPalette()
Trill* trill = new Trill(gscore);
trill->setTrillType(trillTable[i].type);
trill->setLen(w);
sp->append(trill, trillTable[i].userName);
sp->append(trill, qApp->translate("trillType", qPrintable(trillTable[i].userName)));
}
TextLine* textLine = new TextLine(gscore);

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>MuseScore: Score information</string>
<string>MuseScore: Score Information</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View file

@ -1723,7 +1723,7 @@ void MuseScore::dropEvent(QDropEvent* event)
else {
QMessageBox::critical(0,
tr("MuseScore: Load Error"),
tr("Open failed: unknown file extension or broken file"));
tr("Open failed: Unknown file extension or broken file"));
}
event->acceptProposedAction();
@ -4427,7 +4427,7 @@ void MuseScore::closeScore(Score* score)
void MuseScore::noteTooShortForTupletDialog()
{
QMessageBox::warning(this, tr("MuseScore: Warning"),
tr("Cannot create tuplet: note value too short")
tr("Cannot create tuplet: Note value is too short")
);
}

View file

@ -2846,7 +2846,7 @@ void ScoreView::cmd(const QAction* a)
if (!(e && (e->type() == Element::Type::NOTE || e->type() == Element::Type::REST))) {
QMessageBox::warning(0, "MuseScore",
tr("No chord/rest selected:\n"
"please select a chord/rest and try again"));
"Please select a chord/rest and try again"));
}
else {
if (e->type() == Element::Type::NOTE)
@ -2855,7 +2855,7 @@ void ScoreView::cmd(const QAction* a)
if (cr->segment()->splitsTuplet()) {
QMessageBox::warning(0, "MuseScore",
tr("Cannot split measure here:\n"
"cannot split tuplet"));
"Cannot split tuplet"));
}
else
_score->cmdSplitMeasure(cr);
@ -2867,7 +2867,7 @@ void ScoreView::cmd(const QAction* a)
if (!_score->selection().measureRange(&m1, &m2) || m1 == m2) {
QMessageBox::warning(0, "MuseScore",
tr("No measures selected:\n"
"please select a range of measures to join and try again"));
"Please select a range of measures to join and try again"));
}
else {
_score->cmdJoinMeasure(m1, m2);

View file

@ -328,7 +328,7 @@
<string>Measures</string>
</property>
<property name="accessibleDescription">
<string>Hint: you can also add or remove measures after creation of the score.</string>
<string>Hint: You can also add or remove measures after creation of the score.</string>
</property>
<property name="minimum">
<number>1</number>
@ -363,7 +363,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Hint: you can also add or remove measures after creation of the score.</string>
<string>Hint: You can also add or remove measures after creation of the score.</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>