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

Partially revert "DolphinQt/Assembler: improve translatability" #12511

Merged
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
7 changes: 3 additions & 4 deletions Source/Core/DolphinQt/Debugger/AssembleInstructionDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ namespace
{
QString HtmlFormatErrorLoc(const Common::GekkoAssembler::AssemblerError& err)
{
const QString error = QStringLiteral("<span style=\"color: red; font-weight: bold\">%1</span>")
.arg(QObject::tr("Error"));
// i18n: '%1' is the translation of 'Error'
return QObject::tr("%1 in column %2").arg(error).arg(err.col + 1);
return QObject::tr("<span style=\"color: red; font-weight: bold\">Error</span> on line %1 col %2")
.arg(err.line + 1)
.arg(err.col + 1);
}

QString HtmlFormatErrorLine(const Common::GekkoAssembler::AssemblerError& err)
Expand Down
13 changes: 5 additions & 8 deletions Source/Core/DolphinQt/Debugger/AssemblerWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ using namespace Common::GekkoAssembler;

QString HtmlFormatErrorLoc(const AssemblerError& err)
{
const QString error = QStringLiteral("<span style=\"color: red; font-weight: bold\">%1</span>")
.arg(QObject::tr("Error"));
// i18n: '%1' is the translation of 'Error'
return QObject::tr("%1 on line %1 column %2").arg(error).arg(err.line + 1).arg(err.col + 1);
return QObject::tr("<span style=\"color: red; font-weight: bold\">Error</span> on line %1 col %2")
.arg(err.line + 1)
.arg(err.col + 1);
}

QString HtmlFormatErrorLine(const AssemblerError& err)
Expand Down Expand Up @@ -525,10 +524,8 @@ void AssemblerWidget::OnAssemble(std::vector<CodeBlock>* asm_out)
if (!good)
{
base_address = 0;
const QString warning =
QStringLiteral("<span style=\"color:#ffcc00\">%1</span>").arg(tr("Warning"));
// i18n: '%1' is the translation of 'Warning'
m_error_box->append(tr("%1 invalid base address, defaulting to 0").arg(warning));
m_error_box->append(
tr("<span style=\"color:#ffcc00\">Warning</span> invalid base address, defaulting to 0"));
}

const std::string contents = active_editor->toPlainText().toStdString();
Expand Down