[haiku-commits] r36712 - in haiku/branches/releases/r1alpha2: . src/add-ons/kernel/bus_managers/acpi src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath src/apps/terminal

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 7 May 2010 13:16:50 +0200 (CEST)

Author: bonefish
Date: 2010-05-07 13:16:50 +0200 (Fri, 07 May 2010)
New Revision: 36712
Changeset: http://dev.haiku-os.org/changeset/36712/haiku

Modified:
   haiku/branches/releases/r1alpha2/
   haiku/branches/releases/r1alpha2/src/add-ons/kernel/bus_managers/acpi/
   
haiku/branches/releases/r1alpha2/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/
   haiku/branches/releases/r1alpha2/src/apps/terminal/AppearPrefView.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/Arguments.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/FindWindow.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/Jamfile
   haiku/branches/releases/r1alpha2/src/apps/terminal/PrefHandler.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/PrefWindow.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/Shell.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/SmartTabView.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/TermApp.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/TermApp.h
   haiku/branches/releases/r1alpha2/src/apps/terminal/TermParse.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/TermView.cpp
   haiku/branches/releases/r1alpha2/src/apps/terminal/TermWindow.cpp
Log:
Backed out r36640 and r36641 (Terminal localization). Didn't want to merge
them in the first place.



Property changes on: haiku/branches/releases/r1alpha2
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/haiku/trunk:36349-36353,36355-36358,36360-36375,36379,36381-36386,36388-36392,36394-36421,36424-36443,36451-36452,36455-36464,36467-36470,36472-36477,36479-36498,36503-36504,36509,36511,36513,36516-36525,36527-36541,36543-36599,36601-36604,36607,36610-36634,36636-36641,36649,36651-36657,36670
   + 
/haiku/trunk:36349-36353,36355-36358,36360-36375,36379,36381-36386,36388-36392,36394-36421,36424-36443,36451-36452,36455-36464,36467-36470,36472-36477,36479-36498,36503-36504,36509,36511,36513,36516-36525,36527-36541,36543-36599,36601-36604,36607,36610-36634,36636-36639,36649,36651-36657,36670


Property changes on: 
haiku/branches/releases/r1alpha2/src/add-ons/kernel/bus_managers/acpi
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/haiku/trunk/src/add-ons/kernel/bus_managers/acpi:36349-36353,36355-36358,36360-36375,36379,36381-36386,36388-36392,36394-36421,36424-36443,36451-36452,36455-36464,36467-36470,36472-36477,36479-36498,36503-36504,36509,36511,36513,36516-36525,36527-36541,36543-36599,36601-36604,36607,36610-36634,36636-36641,36649,36651-36657,36670
/haiku/vendor/acpica/20100121:35554-35558
/haiku/vendor/acpica/current:33139-35553
   + 
/haiku/trunk/src/add-ons/kernel/bus_managers/acpi:36349-36353,36355-36358,36360-36375,36379,36381-36386,36388-36392,36394-36421,36424-36443,36451-36452,36455-36464,36467-36470,36472-36477,36479-36498,36503-36504,36509,36511,36513,36516-36525,36527-36541,36543-36599,36601-36604,36607,36610-36634,36636-36639,36649,36651-36657,36670
/haiku/vendor/acpica/20100121:35554-35558
/haiku/vendor/acpica/current:33139-35553


Property changes on: 
haiku/branches/releases/r1alpha2/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/haiku/trunk/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath:36349-36353,36355-36358,36360-36375,36379,36381-36386,36388-36392,36394-36421,36424-36443,36451-36452,36455-36464,36467-36470,36472-36477,36479-36498,36503-36504,36509,36511,36513,36516-36525,36527-36541,36543-36599,36601-36604,36607,36610-36634,36636-36641,36649,36651-36657,36670
/haiku/vendor/freebsd/HEAD/dev/ath/r204100:35677-35713
/haiku/vendor/freebsd/current/dev/ath:34314-35676
   + 
/haiku/trunk/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath:36349-36353,36355-36358,36360-36375,36379,36381-36386,36388-36392,36394-36421,36424-36443,36451-36452,36455-36464,36467-36470,36472-36477,36479-36498,36503-36504,36509,36511,36513,36516-36525,36527-36541,36543-36599,36601-36604,36607,36610-36634,36636-36639,36649,36651-36657,36670
/haiku/vendor/freebsd/HEAD/dev/ath/r204100:35677-35713
/haiku/vendor/freebsd/current/dev/ath:34314-35676

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/AppearPrefView.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/AppearPrefView.cpp       
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/AppearPrefView.cpp       
2010-05-07 11:16:50 UTC (rev 36712)
@@ -12,12 +12,10 @@
 #include <stdlib.h>
 
 #include <Button.h>
-#include <Catalog.h>
 #include <ColorControl.h>
 #include <GridLayoutBuilder.h>
 #include <GroupLayoutBuilder.h>
 #include <LayoutBuilder.h>
-#include <Locale.h>
 #include <Menu.h>
 #include <MenuField.h>
 #include <MenuItem.h>
