[haiku-commits] r41023 - haiku/trunk/src/bin/screen_blanker

  • From: jonas@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 18 Mar 2011 23:46:00 +0100 (CET)

Author: kirilla
Date: 2011-03-18 23:45:59 +0100 (Fri, 18 Mar 2011)
New Revision: 41023
Changeset: https://dev.haiku-os.org/changeset/41023
Ticket: https://dev.haiku-os.org/ticket/7232

Modified:
   haiku/trunk/src/bin/screen_blanker/Jamfile
   haiku/trunk/src/bin/screen_blanker/PasswordWindow.cpp
Log:
Localization of Screensaver unlock window. Ticket #7232

Modified: haiku/trunk/src/bin/screen_blanker/Jamfile
===================================================================
--- haiku/trunk/src/bin/screen_blanker/Jamfile  2011-03-18 21:39:48 UTC (rev 
41022)
+++ haiku/trunk/src/bin/screen_blanker/Jamfile  2011-03-18 22:45:59 UTC (rev 
41023)
@@ -16,7 +16,7 @@
                # needed for some old/broken screen saver add-ons that do not
                # link against libscreensaver.so
 
-       : be game libscreensaver.so $(TARGET_LIBSUPC++)
+       : be game $(HAIKU_LOCALE_LIBS) libscreensaver.so $(TARGET_LIBSUPC++)
        : screen_blanker.rdef
 ;
 
@@ -27,3 +27,9 @@
 Package haiku-screensaverkit-cvs :
        screen_blanker :
        boot home config bin ;
+
+DoCatalogs screen_blanker :
+       x-vnd.Haiku.screenblanker
+       :
+       PasswordWindow.cpp
+;

Modified: haiku/trunk/src/bin/screen_blanker/PasswordWindow.cpp
===================================================================
--- haiku/trunk/src/bin/screen_blanker/PasswordWindow.cpp       2011-03-18 
21:39:48 UTC (rev 41022)
+++ haiku/trunk/src/bin/screen_blanker/PasswordWindow.cpp       2011-03-18 
22:45:59 UTC (rev 41023)
@@ -14,13 +14,19 @@
 #include <Application.h>
 #include <Box.h>
 #include <Button.h>
+#include <Catalog.h>
 #include <Screen.h>
 
 #include <WindowPrivate.h>
 
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "Screensaver password dialog"
+
+
 PasswordWindow::PasswordWindow()
-       : BWindow(BRect(100, 100, 400, 230), "Enter password",
+       :
+       BWindow(BRect(100, 100, 400, 230), "Enter password",
                B_NO_BORDER_WINDOW_LOOK, kPasswordWindowFeel
                        /* TODO: B_MODAL_APP_WINDOW_FEEL should also behave 
correctly */,
                B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE | 
B_NOT_MINIMIZABLE
@@ -35,18 +41,20 @@
 
        BBox *customBox = new BBox(bounds, "customBox", B_FOLLOW_NONE);
        topView->AddChild(customBox);
-       customBox->SetLabel("Unlock screen saver");
+       customBox->SetLabel(B_TRANSLATE("Unlock screen saver"));
 
        bounds.top += 10.0;
-       fPassword = new BTextControl(bounds, "password", "Enter password:",
-               "VeryLongPasswordPossible", B_FOLLOW_NONE);
+       fPassword = new BTextControl(bounds, "password",
+               B_TRANSLATE("Enter password:"), "VeryLongPasswordPossible",
+               B_FOLLOW_NONE);
        customBox->AddChild(fPassword);
        fPassword->MakeFocus(true);
        fPassword->ResizeToPreferred();
        fPassword->TextView()->HideTyping(true);
-       fPassword->SetDivider(be_plain_font->StringWidth("Enter password:") + 
5.0);
+       fPassword->SetDivider(be_plain_font->StringWidth(
+               B_TRANSLATE_NOCOLLECT("Enter password:")) + 5.0);
 
-       BButton* button = new BButton(BRect(), "unlock", "Unlock",
+       BButton* button = new BButton(BRect(), "unlock", B_TRANSLATE("Unlock"),
                new BMessage(kMsgUnlock), B_FOLLOW_NONE);
        customBox->AddChild(button);
        button->MakeDefault(true);


Other related posts:

  • » [haiku-commits] r41023 - haiku/trunk/src/bin/screen_blanker - jonas