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
|
* Mark Hogben
|
||||||
* DarkWyrm <[email protected]>
|
* DarkWyrm <[email protected]>
|
||||||
* Axel Dörfler, [email protected]
|
* Axel Dörfler, [email protected]
|
||||||
* Philippe Saint-Pierre, [email protected]
|
* Philippe Saint-Pierre, [email protected]
|
||||||
* Stephan Aßmus <[email protected]>
|
* Stephan Aßmus <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -103,15 +103,18 @@ FontSelectionView::FontSelectionView(const char* name,
|
|||||||
fFontsMenuField->SetAlignment(B_ALIGN_RIGHT);
|
fFontsMenuField->SetAlignment(B_ALIGN_RIGHT);
|
||||||
|
|
||||||
// size menu
|
// size menu
|
||||||
fSizesMenuField = new BMenuField("size", TR("Size:"), fSizesMenu, NULL);
|
fSizesMenuField = new BMenuField("size", B_TRANSLATE("Size:"),
|
||||||
|
fSizesMenu, NULL);
|
||||||
fSizesMenuField->SetAlignment(B_ALIGN_RIGHT);
|
fSizesMenuField->SetAlignment(B_ALIGN_RIGHT);
|
||||||
|
|
||||||
// preview
|
// preview
|
||||||
fPreviewText = new BStringView("preview text",
|
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->SetFont(&fCurrentFont);
|
||||||
fPreviewText->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
|
fPreviewText->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
|
||||||
|
|
||||||
// box around preview
|
// box around preview
|
||||||
fPreviewBox = new BBox("preview box", B_WILL_DRAW | B_FRAME_EVENTS);
|
fPreviewBox = new BBox("preview box", B_WILL_DRAW | B_FRAME_EVENTS);
|
||||||
@@ -205,28 +208,28 @@ FontSelectionView::MessageReceived(BMessage *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateSizesLabelLayoutItem()
|
FontSelectionView::CreateSizesLabelLayoutItem()
|
||||||
{
|
{
|
||||||
return fSizesMenuField->CreateLabelLayoutItem();
|
return fSizesMenuField->CreateLabelLayoutItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateSizesMenuBarLayoutItem()
|
FontSelectionView::CreateSizesMenuBarLayoutItem()
|
||||||
{
|
{
|
||||||
return fSizesMenuField->CreateMenuBarLayoutItem();
|
return fSizesMenuField->CreateMenuBarLayoutItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateFontsLabelLayoutItem()
|
FontSelectionView::CreateFontsLabelLayoutItem()
|
||||||
{
|
{
|
||||||
return fFontsMenuField->CreateLabelLayoutItem();
|
return fFontsMenuField->CreateLabelLayoutItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateFontsMenuBarLayoutItem()
|
FontSelectionView::CreateFontsMenuBarLayoutItem()
|
||||||
{
|
{
|
||||||
return fFontsMenuField->CreateMenuBarLayoutItem();
|
return fFontsMenuField->CreateMenuBarLayoutItem();
|
||||||
@@ -249,7 +252,7 @@ FontSelectionView::_BuildSizesMenu()
|
|||||||
|
|
||||||
BMessage* message = new BMessage(kMsgSetSize);
|
BMessage* message = new BMessage(kMsgSetSize);
|
||||||
message->AddInt32("size", size);
|
message->AddInt32("size", size);
|
||||||
message->AddString("name", Name());
|
message->AddString("name", Name());
|
||||||
|
|
||||||
BMenuItem* item = new BMenuItem(label, message);
|
BMenuItem* item = new BMenuItem(label, message);
|
||||||
if (size == fCurrentFont.Size())
|
if (size == fCurrentFont.Size())
|
||||||
|
|||||||
@@ -53,11 +53,11 @@ FontView::FontView()
|
|||||||
: BView("Fonts", B_WILL_DRAW )
|
: BView("Fonts", B_WILL_DRAW )
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
fPlainView = new FontSelectionView("plain", TR("Plain font:"));
|
fPlainView = new FontSelectionView("plain", B_TRANSLATE("Plain font:"));
|
||||||
fBoldView = new FontSelectionView("bold", TR("Bold font:"));
|
fBoldView = new FontSelectionView("bold", B_TRANSLATE("Bold font:"));
|
||||||
fFixedView = new FontSelectionView("fixed", TR("Fixed font:"));
|
fFixedView = new FontSelectionView("fixed", B_TRANSLATE("Fixed font:"));
|
||||||
fMenuView = new FontSelectionView("menu", TR("Menu font:"));
|
fMenuView = new FontSelectionView("menu", B_TRANSLATE("Menu font:"));
|
||||||
|
|
||||||
BGridLayout* layout = new BGridLayout(5, 5);
|
BGridLayout* layout = new BGridLayout(5, 5);
|
||||||
layout->SetInsets(10, 10, 10, 10);
|
layout->SetInsets(10, 10, 10, 10);
|
||||||
@@ -98,7 +98,7 @@ FontView::MessageReceived(BMessage* message)
|
|||||||
else if (!strcmp(name, "bold"))
|
else if (!strcmp(name, "bold"))
|
||||||
fBoldView->MessageReceived(message);
|
fBoldView->MessageReceived(message);
|
||||||
else if (!strcmp(name, "fixed"))
|
else if (!strcmp(name, "fixed"))
|
||||||
fFixedView->MessageReceived(message);
|
fFixedView->MessageReceived(message);
|
||||||
else if (!strcmp(name, "menu"))
|
else if (!strcmp(name, "menu"))
|
||||||
fMenuView->MessageReceived(message);
|
fMenuView->MessageReceived(message);
|
||||||
else
|
else
|
||||||
@@ -106,7 +106,7 @@ FontView::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
Window()->PostMessage(kMsgUpdate);
|
Window()->PostMessage(kMsgUpdate);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
BView::MessageReceived(message);
|
BView::MessageReceived(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,16 +40,16 @@ static const uint32 kMsgCheckFonts = 'chkf';
|
|||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow()
|
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)
|
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);
|
new BMessage(kMsgSetDefaults), B_WILL_DRAW);
|
||||||
fDefaultsButton->SetEnabled(false);
|
fDefaultsButton->SetEnabled(false);
|
||||||
|
|
||||||
fRevertButton = new BButton("revert", TR("Revert"),
|
fRevertButton = new BButton("revert", B_TRANSLATE("Revert"),
|
||||||
new BMessage(kMsgRevert), B_WILL_DRAW);
|
new BMessage(kMsgRevert), B_WILL_DRAW);
|
||||||
fRevertButton->SetEnabled(false);
|
fRevertButton->SetEnabled(false);
|
||||||
|
|
||||||
// BTabView* tabView = new BTabView("tabview", B_WIDTH_FROM_LABEL);
|
// BTabView* tabView = new BTabView("tabview", B_WIDTH_FROM_LABEL);
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ FontsApp::FontsApp()
|
|||||||
void
|
void
|
||||||
FontsApp::AboutRequested()
|
FontsApp::AboutRequested()
|
||||||
{
|
{
|
||||||
BAlert *alert = new BAlert("about", TR("Fonts\n"
|
BAlert *alert = new BAlert("about", B_TRANSLATE("Fonts\n"
|
||||||
"\tCopyright 2004-2005, Haiku.\n\n"), TR("OK"));
|
"\tCopyright 2004-2005, Haiku.\n\n"), B_TRANSLATE("OK"));
|
||||||
BTextView *view = alert->TextView();
|
BTextView *view = alert->TextView();
|
||||||
BFont font;
|
BFont font;
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ FontsApp::AboutRequested()
|
|||||||
|
|
||||||
view->GetFont(&font);
|
view->GetFont(&font);
|
||||||
font.SetSize(18);
|
font.SetSize(18);
|
||||||
font.SetFace(B_BOLD_FACE);
|
font.SetFace(B_BOLD_FACE);
|
||||||
view->SetFontAndColor(0, 5, &font);
|
view->SetFontAndColor(0, 5, &font);
|
||||||
|
|
||||||
alert->Go();
|
alert->Go();
|
||||||
|
|||||||
Reference in New Issue
Block a user