@@ -28,9 +26,8 @@
 #include "PrefHandler.h"
 #include "TermConst.h"
 
-#undef TR_CONTEXT ""
-#define TR_CONTEXT "Terminal ApperPrefView"
 
+
 AppearancePrefView::AppearancePrefView(const char* name,
                const BMessenger& messenger)
        : BView(name, B_WILL_DRAW),
@@ -70,9 +67,9 @@
        BMenu* sizeMenu = _MakeSizeMenu(MSG_HALF_SIZE_CHANGED,
                PrefHandler::Default()->getInt32(PREF_HALF_FONT_SIZE));
        
-       fFont = new BMenuField(TR("Font:"), fontMenu);
-       fFontSize = new BMenuField(TR("Size:"), sizeMenu);
-       fColorField = new BMenuField(TR("Color:"),
+       fFont = new BMenuField("Font:", fontMenu);
+       fFontSize = new BMenuField("Size:", sizeMenu);
+       fColorField = new BMenuField("Color:",
                _MakeMenu(MSG_COLOR_FIELD_CHANGED, kColorTable,
                kColorTable[0]));
 

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/Arguments.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/Arguments.cpp    
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/Arguments.cpp    
2010-05-07 11:16:50 UTC (rev 36712)
@@ -3,21 +3,13 @@
  * Distributed under the terms of the MIT License.
  */
 
-
-#include "Arguments.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include <Catalog.h>
-#include <Locale.h>
+#include "Arguments.h"
 
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal arguments parsing"
-
-
 Arguments::Arguments(int defaultArgsNum, const char * const *defaultArgs)
        : fUsageRequested(false),
          fBounds(50, 50, 630, 435),
@@ -36,6 +28,7 @@
        _SetShellArguments(0, NULL);
 }
 
+
 void
 Arguments::Parse(int argc, const char *const *argv)
 {
@@ -82,7 +75,7 @@
                                argi++;                 
                        } else {
                                // illegal option
-                               fprintf(stderr, TR("Unrecognized option 
\"%s\"\n"), arg);
+                               fprintf(stderr, "Unrecognized option \"%s\"\n", 
arg);
                                fUsageRequested = true;
                        }
 

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/FindWindow.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/FindWindow.cpp   
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/FindWindow.cpp   
2010-05-07 11:16:50 UTC (rev 36712)
@@ -10,13 +10,11 @@
 
 #include <Box.h>
 #include <Button.h>
-#include <Catalog.h>
 #include <CheckBox.h>
 #include <ControlLook.h>
 #include <GridLayoutBuilder.h>
 #include <GroupLayout.h>
 #include <GroupLayoutBuilder.h>
-#include <Locale.h>
 #include <RadioButton.h>
 #include <String.h>
 #include <TextControl.h>
@@ -26,13 +24,11 @@
 const uint32 TOGGLE_FIND_CONTROL = 'MTFG';
 const BRect kWindowFrame(10, 30, 250, 200);
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal FindWindow"
 
 FindWindow::FindWindow(BMessenger messenger, const BString& str,
                bool findSelection, bool matchWord, bool matchCase, bool 
forwardSearch)
        :
