Skip to content

Commit

Permalink
make all strings "translatable"
Browse files Browse the repository at this point in the history
  • Loading branch information
SamRH committed Oct 17, 2011
1 parent dc5e6e0 commit f4e2de4
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 10 deletions.
47 changes: 47 additions & 0 deletions mhp3_patcher_pc_en.ts
Expand Up @@ -78,5 +78,52 @@
<source>Imagen iso (*.iso)</source>
<translation>ISO Image (*.iso)</translation>
</message>
<message>
<location filename="patcher.cpp" line="89"/>
<source>Aplicando parche (%1/%2)...OK</source>
<oldsource>Aplicando parche (%i/%i)...OK</oldsource>
<translation>Applying Patch (%1/%2)...OK</translation>
</message>
<message>
<location filename="patcher.cpp" line="91"/>
<source>Quitando parche (%1/%2)...OK</source>
<oldsource>Quitando parche (%i/%i)...OK</oldsource>
<translation>Removing patch (%1/%2)...OK</translation>
</message>
<message>
<location filename="patcher.cpp" line="97"/>
<source>Parcheo completado</source>
<translation>Patching Complete</translation>
</message>
<message>
<location filename="patcher.cpp" line="99"/>
<source>Archivo de parcheo no encontrado</source>
<translation>Patch file not found</translation>
</message>
<message>
<location filename="patcher.cpp" line="112"/>
<source>data.bin encontrado, comenzando parcheo</source>
<translation>data.bin found, beginning to apply patch</translation>
</message>
<message>
<location filename="patcher.cpp" line="115"/>
<source>data.bin no encontrado dentro del ISO</source>
<translation>data.bin not found in the ISO</translation>
</message>
<message>
<location filename="patcher.cpp" line="118"/>
<source>No se pudo leer correctamente la ISO</source>
<translation>Unable to read ISO</translation>
</message>
<message>
<location filename="patcher.cpp" line="121"/>
<source>No se pudo abrir la ISO</source>
<translation>Unable to open ISO</translation>
</message>
<message>
<location filename="patcher.cpp" line="124"/>
<source>Debe seleccionar una ISO</source>
<translation>You must select an ISO</translation>
</message>
</context>
</TS>
20 changes: 10 additions & 10 deletions patcher.cpp
Expand Up @@ -73,7 +73,7 @@ void Patcher::fill_tables(QFile *patchfile) {

void Patcher::write_file(QFile *iso, QString patchfile, int mode) {
char buffer[1024];
char message[64];
QString message;
QFile patch(patchfile);
if(patch.open(QIODevice::ReadOnly)) {
fill_tables(&patch);
Expand All @@ -86,17 +86,17 @@ void Patcher::write_file(QFile *iso, QString patchfile, int mode) {
iso->write(buffer, 1024);
}
if(mode == 0)
sprintf(message, "Aplicando parche (%i/%i)...OK", i+1, patch_count);
message = QString(tr("Aplicando parche (%1/%2)...OK")).arg(i+1).arg(patch_count);
else
sprintf(message, "Quitando parche (%i/%i)...OK", i+1, patch_count);
message = QString(tr("Quitando parche (%1/%2)...OK")).arg(i+1).arg(patch_count);
ui->msg_list->addItem(message);
}
patch.close();
delete []patch_offset;
delete []patch_size;
ui->msg_list->addItem("Parcheo completado");
ui->msg_list->addItem(tr("Parcheo completado"));
} else {
ui->msg_list->addItem("Archivo de parcheo no encontrado");
ui->msg_list->addItem(tr("Archivo de parcheo no encontrado"));
}
}

Expand All @@ -109,19 +109,19 @@ void Patcher::on_iso_patch_clicked() {
char buffer[16];
if(file.read(buffer, sizeof(buffer)) == 16) {
if(!memcmp(buffer, signature, 16)) {
ui->msg_list->addItem("data.bin encontrado, comenzando parcheo");
ui->msg_list->addItem(tr("data.bin encontrado, comenzando parcheo"));
write_file(&file, ui->patch_list->currentText(), ui->patch_list->currentIndex());
} else {
ui->msg_list->addItem("data.bin no encontrado dentro del ISO");
ui->msg_list->addItem(tr("data.bin no encontrado dentro del ISO"));
}
} else {
ui->msg_list->addItem("No se pudo leer correctamente la ISO");
ui->msg_list->addItem(tr("No se pudo leer correctamente la ISO"));
}
} else {
ui->msg_list->addItem("No se pudo abrir la ISO");
ui->msg_list->addItem(tr("No se pudo abrir la ISO"));
}
} else {
ui->msg_list->addItem("Debe seleccionar una ISO");
ui->msg_list->addItem(tr("Debe seleccionar una ISO"));
}
}

Expand Down

0 comments on commit f4e2de4

Please sign in to comment.