From 267479782d9bfb61695ace95cc46e594186bdfd0 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 29 Dec 2010 17:02:32 +0000 Subject: [PATCH] Various build fixes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40033 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/datatranslations/DataTranslations.cpp | 6 +++--- src/preferences/datatranslations/DataTranslationsWindow.cpp | 4 ++-- src/preferences/mail/AutoConfigWindow.cpp | 6 +++++- src/preferences/mail/DNSQuery.cpp | 2 +- src/preferences/mail/Jamfile | 4 ++-- src/preferences/notifications/GeneralView.cpp | 6 +++--- src/preferences/notifications/NotificationsView.cpp | 2 +- src/preferences/screen/AlertView.cpp | 4 ++-- src/preferences/screen/ScreenWindow.cpp | 6 +++--- 9 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/preferences/datatranslations/DataTranslations.cpp b/src/preferences/datatranslations/DataTranslations.cpp index 9afc1ae607..d3a15b6c80 100644 --- a/src/preferences/datatranslations/DataTranslations.cpp +++ b/src/preferences/datatranslations/DataTranslations.cpp @@ -105,7 +105,7 @@ DataTranslationsApplication::_NoTranslatorError(const char* name) BString text(B_TRANSLATE("The item '")); text << B_TRANSLATE("%name' does not appear to be a Translator and will" " not be installed."); - text.ReplaceAll(%name, name); + text.ReplaceAll("%name", name); BAlert* alert = new BAlert("", text.String(), B_TRANSLATE("Ok")); alert->Go(); } @@ -153,10 +153,10 @@ DataTranslationsApplication::RefsReceived(BMessage* message) if (target.Contains(ref.name)) { BString string(B_TRANSLATE("An item named '")); - string << B_TRANSLATE("%ref.name' already exists in the " + string << B_TRANSLATE("%name already exists in the " "Translators folder! Shall the existing translator be " "overwritten?"); - string.ReplaceAll(%ref.name, ref.name); + string.ReplaceAll("%name", ref.name); BAlert* alert = new BAlert(B_TRANSLATE("DataTranslations - Note"), string.String(), B_TRANSLATE("Cancel"), diff --git a/src/preferences/datatranslations/DataTranslationsWindow.cpp b/src/preferences/datatranslations/DataTranslationsWindow.cpp index 76f3b903cf..29f290d535 100644 --- a/src/preferences/datatranslations/DataTranslationsWindow.cpp +++ b/src/preferences/datatranslations/DataTranslationsWindow.cpp @@ -224,14 +224,14 @@ DataTranslationsWindow::_ShowInfoAlert(int32 id) BString message; message << B_TRANSLATE("Name: %name \nVersion: "); - message.ReplaceAll(%name, name); + message.ReplaceAll("%name", name); // Convert the version number into a readable format message << (int)B_TRANSLATION_MAJOR_VERSION(version) << '.' << (int)B_TRANSLATION_MINOR_VERSION(version) << '.' << (int)B_TRANSLATION_REVISION_VERSION(version); message << B_TRANSLATE("\nInfo: %info\n\nPath:\n") << path.Path() << "\n"; - message.ReplaceAll(%info, info); + message.ReplaceAll("%info", info); BAlert* alert = new BAlert(B_TRANSLATE("info"), message.String(), B_TRANSLATE("OK")); diff --git a/src/preferences/mail/AutoConfigWindow.cpp b/src/preferences/mail/AutoConfigWindow.cpp index c3f6c88b14..6965d03290 100644 --- a/src/preferences/mail/AutoConfigWindow.cpp +++ b/src/preferences/mail/AutoConfigWindow.cpp @@ -15,6 +15,10 @@ #include +#undef B_TRANSLATE_CONTEXT +#define B_TRANSLATE_CONTEXT "AutoConfigWindow" + + AutoConfigWindow::AutoConfigWindow(BRect rect, BWindow *parent) : BWindow(rect, B_TRANSLATE("Create new account"), B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL, @@ -38,7 +42,7 @@ AutoConfigWindow::AutoConfigWindow(BRect rect, BWindow *parent) buttonRect.top = buttonRect.bottom - buttonHeight; buttonRect.left = buttonRect.right - 2 * buttonWidth - 5; buttonRect.right = buttonRect.left + buttonWidth; - fBackButton = new BButton(buttonRect, "back", B_TRANSALATE("Back"), + fBackButton = new BButton(buttonRect, "back", B_TRANSLATE("Back"), new BMessage(kBackMsg)); fBackButton->SetEnabled(false); fRootView->AddChild(fBackButton); diff --git a/src/preferences/mail/DNSQuery.cpp b/src/preferences/mail/DNSQuery.cpp index 78622cfa2a..6c9e458a6e 100644 --- a/src/preferences/mail/DNSQuery.cpp +++ b/src/preferences/mail/DNSQuery.cpp @@ -341,7 +341,7 @@ DNSQuery::GetMXRecords(BString serverName, BObjectList* mxList, _ReadQueryHeader(receiBuffer, &receiHeader); PRINT(B_TRANSLATE("Package contains :")); PRINT(B_TRANSLATE("%d Questions, "), receiHeader.q_count); - PRINT(B_TRANSLATE("%d Answers,) ", receiHeader.ans_count); + PRINT(B_TRANSLATE("%d Answers, "), receiHeader.ans_count); PRINT(B_TRANSLATE("%d Authoritative Servers, "), receiHeader.auth_count); PRINT(B_TRANSLATE("%d Additional records\n"), receiHeader.add_count); diff --git a/src/preferences/mail/Jamfile b/src/preferences/mail/Jamfile index f8cbb9d765..00bdc1917f 100644 --- a/src/preferences/mail/Jamfile +++ b/src/preferences/mail/Jamfile @@ -23,8 +23,8 @@ UsePrivateHeaders shared ; local sources = Account.cpp AutoConfig.cpp - AutoConfigWindow.cpp AutoConfigView.cpp + AutoConfigWindow.cpp CenterContainer.cpp ConfigViews.cpp ConfigWindow.cpp @@ -54,7 +54,7 @@ DoCatalogs E-mail : x-vnd.Haiku-Mail : Account.cpp - AutoConfiView.cpp + AutoConfigView.cpp ConfigViews.cpp ConfigWindow.cpp DNSQuery.cpp diff --git a/src/preferences/notifications/GeneralView.cpp b/src/preferences/notifications/GeneralView.cpp index 0334c0f2b4..68e827576d 100644 --- a/src/preferences/notifications/GeneralView.cpp +++ b/src/preferences/notifications/GeneralView.cpp @@ -79,7 +79,7 @@ GeneralView::GeneralView(SettingsHost* host) fTimeout = new BTextControl(B_TRANSLATE("Hide notifications from screen" " after"), NULL, new BMessage(kSettingChanged)); BStringView* displayTimeLabel = new BStringView("dt_label", - B_TRANSLATE("seconds of inactivity"); + B_TRANSLATE("seconds of inactivity")); // Default position // TODO: Here will come a screen representation with the four corners clickable @@ -178,7 +178,7 @@ GeneralView::MessageReceived(BMessage* msg) "Notifications"), B_TRANSLATE("Cannot enable" " notifications because the server cannot be " "found.\nThis means your InfoPopper installation" - " was not successfully completed.")), + " was not successfully completed."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); (void)alert->Go(); @@ -292,7 +292,7 @@ GeneralView::Save() ret = find_directory(B_USER_BOOT_DIRECTORY, &path, true); if (ret != B_OK) { BAlert* alert = new BAlert("", - B_TRANSLATE"Can't save preferences, you probably don't have " + B_TRANSLATE("Can't save preferences, you probably don't have " "write access to the boot settings directory."), B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); diff --git a/src/preferences/notifications/NotificationsView.cpp b/src/preferences/notifications/NotificationsView.cpp index 9fcdbef212..4795399d42 100644 --- a/src/preferences/notifications/NotificationsView.cpp +++ b/src/preferences/notifications/NotificationsView.cpp @@ -81,7 +81,7 @@ NotificationsView::NotificationsView() fNotifications->SetSelectionMode(B_SINGLE_SELECTION_LIST); fTitleCol = new BStringColumn(B_TRANSLATE("Title"), 100, - be_plain_font->StringWidth(B_TRANSLATE"Title")) + + be_plain_font->StringWidth(B_TRANSLATE("Title")) + (kCLVTitlePadding * 2), rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT); fNotifications->AddColumn(fTitleCol, kTitleIndex); diff --git a/src/preferences/screen/AlertView.cpp b/src/preferences/screen/AlertView.cpp index 83991161f2..d51c899710 100644 --- a/src/preferences/screen/AlertView.cpp +++ b/src/preferences/screen/AlertView.cpp @@ -134,8 +134,8 @@ void AlertView::UpdateCountdownView() { BString string; - string << B_TRANSLATE("Settings will revert in %fSeconds seconds."); - string.ReplaceAll(%fSeconds, fSeconds); + string = B_TRANSLATE("Settings will revert in %seconds seconds."); + string.ReplaceFirst("%seconds", BString() << fSeconds); fCountdownView->SetText(string.String()); } diff --git a/src/preferences/screen/ScreenWindow.cpp b/src/preferences/screen/ScreenWindow.cpp index 7bab655aa3..fe75ae8ba8 100644 --- a/src/preferences/screen/ScreenWindow.cpp +++ b/src/preferences/screen/ScreenWindow.cpp @@ -74,7 +74,7 @@ static const struct { int32 bits_per_pixel; const char* label; } kColorSpaces[] = { - { B_CMAP8, 8, B_TRANSATE("8 bits/pixel, 256 colors") }, + { B_CMAP8, 8, B_TRANSLATE("8 bits/pixel, 256 colors") }, { B_RGB15, 15, B_TRANSLATE("15 bits/pixel, 32768 colors") }, { B_RGB16, 16, B_TRANSLATE("16 bits/pixel, 65536 colors") }, { B_RGB24, 24, B_TRANSLATE("24 bits/pixel, 16 Million colors") }, @@ -670,8 +670,8 @@ ScreenWindow::_UpdateRefreshControl() if (!item->IsMarked()) item->SetMarked(true); - // "Other…" items only contains a refresh rate when active - fOtherRefresh->SetLabel(B_TRANSLATE("Other" B_UTF8_ELLIPSIS_); + // "Other" items only contains a refresh rate when active + fOtherRefresh->SetLabel(B_TRANSLATE("Other" B_UTF8_ELLIPSIS)); return; }