-       BWindow(kWindowFrame, TR("Find"), B_FLOATING_WINDOW,
+       BWindow(kWindowFrame, "Find", B_FLOATING_WINDOW,
                B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_CLOSE_ON_ESCAPE
                | B_AUTO_UPDATE_SIZE_LIMITS),
        fFindDlgMessenger(messenger)
@@ -48,16 +44,16 @@
        BView* layoutView = BGroupLayoutBuilder(B_VERTICAL, 5.0)
                .SetInsets(spacing, spacing, spacing, spacing)
                .Add(BGridLayoutBuilder()
-                       .Add(fTextRadio = new BRadioButton(TR("Use text:"),
+                       .Add(fTextRadio = new BRadioButton("Use text:",
                                new BMessage(TOGGLE_FIND_CONTROL)), 0, 0)
                        .Add(fFindLabel = new BTextControl(NULL, NULL, NULL), 
1, 0)
-                       .Add(useSelection = new BRadioButton(TR("Use 
selection"),
+                       .Add(useSelection = new BRadioButton("Use selection",
                                new BMessage(TOGGLE_FIND_CONTROL)), 0, 1))
                .Add(separator)
-               .Add(fForwardSearchBox = new BCheckBox(TR("Search forward")))
-               .Add(fMatchCaseBox = new BCheckBox(TR("Match case")))
-               .Add(fMatchWordBox = new BCheckBox(TR("Match word")))
-               .Add(fFindButton = new BButton(TR("Find"), new 
BMessage(MSG_FIND)))
+               .Add(fForwardSearchBox = new BCheckBox("Search forward"))
+               .Add(fMatchCaseBox = new BCheckBox("Match case"))
+               .Add(fMatchWordBox = new BCheckBox("Match word"))
+               .Add(fFindButton = new BButton("Find", new BMessage(MSG_FIND)))
                .End();
        AddChild(layoutView);
 

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/Jamfile
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/Jamfile  2010-05-07 
09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/Jamfile  2010-05-07 
11:16:50 UTC (rev 36712)
@@ -26,23 +26,6 @@
        TermWindow.cpp
        VTKeyTbl.c
        VTPrsTbl.c
-       : be locale tracker textencoding $(TARGET_LIBSUPC++)
+       : be tracker textencoding $(TARGET_LIBSUPC++)
        : Terminal.rdef
 ;
-
-DoCatalogs Terminal :
-       x-vnd.Haiku-Terminal
-       :
-       AppearPrefView.cpp
-       Arguments.cpp
-       FindWindow.cpp
-       PrefHandler.cpp
-       PrefWindow.cpp
-       Shell.cpp
-       SmartTabView.cpp
-       TermApp.cpp
-       TermParse.cpp
-       TermView.cpp
-       TermWindow.cpp
-       : en.catalog
-       ;

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/PrefHandler.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/PrefHandler.cpp  
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/PrefHandler.cpp  
2010-05-07 11:16:50 UTC (rev 36712)
@@ -12,14 +12,12 @@
 #include "PrefHandler.h"
 #include "TermConst.h"
 
-#include <Catalog.h>
 #include <Directory.h>
 #include <Entry.h>
 #include <File.h>
 #include <FindDirectory.h>
 #include <Font.h>
 #include <GraphicsDefs.h>
-#include <Locale.h>
 #include <Message.h>
 #include <NodeInfo.h>
 #include <Path.h>
@@ -241,15 +239,13 @@
        return atof(value);
 }
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal getString"
 
 const char* 
 PrefHandler::getString(const char *key)
 {
        const char *buffer;
        if (fContainer.FindString(key, &buffer) != B_OK)
-               buffer = TR("Error!");
+               buffer = "Error!";
 
        //printf("%x GET %s: %s\n", this, key, buf);
        return buffer;
@@ -267,9 +263,6 @@
 }
 
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal getRGB"
-
 /** Returns RGB data from given key. */
 
 rgb_color
@@ -281,7 +274,7 @@
        if (const char *s = fContainer.FindString(key)) {
                sscanf(s, "%d, %d, %d", &r, &g, &b);
        } else {
-               fprintf(stderr, TR("PrefHandler::getRGB(%s) - key not 
found\n"), key);
+               fprintf(stderr, "PrefHandler::getRGB(%s) - key not found\n", 
key);
                r = g = b = 0;
        }
 

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/PrefWindow.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/PrefWindow.cpp   
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/PrefWindow.cpp   
2010-05-07 11:16:50 UTC (rev 36712)
@@ -14,20 +14,16 @@
 #include <Alert.h>
 #include <Box.h>
 #include <Button.h>
-#include <Catalog.h>
 #include <FilePanel.h>
 #include <GroupLayoutBuilder.h>
 #include <LayoutBuilder.h>
-#include <Locale.h>
 #include <Path.h>
 
 #include <stdio.h>
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal PrefWindow"
 
 PrefWindow::PrefWindow(const BMessenger &messenger)
-       : BWindow(BRect(0, 0, 375, 185), TR("Terminal settings"),
+       : BWindow(BRect(0, 0, 375, 185), "Terminal settings",
                B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
                B_NOT_RESIZABLE|B_NOT_ZOOMABLE|B_AUTO_UPDATE_SIZE_LIMITS),
        fPreviousPref(new PrefHandler(PrefHandler::Default())),
@@ -38,16 +34,16 @@
        BLayoutBuilder::Group<>(this, B_VERTICAL)
                .AddGroup(B_VERTICAL)
                .SetInsets(10, 10, 10, 10)
-                       .Add(new AppearancePrefView(TR("Appearance"), 
fTerminalMessenger))
+                       .Add(new AppearancePrefView("Appearance", 
fTerminalMessenger))
                        .AddGroup(B_HORIZONTAL)
                                .Add(fSaveAsFileButton = new 
BButton("savebutton",
-                                       TR("Save to file" B_UTF8_ELLIPSIS),
+                                       "Save to file" B_UTF8_ELLIPSIS,
                                        new BMessage(MSG_SAVEAS_PRESSED), 
B_WILL_DRAW))
                                .AddGlue()
                                .Add(fRevertButton = new BButton("revertbutton",
-                                       TR("Cancel"), new 
BMessage(MSG_REVERT_PRESSED),
+                                       "Cancel", new 
BMessage(MSG_REVERT_PRESSED),
                                        B_WILL_DRAW))
-                               .Add(fSaveButton = new BButton("okbutton", 
TR("OK"),
+                               .Add(fSaveButton = new BButton("okbutton", "OK",
                                        new BMessage(MSG_SAVE_PRESSED), 
B_WILL_DRAW))
                        .End()
                .End();
@@ -83,8 +79,8 @@
        if (!fDirty)
                return true;
 
-       BAlert *alert = new BAlert("", TR("Save changes to this settings 
panel?"),
-               TR("Cancel"), TR("Don't save"), TR("Save"),
+       BAlert *alert = new BAlert("", "Save changes to this settings panel?",
+               "Cancel", "Don't save", "Save",
                B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
                B_WARNING_ALERT); 
        alert->SetShortcut(0, B_ESCAPE); 

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/Shell.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/Shell.cpp        
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/Shell.cpp        
2010-05-07 11:16:50 UTC (rev 36712)
@@ -27,9 +27,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#include <Catalog.h>
 #include <OS.h>
-#include <Locale.h>
 
 #include "TermConst.h"
 #include "TermParse.h"
@@ -318,8 +316,6 @@
        tio.c_cc[VSUSP]  = CSUSP;               /* '^Z' */
 }
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal Shell"
 
 status_t
 Shell::_Spawn(int row, int col, const char *encoding, int argc, const char 
**argv)
@@ -364,7 +360,7 @@
                        } else {
                                // B_BUSY is a normal case
                                if (errno != B_BUSY)
-                                       fprintf(stderr, TR("could not open %s: 
%s\n"), ptyName, strerror(errno));
+                                       fprintf(stderr, "could not open %s: 
%s\n", ptyName, strerror(errno));
                        }
                }
                closedir(dir);
@@ -372,7 +368,7 @@
 #endif /* __HAIKU__ */
 
        if (master < 0) {
-       fprintf(stderr, TR("Didn't find any available pseudo ttys."));
+       fprintf(stderr, "Didn't find any available pseudo ttys.");
        return errno;
        }
 
@@ -380,7 +376,7 @@
        if (grantpt(master) != 0 || unlockpt(master) != 0
                || (ttyName = ptsname(master)) == NULL) {
                close(master);
-       fprintf(stderr, TR("Failed to init pseudo tty."));
+       fprintf(stderr, "Failed to init pseudo tty.");
                return errno;
        }
 #endif /* __HAIKU__ */
@@ -415,7 +411,7 @@
                if (setsid() < 0) {
                        handshake.status = PTY_NG;
                        snprintf(handshake.msg, sizeof(handshake.msg),
-                               TR("could not set session leader."));
+                               "could not set session leader.");
                        send_handshake_message(terminalThread, handshake);
                        exit(1);
                }
@@ -425,7 +421,7 @@
                if ((slave = open(ttyName, O_RDWR)) < 0) {
                        handshake.status = PTY_NG;
                        snprintf(handshake.msg, sizeof(handshake.msg),
-                               TR("can't open tty (%s)."), ttyName);
+                               "can't open tty (%s).", ttyName);
                        send_handshake_message(terminalThread, handshake);
                        exit(1);
                }
@@ -464,7 +460,7 @@
                if (tcsetattr(0, TCSANOW, &tio) == -1) {
                        handshake.status = PTY_NG;
                        snprintf(handshake.msg, sizeof(handshake.msg),
-                               TR("failed set terminal interface (TERMIOS)."));
+                               "failed set terminal interface (TERMIOS).");
                        send_handshake_message(terminalThread, handshake);
                        exit(1);
                }
@@ -480,7 +476,7 @@
                if (handshake.status != PTY_WS) {
                        handshake.status = PTY_NG;
                        snprintf(handshake.msg, sizeof(handshake.msg),
-                               TR("mismatch handshake."));
+                               "mismatch handshake.");
                        send_handshake_message(terminalThread, handshake);
                        exit(1);
                }
@@ -516,10 +512,10 @@
                 */
 
                sleep(1);
-               BString knonLocalizedPart = "alert --stop ";
-               const char *kLocalizedPart = 
-                       TR("'Cannot execute \"%s\":\n\t%s' 'Use default shell' 
'Abort'");
-               const char *spawnAlertMessage = knonLocalizedPart << 
kLocalizedPart;
+               const char *spawnAlertMessage = "alert --stop "
+                                               "'Cannot execute \"%s\":\n"
+                                               "\t%s' "
+                                               "'Use default shell' 'Abort'";
                char errorMessage[256];
                snprintf(errorMessage, sizeof(errorMessage), spawnAlertMessage, 
argv[0], strerror(errno));
 

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/SmartTabView.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/SmartTabView.cpp 
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/SmartTabView.cpp 
2010-05-07 11:16:50 UTC (rev 36712)
@@ -16,8 +16,6 @@
 
 #include "SmartTabView.h"
 
-#include <Catalog.h>
-#include <Locale.h>
 #include <MenuItem.h>
 #include <Message.h>
 #include <Messenger.h>
@@ -62,8 +60,6 @@
        fInsets.bottom = bottom;
 }
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal SmartTabView"
 
 void
 SmartTabView::MouseDown(BPoint point)
@@ -80,7 +76,7 @@
                                message->AddInt32("index", tabIndex);
 
                                BPopUpMenu* popUpMenu = new BPopUpMenu("tab 
menu");
-                               popUpMenu->AddItem(new BMenuItem(TR("Close 
tab"), message));
+                               popUpMenu->AddItem(new BMenuItem("Close tab", 
message));
                                popUpMenu->SetAsyncAutoDestruct(true);
                                popUpMenu->SetTargetForItems(BMessenger(this));
                                popUpMenu->Go(ConvertToScreen(point), true, 
true, true);

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/TermApp.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/TermApp.cpp      
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/TermApp.cpp      
2010-05-07 11:16:50 UTC (rev 36712)
@@ -17,10 +17,7 @@
 #include <unistd.h>
 
 #include <Alert.h>
-#include <Catalog.h>
 #include <Clipboard.h>
-#include <Catalog.h>
-#include <Locale.h>
 #include <NodeInfo.h>
 #include <Path.h>
 #include <Roster.h>
@@ -53,16 +50,13 @@
        return 0;
 }
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal TermApp"
-
+       
 TermApp::TermApp()
        : BApplication(TERM_SIGNATURE),
        fStartFullscreen(false),
        fWindowNumber(-1),
        fTermWindow(NULL),
-       fArgs(NULL),
-       fAppCatalog(NULL)
+       fArgs(NULL)
 {
        const char *defaultArgs[2];
        defaultArgs[0] = kDefaultShell;
@@ -76,11 +70,9 @@
                defaultArgs[0] = passwdStruct.pw_shell;
        }
        
-       be_locale->GetAppCatalog(&fAppCatalog);
-       
        fArgs = new Arguments(2, defaultArgs);
        
-       fWindowTitle = TR("Terminal");
+       fWindowTitle = "Terminal";
        _RegisterTerminal();
 
        if (fWindowNumber > 0)
@@ -122,7 +114,7 @@
 #endif
        action.sa_userdata = this;
        if (sigaction(SIGCHLD, &action, NULL) < 0) {
-               fprintf(stderr, TR("sigaction() failed: %s\n"), 
strerror(errno));
+               fprintf(stderr, "sigaction() failed: %s\n", strerror(errno));
                // continue anyway
        }
 
@@ -134,8 +126,8 @@
        // failed spawn, print stdout and open alert panel
        // TODO: This alert does never show up.
        if (status < B_OK) {
-               (new BAlert("alert", TR("Terminal couldn't start the shell. 
Sorry."),
-                       TR("OK"), NULL, NULL, B_WIDTH_FROM_LABEL,
+               (new BAlert("alert", "Terminal couldn't start the shell. 
Sorry.",
+                       "OK", NULL, NULL, B_WIDTH_FROM_LABEL,
                        B_INFO_ALERT))->Go(NULL);
                PostMessage(B_QUIT_REQUESTED);
                return;
@@ -562,17 +554,17 @@
 void
 TermApp::_Usage(char *name)
 {
-       fprintf(stderr, TR("Haiku Terminal\n"
+       fprintf(stderr, "Haiku Terminal\n"
                "Copyright 2001-2009 Haiku, Inc.\n"
                "Copyright(C) 1999 Kazuho Okui and Takashi Murai.\n"
                "\n"
-               "Usage: %s [OPTION] [SHELL]\n"), name);
+               "Usage: %s [OPTION] [SHELL]\n", name);
 
        fprintf(stderr,
-               TR("  -h,     --help               print this help\n"    
+               "  -h,     --help               print this help\n"    
                //"  -p,     --preference         load preference file\n"
                "  -t,     --title              set window title\n"
-               "  -f,     --fullscreen         start fullscreen\n")            
+               "  -f,     --fullscreen         start fullscreen\n"             
                //"  -geom,  --geometry           set window geometry\n"
                //"                               An example of geometry is 
\"80x25+100+100\"\n"
                );

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/TermApp.h
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/TermApp.h        
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/TermApp.h        
2010-05-07 11:16:50 UTC (rev 36712)
@@ -33,7 +33,6 @@
 
 
 #include <Application.h>
-#include <Catalog.h>
 #include <String.h>
 
 class Arguments;
@@ -77,7 +76,6 @@
                BWindow*        fTermWindow;
                BRect           fTermFrame;
                Arguments       *fArgs;
-               BCatalog        fAppCatalog;
 };
 
 #endif // TERM_APP_H

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/TermParse.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/TermParse.cpp    
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/TermParse.cpp    
2010-05-07 11:16:50 UTC (rev 36712)
@@ -18,8 +18,6 @@
 
 #include <Autolock.h>
 #include <Beep.h>
-#include <Catalog.h>
-#include <Locale.h>
 #include <Message.h>
 #include <UTF8.h>
 
@@ -47,8 +45,6 @@
 #define DEFAULT -1
 #define NPARAM 10              // Max parameters
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal TermParse"
 
 //! Get char from pty reader buffer.
 inline uchar
@@ -291,17 +287,17 @@
        { NULL, NULL }
        };
        int i;
-       fprintf(stderr, TR("groundtable: "));
+       fprintf(stderr, "groundtable: ");
        for (i = 0; tables[i].p; i++) {
                if (tables[i].p == groundtable)
                        fprintf(stderr, "%s\t", tables[i].name);
        }
-       fprintf(stderr, TR("parsestate: "));
+       fprintf(stderr, "parsestate: ");
        for (i = 0; tables[i].p; i++) {
                if (tables[i].p == parsestate)
                        fprintf(stderr, "%s\t", tables[i].name);
        }
-       fprintf(stderr, TR("char: 0x%02x (%d)\n"), c, c);
+       fprintf(stderr, "char: 0x%02x (%d)\n", c, c);
 }
 
 

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/TermView.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/TermView.cpp     
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/TermView.cpp     
2010-05-07 11:16:50 UTC (rev 36712)
@@ -27,13 +27,11 @@
 #include <Alert.h>
 #include <Application.h>
 #include <Beep.h>
-#include <Catalog.h>
 #include <Clipboard.h>
 #include <Debug.h>
 #include <Directory.h>
 #include <Dragger.h>
 #include <Input.h>
-#include <Locale.h>
 #include <MenuItem.h>
 #include <Message.h>
 #include <MessageRunner.h>
@@ -83,8 +81,6 @@
        SELECT_LINES
 };
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal TermView"
 
 static property_info sPropList[] = {
        { "encoding",
@@ -1431,7 +1427,7 @@
        bool hasResizeView = fResizeRunner != NULL;
        if (!hasResizeView) {
                // show the current size in a view
-               fResizeView = new BStringView(BRect(100, 100, 300, 140), 
TR("size"), "");
+               fResizeView = new BStringView(BRect(100, 100, 300, 140), 
"size", "");
                fResizeView->SetAlignment(B_ALIGN_CENTER);
                fResizeView->SetFont(be_bold_font);
 
@@ -1825,12 +1821,12 @@
        cpMessage->what = kSecondaryMouseDropAction;
        cpMessage->AddInt8("action", kCopyFiles);
 
-       BMenuItem* insertItem = new BMenuItem(TR("Insert path"), insertMessage);
-       BMenuItem* cdItem = new BMenuItem(TR("Change directory"), cdMessage);
-       BMenuItem* lnItem = new BMenuItem(TR("Create link here"), lnMessage);
-       BMenuItem* mvItem = new BMenuItem(TR("Move here"), mvMessage);
-       BMenuItem* cpItem = new BMenuItem(TR("Copy here"), cpMessage);
-       BMenuItem* chItem = new BMenuItem(TR("Cancel"), NULL);
+       BMenuItem* insertItem = new BMenuItem("Insert path", insertMessage);
+       BMenuItem* cdItem = new BMenuItem("Change directory", cdMessage);
+       BMenuItem* lnItem = new BMenuItem("Create link here", lnMessage);
+       BMenuItem* mvItem = new BMenuItem("Move here", mvMessage);
+       BMenuItem* cpItem = new BMenuItem("Copy here", cpMessage);
+       BMenuItem* chItem = new BMenuItem("Cancel", NULL);
 
        // if the refs point to different directorys disable the cd menu item
        bool differentDirs = false;
@@ -1858,7 +1854,7 @@
        if (differentDirs)
                cdItem->SetEnabled(false);
 
-       BPopUpMenu *menu = new BPopUpMenu(TR("Secondary mouse button drop 
menu"));
+       BPopUpMenu *menu = new BPopUpMenu("Secondary Mouse Button Drop Menu");
        menu->SetAsyncAutoDestruct(true);
        menu->AddItem(insertItem);
        menu->AddSeparatorItem();
@@ -2768,10 +2764,10 @@
 TermView::AboutRequested()
 {
        BAlert *alert = new (std::nothrow) BAlert("about",
-               TR("Terminal\n\n"
+               "Terminal\n\n"
                "written by Kazuho Okui and Takashi Murai\n"
                "updated by Kian Duffy and others\n\n"
-               "Copyright " B_UTF8_COPYRIGHT "2003-2009, Haiku.\n"), TR("OK"));
+               "Copyright " B_UTF8_COPYRIGHT "2003-2009, Haiku.\n", "OK");
        if (alert != NULL)
                alert->Go();
 }

Modified: haiku/branches/releases/r1alpha2/src/apps/terminal/TermWindow.cpp
===================================================================
--- haiku/branches/releases/r1alpha2/src/apps/terminal/TermWindow.cpp   
2010-05-07 09:25:53 UTC (rev 36711)
+++ haiku/branches/releases/r1alpha2/src/apps/terminal/TermWindow.cpp   
2010-05-07 11:16:50 UTC (rev 36712)
@@ -16,10 +16,8 @@
 
 #include <Alert.h>
 #include <Application.h>
-#include <Catalog.h>
 #include <Clipboard.h>
 #include <Dragger.h>
-#include <Locale.h>
 #include <Menu.h>
 #include <MenuBar.h>
 #include <MenuItem.h>
@@ -54,8 +52,6 @@
 const static uint32 kDecreaseFontSize = 'DcFs';
 const static uint32 kSetActiveTab = 'STab';
 
-#undef TR_CONTEXT
-#define TR_CONTEXT "Terminal TermWindow"
 
 class CustomTermView : public TermView {
 public:
@@ -257,7 +253,7 @@
 BMenu *
 TermWindow::_MakeEncodingMenu()
 {
-       BMenu *menu = new (std::nothrow) BMenu(TR("Text encoding"));
+       BMenu *menu = new (std::nothrow) BMenu("Text encoding");
        if (menu == NULL)
                return NULL;
 
@@ -286,44 +282,44 @@
        fMenubar = new BMenuBar(Bounds(), "mbar");
 
        // Make File Menu.
-       fFilemenu = new BMenu(TR("Terminal"));
-       fFilemenu->AddItem(new BMenuItem(TR("Switch Terminals"),
+       fFilemenu = new BMenu("Terminal");
+       fFilemenu->AddItem(new BMenuItem("Switch Terminals",
                new BMessage(MENU_SWITCH_TERM), B_TAB));
-       fFilemenu->AddItem(new BMenuItem(TR("New Terminal"),
+       fFilemenu->AddItem(new BMenuItem("New Terminal",
                new BMessage(MENU_NEW_TERM), 'N'));
-       fFilemenu->AddItem(new BMenuItem(TR("New tab"), new BMessage(kNewTab), 
'T'));
+       fFilemenu->AddItem(new BMenuItem("New tab", new BMessage(kNewTab), 
'T'));
 
        fFilemenu->AddSeparatorItem();
-       fFilemenu->AddItem(new BMenuItem(TR("Page setup" B_UTF8_ELLIPSIS),
+       fFilemenu->AddItem(new BMenuItem("Page setup" B_UTF8_ELLIPSIS,
                new BMessage(MENU_PAGE_SETUP)));
-       fFilemenu->AddItem(new BMenuItem(TR("Print"), new 
BMessage(MENU_PRINT),'P'));
+       fFilemenu->AddItem(new BMenuItem("Print", new 
BMessage(MENU_PRINT),'P'));
        fFilemenu->AddSeparatorItem();
-       fFilemenu->AddItem(new BMenuItem(TR("About Terminal" B_UTF8_ELLIPSIS),
+       fFilemenu->AddItem(new BMenuItem("About Terminal" B_UTF8_ELLIPSIS,
                new BMessage(B_ABOUT_REQUESTED)));
        fFilemenu->AddSeparatorItem();
-       fFilemenu->AddItem(new BMenuItem(TR("Close active tab"),
+       fFilemenu->AddItem(new BMenuItem("Close active tab",
                new BMessage(kCloseView), 'W', B_SHIFT_KEY));
-       fFilemenu->AddItem(new BMenuItem(TR("Quit"),
+       fFilemenu->AddItem(new BMenuItem("Quit",
                new BMessage(B_QUIT_REQUESTED), 'Q'));
        fMenubar->AddItem(fFilemenu);
 
        // Make Edit Menu.
        fEditmenu = new BMenu("Edit");
-       fEditmenu->AddItem(new BMenuItem(TR("Copy"), new BMessage(B_COPY),'C'));
-       fEditmenu->AddItem(new BMenuItem(TR("Paste"), new 
BMessage(B_PASTE),'V'));
+       fEditmenu->AddItem(new BMenuItem("Copy", new BMessage(B_COPY),'C'));
+       fEditmenu->AddItem(new BMenuItem("Paste", new BMessage(B_PASTE),'V'));
        fEditmenu->AddSeparatorItem();
-       fEditmenu->AddItem(new BMenuItem(TR("Select all"),
+       fEditmenu->AddItem(new BMenuItem("Select all",
                new BMessage(B_SELECT_ALL), 'A'));
-       fEditmenu->AddItem(new BMenuItem(TR("Clear all"),
+       fEditmenu->AddItem(new BMenuItem("Clear all",
                new BMessage(MENU_CLEAR_ALL), 'L'));
        fEditmenu->AddSeparatorItem();
-       fEditmenu->AddItem(new BMenuItem(TR("Find" B_UTF8_ELLIPSIS),
+       fEditmenu->AddItem(new BMenuItem("Find" B_UTF8_ELLIPSIS,
                new BMessage(MENU_FIND_STRING),'F'));
-       fFindPreviousMenuItem = new BMenuItem(TR("Find previous"),
+       fFindPreviousMenuItem = new BMenuItem("Find previous",
                new BMessage(MENU_FIND_PREVIOUS), 'G', B_SHIFT_KEY);
        fEditmenu->AddItem(fFindPreviousMenuItem);
        fFindPreviousMenuItem->SetEnabled(false);
-       fFindNextMenuItem = new BMenuItem(TR("Find next"),
+       fFindNextMenuItem = new BMenuItem("Find next",
                new BMessage(MENU_FIND_NEXT), 'G');
        fEditmenu->AddItem(fFindNextMenuItem);
        fFindNextMenuItem->SetEnabled(false);
@@ -331,17 +327,17 @@
        fMenubar->AddItem(fEditmenu);
 
        // Make Help Menu.
-       fHelpmenu = new BMenu(TR("Settings"));
+       fHelpmenu = new BMenu("Settings");
        fWindowSizeMenu = _MakeWindowSizeMenu();
 
        fEncodingmenu = _MakeEncodingMenu();
 
-       fSizeMenu = new BMenu(TR("Text size"));
+       fSizeMenu = new BMenu("Text size");
 
-       fIncreaseFontSizeMenuItem = new BMenuItem(TR("Increase"),
+       fIncreaseFontSizeMenuItem = new BMenuItem("Increase",
                new BMessage(kIncreaseFontSize), '+', B_COMMAND_KEY);
 
-       fDecreaseFontSizeMenuItem = new BMenuItem(TR("Decrease"),
+       fDecreaseFontSizeMenuItem = new BMenuItem("Decrease",
                new BMessage(kDecreaseFontSize), '-', B_COMMAND_KEY);
 
        fSizeMenu->AddItem(fIncreaseFontSizeMenuItem);
@@ -351,10 +347,10 @@
        fHelpmenu->AddItem(fEncodingmenu);
        fHelpmenu->AddItem(fSizeMenu);
        fHelpmenu->AddSeparatorItem();
-       fHelpmenu->AddItem(new BMenuItem(TR("Settings" B_UTF8_ELLIPSIS),
+       fHelpmenu->AddItem(new BMenuItem("Settings" B_UTF8_ELLIPSIS,
                new BMessage(MENU_PREF_OPEN)));
        fHelpmenu->AddSeparatorItem();
-       fHelpmenu->AddItem(new BMenuItem(TR("Save as default"),
+       fHelpmenu->AddItem(new BMenuItem("Save as default",
                new BMessage(SAVE_AS_DEFAULT)));
        fMenubar->AddItem(fHelpmenu);
 
@@ -455,8 +451,8 @@
 
                        if (fFindString.Length() == 0) {
                                const char* errorMsg = !fFindSelection
-                                       ? TR("No search string was entered.") : 
TR("Nothing is selected.");
-                               BAlert* alert = new BAlert(TR("Find failed"), 
errorMsg, TR("OK"), NULL,
+                                       ? "No search string was entered." : 
"Nothing is selected.";
+                               BAlert* alert = new BAlert("Find failed", 
errorMsg, "OK", NULL,
                                        NULL, B_WIDTH_AS_USUAL, 
B_WARNING_ALERT);
 
                                alert->Go();
@@ -471,7 +467,7 @@
                        findresult = _ActiveTermView()->Find(fFindString, 
fForwardSearch, fMatchCase, fMatchWord);
 
                        if (!findresult) {
-                               BAlert *alert = new BAlert(TR("Find failed"), 
TR("Text not found."), TR("OK"), NULL,
+                               BAlert *alert = new BAlert("Find failed", "Text 
not found.", "OK", NULL,
                                        NULL, B_WIDTH_AS_USUAL, 
B_WARNING_ALERT);
                                alert->SetShortcut(0, B_ESCAPE);
                                alert->Go();
@@ -492,7 +488,7 @@
                                (message->what == MENU_FIND_NEXT) == 
fForwardSearch,
                                fMatchCase, fMatchWord);
                        if (!findresult) {
-                               BAlert *alert = new BAlert(TR("Find failed"), 
TR("Not found."), TR("OK"),
+                               BAlert *alert = new BAlert("Find failed", "Not 
found.", "OK",
                                        NULL, NULL, B_WIDTH_AS_USUAL, 
B_WARNING_ALERT);
                                alert->SetShortcut(0, B_ESCAPE);
                                alert->Go();
@@ -723,7 +719,7 @@
 TermWindow::_DoPrint()
 {
        if (!fPrintSettings || (_DoPageSetup() != B_OK)) {
-               (new BAlert(TR("Cancel"), TR("Print cancelled."), 
TR("OK")))->Go();
+               (new BAlert("Cancel", "Print cancelled.", "OK"))->Go();
                return;
        }
 
@@ -982,7 +978,7 @@
 BMenu*
 TermWindow::_MakeWindowSizeMenu()
 {
-       BMenu *menu = new (std::nothrow) BMenu(TR("Window size"));
+       BMenu *menu = new (std::nothrow) BMenu("Window size");
        if (menu == NULL)
                return NULL;
 
@@ -1006,7 +1002,7 @@
        }
 
        menu->AddSeparatorItem();
-       menu->AddItem(new BMenuItem(TR("Full screen"), new BMessage(FULLSCREEN),
+       menu->AddItem(new BMenuItem("Full screen", new BMessage(FULLSCREEN),
                B_ENTER));
 
        return menu;


Other related posts:

  • » [haiku-commits] r36712 - in haiku/branches/releases/r1alpha2: . src/add-ons/kernel/bus_managers/acpi src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath src/apps/terminal - ingo_weinhold