Updated add-ons/* to use B_TRANSLATE* macros. relates to #5408.

To note, I'm grepping for "TR_CONTEXT" to identify which files to update.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36660 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia
2010-05-06 15:55:56 +00:00
parent 9bf722bd79
commit b842a5efaf
3 changed files with 67 additions and 64 deletions
+4 -4
View File
@@ -153,16 +153,16 @@ ZipOMatic::QuitRequested(void)
// in that zippers are not paused while the BAlert is up. // in that zippers are not paused while the BAlert is up.
BString question; BString question;
question << TR("You have %ld Zip-O-Matic running.\n\n"); question << B_TRANSLATE("You have %ld Zip-O-Matic running.\n\n");
question << TR("Do you want to stop them?"); question << B_TRANSLATE("Do you want to stop them?");
BString temp; BString temp;
temp << zippoCount; temp << zippoCount;
question.ReplaceFirst("%ld", temp.String()); question.ReplaceFirst("%ld", temp.String());
BAlert* alert = new BAlert(NULL, question.String(), BAlert* alert = new BAlert(NULL, question.String(),
TR("Stop them"), TR("Let them continue"), NULL, B_WIDTH_AS_USUAL, B_TRANSLATE("Stop them"), B_TRANSLATE("Let them continue"), NULL,
B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_WARNING_ALERT);
alert->Go(fInvoker); alert->Go(fInvoker);
alert->Activate(); alert->Activate();
// BAlert, being modal, does not show on the current workspace // BAlert, being modal, does not show on the current workspace
@@ -55,11 +55,13 @@ ZippoWindow::ZippoWindow(BList windowList, bool keepOpen)
fArchiveNameView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, fArchiveNameView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
B_ALIGN_VERTICAL_UNSET)); B_ALIGN_VERTICAL_UNSET));
fZipOutputView = new BStringView("output_text", TR("Drop files to zip.")); fZipOutputView = new BStringView("output_text",
B_TRANSLATE("Drop files to zip."));
fZipOutputView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, fZipOutputView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
B_ALIGN_VERTICAL_UNSET)); B_ALIGN_VERTICAL_UNSET));
fStopButton = new BButton("stop", TR("Stop"), new BMessage(B_QUIT_REQUESTED)); fStopButton = new BButton("stop", B_TRANSLATE("Stop"),
new BMessage(B_QUIT_REQUESTED));
fStopButton->SetEnabled(false); fStopButton->SetEnabled(false);
fStopButton->SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT, fStopButton->SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT,
B_ALIGN_VERTICAL_UNSET)); B_ALIGN_VERTICAL_UNSET));
@@ -107,9 +109,9 @@ ZippoWindow::MessageReceived(BMessage* message)
fStopButton->SetEnabled(false); fStopButton->SetEnabled(false);
fArchiveNameView->SetText(" "); fArchiveNameView->SetText(" ");
if (fZippingWasStopped) if (fZippingWasStopped)
fZipOutputView->SetText(TR("Stopped")); fZipOutputView->SetText(B_TRANSLATE("Stopped"));
else else
fZipOutputView->SetText(TR("Archive created OK")); fZipOutputView->SetText(B_TRANSLATE("Archive created OK"));
_CloseWindowOrKeepOpen(); _CloseWindowOrKeepOpen();
break; break;
@@ -120,7 +122,7 @@ ZippoWindow::MessageReceived(BMessage* message)
fActivityView->Stop(); fActivityView->Stop();
fStopButton->SetEnabled(false); fStopButton->SetEnabled(false);
fArchiveNameView->SetText(""); fArchiveNameView->SetText("");
fZipOutputView->SetText(TR("Error creating archive")); fZipOutputView->SetText(B_TRANSLATE("Error creating archive"));
break; break;
case ZIPPO_TASK_DESCRIPTION: case ZIPPO_TASK_DESCRIPTION:
@@ -128,7 +130,7 @@ ZippoWindow::MessageReceived(BMessage* message)
BString filename; BString filename;
if (message->FindString("archive_filename", &filename) == B_OK) { if (message->FindString("archive_filename", &filename) == B_OK) {
fArchiveName = filename; fArchiveName = filename;
BString temp(TR("Creating archive: %s")); BString temp(B_TRANSLATE("Creating archive: %s"));
temp.ReplaceFirst("%s", filename.String()); temp.ReplaceFirst("%s", filename.String());
fArchiveNameView->SetText(temp.String()); fArchiveNameView->SetText(temp.String());
} }
@@ -154,9 +156,9 @@ ZippoWindow::MessageReceived(BMessage* message)
count << fFileCount; count << fFileCount;
if (fFileCount == 1) { if (fFileCount == 1) {
output << TR("1 file added."); output << B_TRANSLATE("1 file added.");
} else { } else {
output << TR("%ld files added."); output << B_TRANSLATE("%ld files added.");
output.ReplaceFirst("%ld", count.String()); output.ReplaceFirst("%ld", count.String());
} }
@@ -204,14 +206,15 @@ ZippoWindow::QuitRequested()
fActivityView->Pause(); fActivityView->Pause();
BString message; BString message;
message << TR("Are you sure you want to stop creating this archive?"); message << B_TRANSLATE("Are you sure you want to stop creating this "
"archive?");
message << "\n\n"; message << "\n\n";
message << TR("Filename: %s"); message << B_TRANSLATE("Filename: %s");
message << "\n"; message << "\n";
message.ReplaceFirst("%s", fArchiveName.String()); message.ReplaceFirst("%s", fArchiveName.String());
BAlert* alert = new BAlert(NULL, message.String(), TR("Stop"), BAlert* alert = new BAlert(NULL, message.String(), B_TRANSLATE("Stop"),
TR("Continue"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); B_TRANSLATE("Continue"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
alert->Go(fWindowInvoker); alert->Go(fWindowInvoker);
return false; return false;
@@ -249,7 +252,7 @@ ZippoWindow::StopZipping()
fThread = NULL; fThread = NULL;
fArchiveNameView->SetText(" "); fArchiveNameView->SetText(" ");
fZipOutputView->SetText(TR("Stopped")); fZipOutputView->SetText(B_TRANSLATE("Stopped"));
_CloseWindowOrKeepOpen(); _CloseWindowOrKeepOpen();
} }
@@ -112,7 +112,7 @@ ZipperThread::ThreadStartup()
BString archiveName; BString archiveName;
if (refCount > 1) if (refCount > 1)
archiveName = TR("Archive"); archiveName = B_TRANSLATE("Archive");
else else
archiveName = lastRef.name; archiveName = lastRef.name;
@@ -170,7 +170,7 @@ ZipperThread::ThreadStartup()
_SendMessageToWindow(ZIPPO_TASK_DESCRIPTION, "archive_filename", _SendMessageToWindow(ZIPPO_TASK_DESCRIPTION, "archive_filename",
archiveName.String()); archiveName.String());
_SendMessageToWindow(ZIPPO_LINE_OF_STDOUT, "zip_output", _SendMessageToWindow(ZIPPO_LINE_OF_STDOUT, "zip_output",
TR("Preparing to archive")); B_TRANSLATE("Preparing to archive"));
return B_OK; return B_OK;
} }