Updated to use B_TRANSLATE* macros. relates to #5408.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36673 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia
2010-05-06 22:02:15 +00:00
parent 6bcf4a432e
commit 905c8c8c8a
6 changed files with 122 additions and 100 deletions
+10 -9
View File
@@ -80,7 +80,8 @@ PrintOptions::SetHeight(float h)
PrintOptionsWindow::PrintOptionsWindow(BPoint at, PrintOptions* options,
BWindow* listener)
:
BWindow(BRect(at.x, at.y, at.x + 300, at.y + 200), TR("Print options"),
BWindow(BRect(at.x, at.y, at.x + 300, at.y + 200),
B_TRANSLATE("Print options"),
B_TITLED_WINDOW_LOOK, B_MODAL_SUBSET_WINDOW_FEEL,
B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS),
fPrintOptions(options),
@@ -137,41 +138,41 @@ PrintOptionsWindow::Setup()
BBox* line;
BButton* button;
rbFit = AddRadioButton("fit_to_page", TR("Fit image to page"),
rbFit = AddRadioButton("fit_to_page", B_TRANSLATE("Fit image to page"),
kMsgFitToPageSelected, op == PrintOptions::kFitToPage);
rbZoom = AddRadioButton("zoom_factor", TR("Zoom factor in %:"),
rbZoom = AddRadioButton("zoom_factor", B_TRANSLATE("Zoom factor in %:"),
kMsgZoomFactorSelected, op == PrintOptions::kZoomFactor);
fZoomFactor = AddTextControl("zoom_factor_text", "",
fCurrentOptions.ZoomFactor() * 100, kMsgZoomFactorChanged);
rbDpi = AddRadioButton("dpi", TR("DPI:"), kMsgDPISelected,
rbDpi = AddRadioButton("dpi", B_TRANSLATE("DPI:"), kMsgDPISelected,
op == PrintOptions::kDPI);
fDPI = AddTextControl("dpi_text", "", fCurrentOptions.DPI(),
kMsgDPIChanged);
rbResize = AddRadioButton("width_and_height",
TR("Resize to (in 1/72 inches):"), kMsgWidthAndHeightSelected,
B_TRANSLATE("Resize to (in 1/72 inches):"), kMsgWidthAndHeightSelected,
op == PrintOptions::kWidth || op == PrintOptions::kHeight);
fWidth = AddTextControl("width", TR("Width:"),
fWidth = AddTextControl("width", B_TRANSLATE("Width:"),
fCurrentOptions.Width(), kMsgWidthChanged);
fHeight = AddTextControl("height", TR("Height: "),
fHeight = AddTextControl("height", B_TRANSLATE("Height: "),
fCurrentOptions.Height(), kMsgHeightChanged);
line = new BBox(B_EMPTY_STRING, B_WILL_DRAW | B_FRAME_EVENTS,
B_FANCY_BORDER);
line->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, 1));
button = new BButton("job setup", TR("Job setup"),
button = new BButton("job setup", B_TRANSLATE("Job setup"),
new BMessage(kMsgJobSetup));
SetDefaultButton(button);
const float spacing = be_control_look->DefaultItemSpacing();
SetLayout(new BGroupLayout(B_HORIZONTAL));
AddChild(BGroupLayoutBuilder(B_VERTICAL, 0)
.Add(BGridLayoutBuilder()
+1 -1
View File
@@ -26,7 +26,7 @@ static const uint32 kMsgShow = 'show';
ProgressWindow::ProgressWindow(BWindow* referenceWindow, bool center)
:
BWindow(BRect(0, 0, 250, 100), TR("Progress monitor"),
BWindow(BRect(0, 0, 250, 100), B_TRANSLATE("Progress monitor"),
B_MODAL_WINDOW_LOOK, B_FLOATING_APP_WINDOW_FEEL,
B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS),
fRunner(NULL)
+25 -21
View File
@@ -37,7 +37,8 @@
ResizerWindow::ResizerWindow(BMessenger target, int32 width, int32 height)
:
BWindow(BRect(100, 100, 300, 300), TR("Resize"), B_FLOATING_WINDOW,
BWindow(BRect(100, 100, 300, 300), B_TRANSLATE("Resize"),
B_FLOATING_WINDOW,
B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS),
fOriginalWidth(width),
fOriginalHeight(height),
@@ -45,26 +46,29 @@ ResizerWindow::ResizerWindow(BMessenger target, int32 width, int32 height)
{
BString widthValue;
widthValue << width;
fWidth = new BTextControl("width", TR("Width:"), widthValue.String(), NULL);
fWidth = new BTextControl("width", B_TRANSLATE("Width:"),
widthValue.String(), NULL);
fWidth->SetModificationMessage(new BMessage(kWidthModifiedMsg));
BString heightValue;
heightValue << height;
heightValue << height;
fHeight = new BTextControl("height",
TR("Height:"), heightValue.String(), NULL);
B_TRANSLATE("Height:"), heightValue.String(), NULL);
fHeight->SetModificationMessage(new BMessage(kHeightModifiedMsg));
fAspectRatio = new BCheckBox("Ratio",
TR("Keep original proportions"), new BMessage(kWidthModifiedMsg));
B_TRANSLATE("Keep original proportions"),
new BMessage(kWidthModifiedMsg));
fAspectRatio->SetValue(B_CONTROL_ON);
fApply = new BButton("apply", TR("Apply"), new BMessage(kApplyMsg));
fApply = new BButton("apply", B_TRANSLATE("Apply"),
new BMessage(kApplyMsg));
fApply->MakeDefault(true);
const float spacing = be_control_look->DefaultItemSpacing();
const float labelspacing = be_control_look->DefaultLabelSpacing();
SetLayout(new BGroupLayout(B_HORIZONTAL));
SetLayout(new BGroupLayout(B_HORIZONTAL));
AddChild(BGroupLayoutBuilder(B_VERTICAL, 0)
.Add(BGridLayoutBuilder(labelspacing, 0)
.Add(fWidth->CreateLabelLayoutItem(), 0, 0)
@@ -73,13 +77,13 @@ ResizerWindow::ResizerWindow(BMessenger target, int32 width, int32 height)
.Add(fHeight->CreateTextViewLayoutItem(), 1, 1)
)
.Add(fAspectRatio)
.AddGroup(B_HORIZONTAL, 0)
.AddGlue()
.Add(fApply)
.End()
.SetInsets(spacing, spacing, spacing, spacing)
);
.AddGroup(B_HORIZONTAL, 0)
.AddGlue()
.Add(fApply)
.End()
.SetInsets(spacing, spacing, spacing, spacing)
);
fWidth->MakeFocus();
}
@@ -90,7 +94,7 @@ ResizerWindow::~ResizerWindow()
}
void
void
ResizerWindow::MessageReceived(BMessage* message)
{
switch (message->what)
@@ -99,16 +103,16 @@ ResizerWindow::MessageReceived(BMessage* message)
case kActivateMsg:
Activate();
break;
case kUpdateMsg:
{
// update aspect ratio, width and height
int32 width, height;
if (message->FindInt32("width", &width) == B_OK &&
message->FindInt32("height", &height) == B_OK) {
fOriginalWidth = width;
fOriginalHeight = height;
fOriginalHeight = height;
BString widthText, heightText;
widthText << width;
@@ -116,12 +120,12 @@ ResizerWindow::MessageReceived(BMessage* message)
// here the statement order is important:
// in case keep aspect ratio is enabled,
// the width should determine the height
fHeight->SetText(heightText.String());
fHeight->SetText(heightText.String());
fWidth->SetText(widthText.String());
}
break;
}
// private actions
case kResolutionMsg:
{
+5 -5
View File
@@ -60,7 +60,7 @@ ShowImageApp::AboutRequested()
"Ryan Leavengood",
NULL
};
BAboutWindow about(TR("ShowImage"), 2003, authors);
BAboutWindow about(B_TRANSLATE("ShowImage"), 2003, authors);
about.Show();
}
@@ -106,7 +106,7 @@ ShowImageApp::Pulse()
// quit the application
PostMessage(B_QUIT_REQUESTED);
}
}
}
void
@@ -217,7 +217,7 @@ void
ShowImageApp::CheckClipboard()
{
// Determines if the contents of the clipboard contain
// data that is useful to this application.
// data that is useful to this application.
// After checking the clipboard, a message is sent to
// all windows indicating that the clipboard has changed
// and whether or not the clipboard contains useful data.
@@ -233,7 +233,7 @@ ShowImageApp::CheckClipboard()
}
}
be_clipboard->Unlock();
be_clipboard->Unlock();
}
BMessage msg(MSG_CLIPBOARD_CHANGED);
@@ -250,7 +250,7 @@ ShowImageApp::QuitRequested()
if (result)
be_clipboard->StopWatching(be_app_messenger);
// tell clipboard we don't want anymore notification
return result;
}
+4 -3
View File
@@ -1285,9 +1285,9 @@ ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
if (loop) {
// If loop terminated because of a break, there was an error
char buffer[512];
snprintf(buffer, sizeof(buffer), TR("The file '%s' could not "
snprintf(buffer, sizeof(buffer), B_TRANSLATE("The file '%s' could not "
"be written."), name);
BAlert *palert = new BAlert("", buffer, TR("OK"));
BAlert *palert = new BAlert("", buffer, B_TRANSLATE("OK"));
palert->Go();
}
@@ -2445,7 +2445,8 @@ ShowImageView::_DoImageOperation(ImageProcessor::operation op, bool quiet)
int32 orientation = fImageOrientation;
if (fInverted) orientation += 256;
if (orientation != k0) {
node.WriteAttr(SHOW_IMAGE_ORIENTATION_ATTRIBUTE, B_INT32_TYPE, 0, &orientation, sizeof(orientation));
node.WriteAttr(SHOW_IMAGE_ORIENTATION_ATTRIBUTE, B_INT32_TYPE, 0,
&orientation, sizeof(orientation));
} else {
node.RemoveAttr(SHOW_IMAGE_ORIENTATION_ATTRIBUTE);
}
+77 -61
View File
@@ -188,9 +188,11 @@ ShowImageWindow::ShowImageWindow(const entry_ref* ref,
if (InitCheck() != B_OK) {
BAlert* alert;
alert = new BAlert(TR("ShowImage"),
TR("Could not load image! Either the file or an image translator for it does not exist."),
TR("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_INFO_ALERT);
alert = new BAlert(
B_TRANSLATE("ShowImage"),
B_TRANSLATE("Could not load image! Either the file or an image "
"translator for it does not exist."),
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_INFO_ALERT);
alert->Go();
// quit if file could not be opened
@@ -202,7 +204,7 @@ ShowImageWindow::ShowImageWindow(const entry_ref* ref,
#define TR_CONTEXT "Menus"
// add View menu here so it can access ShowImageView methods
BMenu* menu = new BMenu(TR("View"));
BMenu* menu = new BMenu(B_TRANSLATE("View"));
_BuildViewMenu(menu, false);
fBar->AddItem(menu);
_MarkMenuItem(fBar, MSG_DITHER_IMAGE, fImageView->GetDither());
@@ -259,9 +261,9 @@ ShowImageWindow::BuildContextMenu(BMenu* menu)
void
ShowImageWindow::_BuildViewMenu(BMenu* menu, bool popupMenu)
{
_AddItemMenu(menu, TR("Slide show"), MSG_SLIDE_SHOW, 0, 0, this);
_AddItemMenu(menu, B_TRANSLATE("Slide show"), MSG_SLIDE_SHOW, 0, 0, this);
_MarkMenuItem(menu, MSG_SLIDE_SHOW, fImageView->SlideShowStarted());
BMenu* delayMenu = new BMenu(TR("Slide delay"));
BMenu* delayMenu = new BMenu(B_TRANSLATE("Slide delay"));
if (fSlideShowDelay == NULL)
fSlideShowDelay = delayMenu;
@@ -270,39 +272,44 @@ ShowImageWindow::_BuildViewMenu(BMenu* menu, bool popupMenu)
// if slide show delay is too short! (Especially if loading the image
// takes as long as or longer than the slide show delay). Should load
// in background thread!
_AddDelayItem(delayMenu, TR("3 seconds"), 3);
_AddDelayItem(delayMenu, TR("4 seconds"), 4);
_AddDelayItem(delayMenu, TR("5 seconds"), 5);
_AddDelayItem(delayMenu, TR("6 seconds"), 6);
_AddDelayItem(delayMenu, TR("7 seconds"), 7);
_AddDelayItem(delayMenu, TR("8 seconds"), 8);
_AddDelayItem(delayMenu, TR("9 seconds"), 9);
_AddDelayItem(delayMenu, TR("10 seconds"), 10);
_AddDelayItem(delayMenu, TR("20 seconds"), 20);
_AddDelayItem(delayMenu, B_TRANSLATE("3 seconds"), 3);
_AddDelayItem(delayMenu, B_TRANSLATE("4 seconds"), 4);
_AddDelayItem(delayMenu, B_TRANSLATE("5 seconds"), 5);
_AddDelayItem(delayMenu, B_TRANSLATE("6 seconds"), 6);
_AddDelayItem(delayMenu, B_TRANSLATE("7 seconds"), 7);
_AddDelayItem(delayMenu, B_TRANSLATE("8 seconds"), 8);
_AddDelayItem(delayMenu, B_TRANSLATE("9 seconds"), 9);
_AddDelayItem(delayMenu, B_TRANSLATE("10 seconds"), 10);
_AddDelayItem(delayMenu, B_TRANSLATE("20 seconds"), 20);
menu->AddItem(delayMenu);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Original size"), MSG_ORIGINAL_SIZE, '1', 0, this);
_AddItemMenu(menu, TR("Zoom in"), MSG_ZOOM_IN, '+', 0, this);
_AddItemMenu(menu, TR("Zoom out"), MSG_ZOOM_OUT, '-', 0, this);
_AddItemMenu(menu, B_TRANSLATE("Original size"),
MSG_ORIGINAL_SIZE, '1', 0, this);
_AddItemMenu(menu, B_TRANSLATE("Zoom in"), MSG_ZOOM_IN, '+', 0, this);
_AddItemMenu(menu, B_TRANSLATE("Zoom out"), MSG_ZOOM_OUT, '-', 0, this);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("High-quality zooming"), MSG_SCALE_BILINEAR, 0, 0, this);
_AddItemMenu(menu, B_TRANSLATE("High-quality zooming"),
MSG_SCALE_BILINEAR, 0, 0, this);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Shrink to window"), MSG_SHRINK_TO_WINDOW, 0, 0, this);
_AddItemMenu(menu, TR("Zoom to window"), MSG_ZOOM_TO_WINDOW, 0, 0, this);
_AddItemMenu(menu, B_TRANSLATE("Shrink to window"),
MSG_SHRINK_TO_WINDOW, 0, 0, this);
_AddItemMenu(menu, B_TRANSLATE("Zoom to window"),
MSG_ZOOM_TO_WINDOW, 0, 0, this);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Full screen"), MSG_FULL_SCREEN, B_ENTER, 0, this);
_AddItemMenu(menu, B_TRANSLATE("Full screen"),
MSG_FULL_SCREEN, B_ENTER, 0, this);
_MarkMenuItem(menu, MSG_FULL_SCREEN, fFullScreen);
_AddItemMenu(menu, TR("Show caption in full screen mode"), MSG_SHOW_CAPTION, 0,
0, this);
_AddItemMenu(menu, B_TRANSLATE("Show caption in full screen mode"),
MSG_SHOW_CAPTION, 0, 0, this);
_MarkMenuItem(menu, MSG_SHOW_CAPTION, fShowCaption);
_MarkMenuItem(menu, MSG_SCALE_BILINEAR, fImageView->GetScaleBilinear());
@@ -321,7 +328,7 @@ ShowImageWindow::_BuildViewMenu(BMenu* menu, bool popupMenu)
if (popupMenu) {
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Use as background" B_UTF8_ELLIPSIS),
_AddItemMenu(menu, B_TRANSLATE("Use as background" B_UTF8_ELLIPSIS),
MSG_DESKTOP_BACKGROUND, 0, 0, this);
}
}
@@ -330,76 +337,83 @@ ShowImageWindow::_BuildViewMenu(BMenu* menu, bool popupMenu)
void
ShowImageWindow::AddMenus(BMenuBar* bar)
{
BMenu* menu = new BMenu(TR("File"));
fOpenMenu = new RecentDocumentsMenu(TR("Open"));
BMenu* menu = new BMenu(B_TRANSLATE("File"));
fOpenMenu = new RecentDocumentsMenu(B_TRANSLATE("Open"));
menu->AddItem(fOpenMenu);
fOpenMenu->Superitem()->SetTrigger('O');
fOpenMenu->Superitem()->SetMessage(new BMessage(MSG_FILE_OPEN));
fOpenMenu->Superitem()->SetTarget(be_app);
fOpenMenu->Superitem()->SetShortcut('O', 0);
menu->AddSeparatorItem();
BMenu *pmenuSaveAs = new BMenu(TR("Save as" B_UTF8_ELLIPSIS),
BMenu *pmenuSaveAs = new BMenu(B_TRANSLATE("Save as" B_UTF8_ELLIPSIS),
B_ITEMS_IN_COLUMN);
BTranslationUtils::AddTranslationItems(pmenuSaveAs, B_TRANSLATOR_BITMAP);
// Fill Save As submenu with all types that can be converted
// to from the Be bitmap image format
menu->AddItem(pmenuSaveAs);
_AddItemMenu(menu, TR("Close"), B_QUIT_REQUESTED, 'W', 0, this);
_AddItemMenu(menu, B_TRANSLATE("Close"), B_QUIT_REQUESTED, 'W', 0, this);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Page setup" B_UTF8_ELLIPSIS),
_AddItemMenu(menu, B_TRANSLATE("Page setup" B_UTF8_ELLIPSIS),
MSG_PAGE_SETUP, 0, 0, this);
_AddItemMenu(menu, TR("Print" B_UTF8_ELLIPSIS),
_AddItemMenu(menu, B_TRANSLATE("Print" B_UTF8_ELLIPSIS),
MSG_PREPARE_PRINT, 'P', 0, this);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("About ShowImage" B_UTF8_ELLIPSIS),
_AddItemMenu(menu, B_TRANSLATE("About ShowImage" B_UTF8_ELLIPSIS),
B_ABOUT_REQUESTED, 0, 0, be_app);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Quit"), B_QUIT_REQUESTED, 'Q', 0, be_app);
_AddItemMenu(menu, B_TRANSLATE("Quit"), B_QUIT_REQUESTED, 'Q', 0, be_app);
bar->AddItem(menu);
menu = new BMenu(TR("Edit"));
_AddItemMenu(menu, TR("Undo"), B_UNDO, 'Z', 0, this, false);
menu = new BMenu(B_TRANSLATE("Edit"));
_AddItemMenu(menu, B_TRANSLATE("Undo"), B_UNDO, 'Z', 0, this, false);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Cut"), B_CUT, 'X', 0, this, false);
_AddItemMenu(menu, TR("Copy"), B_COPY, 'C', 0, this, false);
_AddItemMenu(menu, TR("Paste"), B_PASTE, 'V', 0, this, false);
_AddItemMenu(menu, TR("Clear"), MSG_CLEAR_SELECT, 0, 0, this, false);
_AddItemMenu(menu, B_TRANSLATE("Cut"), B_CUT, 'X', 0, this, false);
_AddItemMenu(menu, B_TRANSLATE("Copy"), B_COPY, 'C', 0, this, false);
_AddItemMenu(menu, B_TRANSLATE("Paste"), B_PASTE, 'V', 0, this, false);
_AddItemMenu(menu, B_TRANSLATE("Clear"),
MSG_CLEAR_SELECT, 0, 0, this, false);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Select all"), MSG_SELECT_ALL, 'A', 0, this);
_AddItemMenu(menu, B_TRANSLATE("Select all"),
MSG_SELECT_ALL, 'A', 0, this);
bar->AddItem(menu);
menu = fBrowseMenu = new BMenu(TR("Browse"));
_AddItemMenu(menu, TR("First page"),
menu = fBrowseMenu = new BMenu(B_TRANSLATE("Browse"));
_AddItemMenu(menu, B_TRANSLATE("First page"),
MSG_PAGE_FIRST, B_LEFT_ARROW, B_SHIFT_KEY, this);
_AddItemMenu(menu, TR("Last page"),
_AddItemMenu(menu, B_TRANSLATE("Last page"),
MSG_PAGE_LAST, B_RIGHT_ARROW, B_SHIFT_KEY, this);
_AddItemMenu(menu, TR("Previous page"), MSG_PAGE_PREV, B_LEFT_ARROW, 0, this);
_AddItemMenu(menu, TR("Next page"), MSG_PAGE_NEXT, B_RIGHT_ARROW, 0, this);
fGoToPageMenu = new BMenu(TR("Go to page"));
_AddItemMenu(menu, B_TRANSLATE("Previous page"),
MSG_PAGE_PREV, B_LEFT_ARROW, 0, this);
_AddItemMenu(menu, B_TRANSLATE("Next page"),
MSG_PAGE_NEXT, B_RIGHT_ARROW, 0, this);
fGoToPageMenu = new BMenu(B_TRANSLATE("Go to page"));
fGoToPageMenu->SetRadioMode(true);
menu->AddItem(fGoToPageMenu);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Previous file"), MSG_FILE_PREV, B_UP_ARROW, 0, this);
_AddItemMenu(menu, TR("Next file"), MSG_FILE_NEXT, B_DOWN_ARROW, 0, this);
_AddItemMenu(menu, B_TRANSLATE("Previous file"),
MSG_FILE_PREV, B_UP_ARROW, 0, this);
_AddItemMenu(menu, B_TRANSLATE("Next file"),
MSG_FILE_NEXT, B_DOWN_ARROW, 0, this);
bar->AddItem(menu);
menu = new BMenu(TR("Image"));
_AddItemMenu(menu, TR("Rotate clockwise"), MSG_ROTATE_90, 'R', 0, this);
_AddItemMenu(menu, TR("Rotate counterclockwise"),
menu = new BMenu(B_TRANSLATE("Image"));
_AddItemMenu(menu, B_TRANSLATE("Rotate clockwise"),
MSG_ROTATE_90, 'R', 0, this);
_AddItemMenu(menu, B_TRANSLATE("Rotate counterclockwise"),
MSG_ROTATE_270, 'R', B_SHIFT_KEY, this);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Flip left to right"),
_AddItemMenu(menu, B_TRANSLATE("Flip left to right"),
MSG_FLIP_LEFT_TO_RIGHT, 0, 0, this);
_AddItemMenu(menu, TR("Flip top to bottom"),
_AddItemMenu(menu, B_TRANSLATE("Flip top to bottom"),
MSG_FLIP_TOP_TO_BOTTOM, 0, 0, this);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Invert colors"), MSG_INVERT, 0, 0, this);
_AddItemMenu(menu, B_TRANSLATE("Invert colors"), MSG_INVERT, 0, 0, this);
menu->AddSeparatorItem();
fResizeItem = _AddItemMenu(menu, TR("Resize" B_UTF8_ELLIPSIS),
fResizeItem = _AddItemMenu(menu, B_TRANSLATE("Resize" B_UTF8_ELLIPSIS),
MSG_OPEN_RESIZER_WINDOW, 0, 0, this);
bar->AddItem(menu);
menu->AddSeparatorItem();
_AddItemMenu(menu, TR("Use as background" B_UTF8_ELLIPSIS),
_AddItemMenu(menu, B_TRANSLATE("Use as background" B_UTF8_ELLIPSIS),
MSG_DESKTOP_BACKGROUND, 0, 0, this);
}
@@ -1019,16 +1033,18 @@ ShowImageWindow::_ClosePrompt()
if (count > 1) {
bs_printf(&prompt,
TR("The document '%s' (page %d) has been changed. Do you want to close the document?"),
B_TRANSLATE("The document '%s' (page %d) has been changed. Do you "
"want to close the document?"),
name.String(), page);
} else {
bs_printf(&prompt,
TR("The document '%s' has been changed. Do you want to close the document?"),
B_TRANSLATE("The document '%s' has been changed. Do you want to "
"close the document?"),
name.String());
}
BAlert* pAlert = new BAlert(TR("Close document"), prompt.String(),
TR("Cancel"), TR("Close"));
BAlert* pAlert = new BAlert(B_TRANSLATE("Close document"), prompt.String(),
B_TRANSLATE("Cancel"), B_TRANSLATE("Close"));
if (pAlert->Go() == 0) {
// Cancel
return false;