Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36685 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Mark Hogben
|
||||
* DarkWyrm <[email protected]>
|
||||
* Axel Dörfler, [email protected]
|
||||
* Philippe Saint-Pierre, [email protected]
|
||||
* Philippe Saint-Pierre, [email protected]
|
||||
* Stephan Aßmus <[email protected]>
|
||||
*/
|
||||
|
||||
@@ -103,15 +103,18 @@ FontSelectionView::FontSelectionView(const char* name,
|
||||
fFontsMenuField->SetAlignment(B_ALIGN_RIGHT);
|
||||
|
||||
// size menu
|
||||
fSizesMenuField = new BMenuField("size", TR("Size:"), fSizesMenu, NULL);
|
||||
fSizesMenuField = new BMenuField("size", B_TRANSLATE("Size:"),
|
||||
fSizesMenu, NULL);
|
||||
fSizesMenuField->SetAlignment(B_ALIGN_RIGHT);
|
||||
|
||||
// preview
|
||||
fPreviewText = new BStringView("preview text",
|
||||
TR_CMT("The quick brown fox jumps over the lazy dog.","Don't translate this literally ! Use a phrase showing all chars from A to Z."));
|
||||
B_TRANSLATE_COMMENT("The quick brown fox jumps over the lazy dog.",
|
||||
"Don't translate this literally ! Use a phrase showing all chars "
|
||||
"from A to Z."));
|
||||
|
||||
fPreviewText->SetFont(&fCurrentFont);
|
||||
fPreviewText->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
|
||||
fPreviewText->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
|
||||
|
||||
// box around preview
|
||||
fPreviewBox = new BBox("preview box", B_WILL_DRAW | B_FRAME_EVENTS);
|
||||
@@ -205,28 +208,28 @@ FontSelectionView::MessageReceived(BMessage *msg)
|
||||
}
|
||||
|
||||
|
||||
BLayoutItem*
|
||||
BLayoutItem*
|
||||
FontSelectionView::CreateSizesLabelLayoutItem()
|
||||
{
|
||||
return fSizesMenuField->CreateLabelLayoutItem();
|
||||
}
|
||||
|
||||
|
||||
BLayoutItem*
|
||||
BLayoutItem*
|
||||
FontSelectionView::CreateSizesMenuBarLayoutItem()
|
||||
{
|
||||
return fSizesMenuField->CreateMenuBarLayoutItem();
|
||||
}
|
||||
|
||||
|
||||
BLayoutItem*
|
||||
BLayoutItem*
|
||||
FontSelectionView::CreateFontsLabelLayoutItem()
|
||||
{
|
||||
return fFontsMenuField->CreateLabelLayoutItem();
|
||||
}
|
||||
|
||||
|
||||
BLayoutItem*
|
||||
BLayoutItem*
|
||||
FontSelectionView::CreateFontsMenuBarLayoutItem()
|
||||
{
|
||||
return fFontsMenuField->CreateMenuBarLayoutItem();
|
||||
@@ -249,7 +252,7 @@ FontSelectionView::_BuildSizesMenu()
|
||||
|
||||
BMessage* message = new BMessage(kMsgSetSize);
|
||||
message->AddInt32("size", size);
|
||||
message->AddString("name", Name());
|
||||
message->AddString("name", Name());
|
||||
|
||||
BMenuItem* item = new BMenuItem(label, message);
|
||||
if (size == fCurrentFont.Size())
|
||||
|
||||
@@ -53,11 +53,11 @@ FontView::FontView()
|
||||
: BView("Fonts", B_WILL_DRAW )
|
||||
{
|
||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
|
||||
fPlainView = new FontSelectionView("plain", TR("Plain font:"));
|
||||
fBoldView = new FontSelectionView("bold", TR("Bold font:"));
|
||||
fFixedView = new FontSelectionView("fixed", TR("Fixed font:"));
|
||||
fMenuView = new FontSelectionView("menu", TR("Menu font:"));
|
||||
|
||||
fPlainView = new FontSelectionView("plain", B_TRANSLATE("Plain font:"));
|
||||
fBoldView = new FontSelectionView("bold", B_TRANSLATE("Bold font:"));
|
||||
fFixedView = new FontSelectionView("fixed", B_TRANSLATE("Fixed font:"));
|
||||
fMenuView = new FontSelectionView("menu", B_TRANSLATE("Menu font:"));
|
||||
|
||||
BGridLayout* layout = new BGridLayout(5, 5);
|
||||
layout->SetInsets(10, 10, 10, 10);
|
||||
@@ -98,7 +98,7 @@ FontView::MessageReceived(BMessage* message)
|
||||
else if (!strcmp(name, "bold"))
|
||||
fBoldView->MessageReceived(message);
|
||||
else if (!strcmp(name, "fixed"))
|
||||
fFixedView->MessageReceived(message);
|
||||
fFixedView->MessageReceived(message);
|
||||
else if (!strcmp(name, "menu"))
|
||||
fMenuView->MessageReceived(message);
|
||||
else
|
||||
@@ -106,7 +106,7 @@ FontView::MessageReceived(BMessage* message)
|
||||
|
||||
Window()->PostMessage(kMsgUpdate);
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
BView::MessageReceived(message);
|
||||
}
|
||||
|
||||
@@ -40,16 +40,16 @@ static const uint32 kMsgCheckFonts = 'chkf';
|
||||
|
||||
|
||||
MainWindow::MainWindow()
|
||||
: BWindow(BRect(0, 0, 1, 1), TR("Fonts"), B_TITLED_WINDOW,
|
||||
: BWindow(BRect(0, 0, 1, 1), B_TRANSLATE("Fonts"), B_TITLED_WINDOW,
|
||||
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
|
||||
{
|
||||
fDefaultsButton = new BButton("defaults", TR("Defaults"),
|
||||
fDefaultsButton = new BButton("defaults", B_TRANSLATE("Defaults"),
|
||||
new BMessage(kMsgSetDefaults), B_WILL_DRAW);
|
||||
fDefaultsButton->SetEnabled(false);
|
||||
|
||||
fRevertButton = new BButton("revert", TR("Revert"),
|
||||
fRevertButton = new BButton("revert", B_TRANSLATE("Revert"),
|
||||
new BMessage(kMsgRevert), B_WILL_DRAW);
|
||||
fRevertButton->SetEnabled(false);
|
||||
fRevertButton->SetEnabled(false);
|
||||
|
||||
// BTabView* tabView = new BTabView("tabview", B_WIDTH_FROM_LABEL);
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ FontsApp::FontsApp()
|
||||
void
|
||||
FontsApp::AboutRequested()
|
||||
{
|
||||
BAlert *alert = new BAlert("about", TR("Fonts\n"
|
||||
"\tCopyright 2004-2005, Haiku.\n\n"), TR("OK"));
|
||||
BAlert *alert = new BAlert("about", B_TRANSLATE("Fonts\n"
|
||||
"\tCopyright 2004-2005, Haiku.\n\n"), B_TRANSLATE("OK"));
|
||||
BTextView *view = alert->TextView();
|
||||
BFont font;
|
||||
|
||||
@@ -52,7 +52,7 @@ FontsApp::AboutRequested()
|
||||
|
||||
view->GetFont(&font);
|
||||
font.SetSize(18);
|
||||
font.SetFace(B_BOLD_FACE);
|
||||
font.SetFace(B_BOLD_FACE);
|
||||
view->SetFontAndColor(0, 5, &font);
|
||||
|
||||
alert->Go();
|
||||
|
||||
Reference in New Issue
Block a user