Nebula: Internationalize strings
This commit is contained in:
@@ -8,5 +8,11 @@ ScreenSaver Nebula :
|
|||||||
Draw.c
|
Draw.c
|
||||||
DrawStars.c
|
DrawStars.c
|
||||||
Nebula.cpp :
|
Nebula.cpp :
|
||||||
be libscreensaver.so [ TargetLibsupc++ ]
|
be libscreensaver.so localestub [ TargetLibsupc++ ]
|
||||||
|
;
|
||||||
|
|
||||||
|
DoCatalogs Message :
|
||||||
|
x-vnd.Haiku-NebulaScreensaver
|
||||||
|
:
|
||||||
|
Nebula.cpp
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AppKit.h>
|
#include <AppKit.h>
|
||||||
|
#include <Catalog.h>
|
||||||
#include <ControlLook.h>
|
#include <ControlLook.h>
|
||||||
#include <InterfaceKit.h>
|
#include <InterfaceKit.h>
|
||||||
#include <LayoutBuilder.h>
|
#include <LayoutBuilder.h>
|
||||||
@@ -20,6 +21,11 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
#undef B_TRANSLATION_CONTEXT
|
||||||
|
#define B_TRANSLATION_CONTEXT "Nebula Screen Saver"
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int x, y, z, r;
|
int x, y, z, r;
|
||||||
@@ -459,11 +465,12 @@ SettingsView::SettingsView(BRect frame)
|
|||||||
:
|
:
|
||||||
BView(frame, "", B_FOLLOW_ALL, B_WILL_DRAW)
|
BView(frame, "", B_FOLLOW_ALL, B_WILL_DRAW)
|
||||||
{
|
{
|
||||||
BStringView* titleString = new BStringView(B_EMPTY_STRING, "Nebula");
|
BStringView* titleString = new BStringView(B_EMPTY_STRING,
|
||||||
|
B_TRANSLATE("Nebula"));
|
||||||
titleString->SetFont(be_bold_font);
|
titleString->SetFont(be_bold_font);
|
||||||
|
|
||||||
BStringView* copyrightString = new BStringView(B_EMPTY_STRING,
|
BStringView* copyrightString = new BStringView(B_EMPTY_STRING,
|
||||||
"© 2001-2004 Axel Dörfler.");
|
B_TRANSLATE("© 2001-2004 Axel Dörfler."));
|
||||||
|
|
||||||
BPopUpMenu* popMenu;
|
BPopUpMenu* popMenu;
|
||||||
BMenuItem* item;
|
BMenuItem* item;
|
||||||
@@ -495,22 +502,24 @@ SettingsView::SettingsView(BRect frame)
|
|||||||
BMessage* message = new BMessage(kMsgWidth);
|
BMessage* message = new BMessage(kMsgWidth);
|
||||||
message->AddInt32("width", widths[i]);
|
message->AddInt32("width", widths[i]);
|
||||||
|
|
||||||
popMenu->AddItem(item = new BMenuItem(label.String(), message));
|
const char* l = label.String();
|
||||||
|
popMenu->AddItem(item = new BMenuItem(B_TRANSLATE(l), message));
|
||||||
|
|
||||||
if (gSettingsWidth == widths[i])
|
if (gSettingsWidth == widths[i])
|
||||||
item->SetMarked(true);
|
item->SetMarked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
fWidthMenu = new BMenuField("res", "Internal width:", popMenu);
|
fWidthMenu = new BMenuField("res", B_TRANSLATE("Internal width:"),
|
||||||
|
popMenu);
|
||||||
|
|
||||||
const char* colorSchemes[] = {
|
const char* colorSchemes[] = {
|
||||||
"yellow",
|
B_TRANSLATE("yellow"),
|
||||||
"cyan",
|
B_TRANSLATE("cyan"),
|
||||||
"red",
|
B_TRANSLATE("red"),
|
||||||
"green",
|
B_TRANSLATE("green"),
|
||||||
"grey",
|
B_TRANSLATE("grey"),
|
||||||
"cold",
|
B_TRANSLATE("cold"),
|
||||||
"orange (original)"
|
B_TRANSLATE("orange (original)")
|
||||||
};
|
};
|
||||||
|
|
||||||
popMenu = new BPopUpMenu("");
|
popMenu = new BPopUpMenu("");
|
||||||
@@ -522,13 +531,13 @@ SettingsView::SettingsView(BRect frame)
|
|||||||
item->SetMarked(true);
|
item->SetMarked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
fColorMenu = new BMenuField("col", "Color: ", popMenu);
|
fColorMenu = new BMenuField("col", B_TRANSLATE("Color:"), popMenu);
|
||||||
|
|
||||||
const char* blankBorderFormats[] = {
|
const char* blankBorderFormats[] = {
|
||||||
"fullscreen, no borders",
|
B_TRANSLATE("fullscreen, no borders"),
|
||||||
"16:9, wide-screen",
|
B_TRANSLATE("16:9, wide-screen"),
|
||||||
"2:3.5, cinemascope",
|
B_TRANSLATE("2:3.5, cinemascope"),
|
||||||
"only a slit"
|
B_TRANSLATE("only a slit")
|
||||||
};
|
};
|
||||||
|
|
||||||
popMenu = new BPopUpMenu("");
|
popMenu = new BPopUpMenu("");
|
||||||
@@ -540,15 +549,17 @@ SettingsView::SettingsView(BRect frame)
|
|||||||
item->SetMarked(true);
|
item->SetMarked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
fBorderMenu = new BMenuField("cinema", "Format: ", popMenu);
|
fBorderMenu = new BMenuField("cinema", B_TRANSLATE("Format:"), popMenu);
|
||||||
|
|
||||||
fMotionCheck = new BCheckBox(B_EMPTY_STRING, "Enable motion blur", new BMessage(kMsgMotionBlur));
|
fMotionCheck = new BCheckBox(B_EMPTY_STRING,
|
||||||
|
B_TRANSLATE("Enable motion blur"), new BMessage(kMsgMotionBlur));
|
||||||
fMotionCheck->SetValue((int)gMotionBlur);
|
fMotionCheck->SetValue((int)gMotionBlur);
|
||||||
|
|
||||||
fSpeedSlider = new SimpleSlider("Speed", new BMessage(kMsgSpeed));
|
fSpeedSlider = new SimpleSlider(B_TRANSLATE("Speed"), new BMessage(kMsgSpeed));
|
||||||
fSpeedSlider->SetValue((gSpeed - 0.002) / 0.05);
|
fSpeedSlider->SetValue((gSpeed - 0.002) / 0.05);
|
||||||
|
|
||||||
fFramesSlider = new SimpleSlider("Maximum Frames Per Second", new BMessage(kMsgFrames));
|
fFramesSlider = new SimpleSlider(B_TRANSLATE("Maximum Frames Per Second"),
|
||||||
|
new BMessage(kMsgFrames));
|
||||||
fFramesSlider->SetValue(gMaxFramesPerSecond);
|
fFramesSlider->SetValue(gMaxFramesPerSecond);
|
||||||
|
|
||||||
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_HALF_ITEM_SPACING)
|
BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_HALF_ITEM_SPACING)
|
||||||
|
|||||||
Reference in New Issue
Block a user