Merge pull request #12511 from JosJuice/partial-revert-assembler-translatability

Partially revert "DolphinQt/Assembler: improve translatability"
This commit is contained in:
Tilka 2024-01-20 14:55:03 +00:00 committed by GitHub
commit 1a57040163
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 12 deletions

View File

@ -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)

View File

@ -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)
@ -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();