Localization changes. Use of B_TRANSLATE_APP_NAME(). Small cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40949 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström 2011-03-14 14:41:13 +00:00
parent e59aab0981
commit 066522e87b
15 changed files with 52 additions and 28 deletions

View File

@ -633,9 +633,10 @@ CDPlayer::_WatchCDState()
CDPlayerWindow::CDPlayerWindow()
: BWindow(BRect (100, 100, 405, 280), B_TRANSLATE("CDPlayer"),
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE |
B_ASYNCHRONOUS_CONTROLS)
:
BWindow(BRect (100, 100, 405, 280), B_TRANSLATE_APP_NAME("CDPlayer"),
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
| B_ASYNCHRONOUS_CONTROLS)
{
}

View File

@ -122,9 +122,10 @@ private:
CharacterWindow::CharacterWindow()
: BWindow(BRect(100, 100, 700, 550), B_TRANSLATE("CharacterMap"),
:
BWindow(BRect(100, 100, 700, 550), B_TRANSLATE_APP_NAME("CharacterMap"),
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
| B_AUTO_UPDATE_SIZE_LIMITS)
| B_AUTO_UPDATE_SIZE_LIMITS)
{
BMessage settings;
_LoadSettings(settings);

View File

@ -6,6 +6,12 @@ Application Clock :
cl_view.cpp
cl_wind.cpp
clock.cpp
: be $(TARGET_LIBSUPC++)
: be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: Clock.rdef
;
DoCatalogs Clock :
x-vnd.Haiku-Clock
:
clock.cpp
;

View File

@ -7,6 +7,7 @@
#include <Application.h>
#include <Catalog.h>
#include "cl_wind.h"
@ -19,7 +20,8 @@ main(int argc, char* argv[])
{
BApplication app(kAppSignature);
BWindow* clockWindow = new TClockWindow(BRect(100, 100, 182, 182), "Clock");
BWindow* clockWindow = new TClockWindow(BRect(100, 100, 182, 182),
B_TRANSLATE_APP_NAME("Clock"));
clockWindow->Show();
app.Run();

View File

@ -56,7 +56,8 @@ namespace {
void
ErrorAlert(const char* message, status_t err, BWindow *window = NULL)
{
BAlert *alert = new BAlert("", message, B_TRANSLATE("OK"));
BAlert *alert = new BAlert(B_TRANSLATE_APP_NAME("CodyCam"), message,
B_TRANSLATE("OK"));
if (window != NULL)
alert->CenterIn(window->Frame());
alert->Go();
@ -190,7 +191,7 @@ void
CodyCam::ReadyToRun()
{
fWindow = new VideoWindow(BRect(28, 28, 28, 28),
(const char*) B_TRANSLATE("CodyCam"), B_TITLED_WINDOW,
(const char*) B_TRANSLATE_APP_NAME("CodyCam"), B_TITLED_WINDOW,
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, &fPort);
_SetUpNodes();

View File

@ -85,11 +85,11 @@ TBeMenu* TBarWindow::sBeMenu = NULL;
TBarWindow::TBarWindow()
:
BWindow(BRect(-1000.0f, -1000.0f, -1000.0f, -1000.0f), B_TRANSLATE("Deskbar"),
B_BORDERED_WINDOW,
BWindow(BRect(-1000.0f, -1000.0f, -1000.0f, -1000.0f),
B_TRANSLATE_APP_NAME("Deskbar"), B_BORDERED_WINDOW,
B_WILL_ACCEPT_FIRST_CLICK | B_NOT_ZOOMABLE | B_NOT_CLOSABLE
| B_NOT_MINIMIZABLE | B_NOT_MOVABLE | B_NOT_RESIZABLE
| B_AVOID_FRONT | B_ASYNCHRONOUS_CONTROLS,
| B_NOT_MINIMIZABLE | B_NOT_MOVABLE | B_NOT_RESIZABLE
| B_AVOID_FRONT | B_ASYNCHRONOUS_CONTROLS,
B_ALL_WORKSPACES)
{
desk_settings* settings = ((TBarApp*)be_app)->Settings();

View File

@ -76,7 +76,7 @@ DevicesApplication::ShowAbout()
DevicesWindow::DevicesWindow()
:
BWindow(BRect(50, 50, 750, 550), B_TRANSLATE("Devices"),
BWindow(BRect(50, 50, 750, 550), B_TRANSLATE_APP_NAME("Devices"),
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS
| B_AUTO_UPDATE_SIZE_LIMITS
| B_QUIT_ON_WINDOW_CLOSE)

View File

@ -32,9 +32,10 @@ static const uint32 kMsgProbeDevice = 'prFl';
OpenWindow::OpenWindow()
: BWindow(BRect(0, 0, 35, 10), B_TRANSLATE("DiskProbe"), B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
| B_AUTO_UPDATE_SIZE_LIMITS)
:
BWindow(BRect(0, 0, 35, 10), B_TRANSLATE_APP_NAME("DiskProbe"),
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
| B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
{
fDevicesMenu = new BPopUpMenu("devices");
CollectDevices(fDevicesMenu);

View File

@ -25,7 +25,7 @@
MainWindow::MainWindow(BRect pieRect)
:
BWindow(pieRect, B_TRANSLATE("DiskUsage"), B_TITLED_WINDOW,
BWindow(pieRect, B_TRANSLATE_APP_NAME("DiskUsage"), B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
| B_AUTO_UPDATE_SIZE_LIMITS)
{

View File

@ -160,7 +160,8 @@ enum {
MainWindow::MainWindow(BRect frame)
: BWindow(frame, B_TRANSLATE("DriveSetup"), B_DOCUMENT_WINDOW,
:
BWindow(frame, B_TRANSLATE_APP_NAME("DriveSetup"), B_DOCUMENT_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE),
fCurrentDisk(NULL),
fCurrentPartitionID(-1),

View File

@ -29,7 +29,7 @@ ExpanderApp::ExpanderApp()
void
ExpanderApp::AboutRequested()
{
BString appName = B_TRANSLATE("Expander");
BString appName = B_TRANSLATE_APP_NAME("Expander");
int nameLength = appName.CountChars();
BAlert* alert = new BAlert("about",
appName.Append(B_TRANSLATE("\n\twritten by Jérôme Duval\n"

View File

@ -50,8 +50,8 @@ const uint32 MSG_SHOWCONTENTS = 'mSCT';
ExpanderWindow::ExpanderWindow(BRect frame, const entry_ref* ref,
BMessage* settings)
:
BWindow(frame, B_TRANSLATE_COMMENT("Expander", "!! Window Title !!"),
B_TITLED_WINDOW, B_NORMAL_WINDOW_FEEL),
BWindow(frame, B_TRANSLATE_APP_NAME("Expander"), B_TITLED_WINDOW,
B_NORMAL_WINDOW_FEEL),
fSourcePanel(NULL),
fDestPanel(NULL),
fSourceChanged(true),

View File

@ -9,6 +9,12 @@ Application GLTeapot :
error.cpp
TeapotWindow.cpp
TeapotApp.cpp
: be GL game $(TARGET_LIBSUPC++)
: be GL game $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: GLTeapot.rdef
;
DoCatalogs GLTeapot :
x-vnd.Haiku-GLTeapot
:
TeapotApp.cpp
;

View File

@ -3,8 +3,12 @@
This file may be used under the terms of the Be Sample Code License.
*/
#include "TeapotApp.h"
#include <Catalog.h>
int
main(int argc, char** argv)
{
@ -16,9 +20,11 @@ main(int argc, char** argv)
TeapotApp::TeapotApp(const char* sign)
: BApplication(sign)
:
BApplication(sign)
{
fTeapotWindow = new TeapotWindow(BRect(5, 25, 300, 315), "GLTeapot", B_TITLED_WINDOW, 0);
fTeapotWindow = new TeapotWindow(BRect(5, 25, 300, 315),
B_TRANSLATE_APP_NAME("GLTeapot"), B_TITLED_WINDOW, 0);
fTeapotWindow->Show();
}
@ -26,7 +32,6 @@ TeapotApp::TeapotApp(const char* sign)
void
TeapotApp::MessageReceived(BMessage* msg)
{
// msg->PrintToStream();
switch (msg->what) {
default:

View File

@ -89,9 +89,9 @@ enum {
MainWindow::MainWindow(IconEditorApp* app, Document* document,
const BMessage* settings)
:
BWindow(BRect(50, 50, 900, 750), "Icon-O-Matic",
BWindow(BRect(50, 50, 900, 750), B_TRANSLATE_APP_NAME("Icon-O-Matic"),
B_DOCUMENT_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS),
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS),
fApp(app),
fDocument(document),
fIcon(NULL)