Commit ee750fc3 authored by Sandro Andrade's avatar Sandro Andrade
Browse files

Fix i18n issues

parent e8fc9955
......@@ -82,24 +82,24 @@ void Minuet::startTimidity()
{
QString error;
if (!m_midiSequencer->availableOutputPorts().contains(QStringLiteral("TiMidity:0"))) {
qCDebug(MINUET) << "Starting TiMidity at" << MinuetSettings::timidityPath().remove(QStringLiteral("file://"));
m_timidityProcess.setProgram(MinuetSettings::timidityPath().remove(QStringLiteral("file://")), QStringList() << MinuetSettings::timidityParameters());
qCDebug(MINUET) << "Starting TiMidity++ at" << MinuetSettings::timidityLocation().remove(QStringLiteral("file://"));
m_timidityProcess.setProgram(MinuetSettings::timidityLocation().remove(QStringLiteral("file://")), QStringList() << MinuetSettings::timidityParameters());
m_timidityProcess.start();
if (!m_timidityProcess.waitForStarted(-1)) {
error = m_timidityProcess.errorString();
}
else {
if (!waitForTimidityOutputPorts(3000))
error = i18n("error when waiting for TiMidity output ports!");
error = i18n("error when waiting for TiMidity++ output ports!");
else
qCDebug(MINUET) << "TiMidity started!";
qCDebug(MINUET) << "TiMidity++ started!";
}
}
else {
qCDebug(MINUET) << "TiMidity already running!";
qCDebug(MINUET) << "TiMidity++ already running!";
}
if (!error.isEmpty())
KMessageBox::error(this, i18n("Minuet startup"), i18n("There was an error when starting TiMidity: \"%1\". Is another application using the audio system? Also, please check Minuet settings!", error));
KMessageBox::error(this, i18n("Minuet startup"), i18n("There was an error when starting TiMidity++: \"%1\". Is another application using the audio system? Also, please check Minuet settings!", error));
}
bool Minuet::waitForTimidityOutputPorts(int msecs)
......@@ -124,11 +124,11 @@ Minuet::~Minuet()
delete m_quickView;
delete m_exerciseController;
m_timidityProcess.kill();
qCDebug(MINUET) << "Stoping TiMidity!";
qCDebug(MINUET) << "Stoping TiMidity++!";
if (!m_timidityProcess.waitForFinished(-1))
qCDebug(MINUET) << "Error when stoping TiMidity:" << m_timidityProcess.errorString();
qCDebug(MINUET) << "Error when stoping TiMidity++:" << m_timidityProcess.errorString();
else
qCDebug(MINUET) << "TiMidity stoped!";
qCDebug(MINUET) << "TiMidity++ stoped!";
}
bool Minuet::queryClose()
......
......@@ -5,8 +5,8 @@
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="minuetrc"/>
<group name="MIDI">
<entry name="timidityPath" type="String">
<label>path to TiMidity++ sequencer</label>
<entry name="timidityLocation" type="String">
<label>TiMidity++ sequencer location</label>
</entry>
<entry name="timidityParameters" type="String">
<label>TiMidity++ sequencer parameters</label>
......
......@@ -146,9 +146,9 @@ Item {
onClicked: {
onExited()
if (option.originalText == chosenExercise)
messageText.text = "Congratulations!<br/>You answered correctly!"
messageText.text = i18n("Congratulations!<br/>You answered correctly!")
else
messageText.text = "Ops, not this time!<br/>Try again!"
messageText.text = i18n("Ops, not this time!<br/>Try again!")
answerHoverExit(0, exerciseController.chosenRootNote() + parseInt(model.sequenceFromRoot), 0)
highlightRightAnswer()
}
......
......@@ -14,12 +14,12 @@
<item row="0" column="0">
<widget class="QLabel" name="timidityLabel">
<property name="text">
<string>TiMidity++</string>
<string>TiMidity++ location:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KUrlRequester" name="kcfg_timidityPath"/>
<widget class="KUrlRequester" name="kcfg_timidityLocation"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="timidityParametersLabel">
......
......@@ -68,7 +68,7 @@ bool Wizard::isOk() const
void Wizard::adjustSettings()
{
if (!m_timidityPath.isEmpty()) {
MinuetSettings::setTimidityPath(m_timidityPath);
MinuetSettings::setTimidityLocation(m_timidityPath);
if (MinuetSettings::timidityParameters().isEmpty())
MinuetSettings::setTimidityParameters(QStringLiteral("-iA"));
if (MinuetSettings::midiOutputPort().isEmpty())
......@@ -104,7 +104,7 @@ void Wizard::checkSystem()
if (!timidityConfig.isEmpty()) {
QFile timidityConfigFile(timidityConfig);
if (!timidityConfigFile.open(QIODevice::ReadOnly)) {
qWarning("Couldn't open TiMidity configuration file.");
qWarning("Couldn't open TiMidity++ configuration file.");
return;
}
bool sourceFound = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment