Ticket #7005: NotificationsLocalization.patch

File NotificationsLocalization.patch, 20.1 KB (added by Karvjorm, 13 years ago)

An updated NotificationsLocalization patch

  • src/preferences/notifications/DisplayView.cpp

     
    1111#include <stdlib.h>
    1212
    1313#include <Alert.h>
     14#include <Catalog.h>
    1415#include <Directory.h>
    1516#include <Message.h>
    1617#include <FindDirectory.h>
     
    2930#include "DisplayView.h"
    3031#include "SettingsHost.h"
    3132
    32 #define _T(str) (str)
     33#undef B_TRANSLATE_CONTEXT
     34#define B_TRANSLATE_CONTEXT "DisplayView"
    3335
    34 
    3536DisplayView::DisplayView(SettingsHost* host)
    3637    :
    3738    SettingsPane("display", host)
    3839{
    3940    // Window width
    40     fWindowWidth = new BTextControl(_T("Window width:"), NULL,
     41    fWindowWidth = new BTextControl(B_TRANSLATE("Window width:"), NULL,
    4142        new BMessage(kSettingChanged));
    4243
    4344    // Icon size
    4445    fIconSize = new BMenu("iconSize");
    45     fIconSize->AddItem(new BMenuItem(_T("Mini icon"),
     46    fIconSize->AddItem(new BMenuItem(B_TRANSLATE("Mini icon"),
    4647        new BMessage(kSettingChanged)));
    47     fIconSize->AddItem(new BMenuItem(_T("Large icon"),
     48    fIconSize->AddItem(new BMenuItem(B_TRANSLATE("Large icon"),
    4849        new BMessage(kSettingChanged)));
    4950    fIconSize->SetLabelFromMarked(true);
    50     fIconSizeField = new BMenuField(_T("Icon size:"), fIconSize);
     51    fIconSizeField = new BMenuField(B_TRANSLATE("Icon size:"), fIconSize);
    5152
    5253    // Title position
    5354    fTitlePosition = new BMenu("titlePosition");
    54     fTitlePosition->AddItem(new BMenuItem(_T("Above icon"),
     55    fTitlePosition->AddItem(new BMenuItem(B_TRANSLATE("Above icon"),
    5556        new BMessage(kSettingChanged)));
    56     fTitlePosition->AddItem(new BMenuItem(_T("Right of icon"),
     57    fTitlePosition->AddItem(new BMenuItem(B_TRANSLATE("Right of icon"),
    5758        new BMessage(kSettingChanged)));
    5859    fTitlePosition->SetLabelFromMarked(true);
    59     fTitlePositionField = new BMenuField(_T("Title position:"), fTitlePosition);
     60    fTitlePositionField = new BMenuField(B_TRANSLATE("Title position:"),
     61        fTitlePosition);
    6062
    6163    // Load settings
    6264    Load();
     
    111113
    112114    if (create_directory(path.Path(), 0755) != B_OK) {
    113115        BAlert* alert = new BAlert("",
    114             _T("There was a problem saving the preferences.\n"
     116            B_TRANSLATE("There was a problem saving the preferences.\n"
    115117                "It's possible you don't have write access to the "
    116                 "settings directory."), "OK", NULL, NULL,
     118                "settings directory."), B_TRANSLATE("OK"), NULL, NULL,
    117119            B_WIDTH_AS_USUAL, B_STOP_ALERT);
    118120        (void)alert->Go();
    119121    }
     
    205207    status_t ret = settings.Flatten(&file);
    206208    if (ret != B_OK) {
    207209        BAlert* alert = new BAlert("",
    208             _T("Can't save preferenes, you probably don't have write "
    209                 "access to the settings directory or the disk is full."), "OK", NULL, NULL,
     210            B_TRANSLATE("Can't save preferenes, you probably don't have write "
     211                "access to the settings directory or the disk is full."),
     212                B_TRANSLATE("OK"), NULL, NULL,
    210213                B_WIDTH_AS_USUAL, B_STOP_ALERT);
    211214        (void)alert->Go();
    212215        return ret;
  • src/preferences/notifications/NotificationsView.cpp

     
    88 */
    99
    1010#include <Alert.h>
     11#include <Catalog.h>
     12#include <CheckBox.h>
     13#include <ColumnListView.h>
     14#include <ColumnTypes.h>
    1115#include <Directory.h>
    1216#include <FindDirectory.h>
    1317#include <GroupLayout.h>
    1418#include <GroupLayoutBuilder.h>
    15 #include <Window.h>
    16 #include <CheckBox.h>
    17 #include <TextControl.h>
    18 #include <Path.h>
    1919#include <Notification.h>
    2020#include <notification/Notifications.h>
    2121#include <notification/NotificationReceived.h>
     22#include <Path.h>
     23#include <TextControl.h>
     24#include <Window.h>
    2225
    23 #include <ColumnListView.h>
    24 #include <ColumnTypes.h>
    25 
    2626#include "NotificationsView.h"
    2727
    28 #define _T(str) (str)
     28#undef B_TRANSLATE_CONTEXT
     29#define B_TRANSLATE_CONTEXT "NotificationsView"
    2930
    3031const float kEdgePadding = 5.0;
    3132const float kCLVTitlePadding = 8.0;
     
    5556    BRect rect(0, 0, 100, 100);
    5657
    5758    // Search application field
    58     fSearch = new BTextControl(_T("Search:"), NULL,
     59    fSearch = new BTextControl(B_TRANSLATE("Search:"), NULL,
    5960        new BMessage(kSettingChanged));
    6061
    6162    // Applications list
    62     fApplications = new BColumnListView(rect, _T("Applications"),
     63    fApplications = new BColumnListView(rect, B_TRANSLATE("Applications"),
    6364        0, B_WILL_DRAW, B_FANCY_BORDER, true);
    6465    fApplications->SetSelectionMode(B_SINGLE_SELECTION_LIST);
    6566
    66     fAppCol = new BStringColumn(_T("Application"), 200,
    67         be_plain_font->StringWidth(_T("Application")) + (kCLVTitlePadding * 2),
    68         rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
     67    fAppCol = new BStringColumn(B_TRANSLATE("Application"), 200,
     68        be_plain_font->StringWidth(B_TRANSLATE("Application")) +
     69        (kCLVTitlePadding * 2), rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
    6970    fApplications->AddColumn(fAppCol, kAppIndex);
    7071
    71     fAppEnabledCol = new BStringColumn(_T("Enabled"), 10,
    72         be_plain_font->StringWidth(_T("Enabled")) + (kCLVTitlePadding * 2),
    73         rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
     72    fAppEnabledCol = new BStringColumn(B_TRANSLATE("Enabled"), 10,
     73        be_plain_font->StringWidth(B_TRANSLATE("Enabled")) +
     74        (kCLVTitlePadding * 2), rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
    7475    fApplications->AddColumn(fAppEnabledCol, kAppEnabledIndex);
    7576
    7677    // Notifications list
    77     fNotifications = new BColumnListView(rect, _T("Notifications"),
     78    fNotifications = new BColumnListView(rect, B_TRANSLATE("Notifications"),
    7879        0, B_WILL_DRAW, B_FANCY_BORDER, true);
    7980    fNotifications->SetSelectionMode(B_SINGLE_SELECTION_LIST);
    8081
    81     fTitleCol = new BStringColumn(_T("Title"), 100,
    82         be_plain_font->StringWidth(_T("Title")) + (kCLVTitlePadding * 2),
    83         rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
     82    fTitleCol = new BStringColumn(B_TRANSLATE("Title"), 100,
     83        be_plain_font->StringWidth(B_TRANSLATE("Title")) +
     84        (kCLVTitlePadding * 2), rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
    8485    fNotifications->AddColumn(fTitleCol, kTitleIndex);
    8586
    86     fDateCol = new BDateColumn(_T("Last Received"), 100,
    87         be_plain_font->StringWidth(_T("Last Received")) + (kCLVTitlePadding * 2),
    88         rect.Width(), B_ALIGN_LEFT);
     87    fDateCol = new BDateColumn(B_TRANSLATE("Last Received"), 100,
     88        be_plain_font->StringWidth(B_TRANSLATE("Last Received")) +
     89        (kCLVTitlePadding * 2), rect.Width(), B_ALIGN_LEFT);
    8990    fNotifications->AddColumn(fDateCol, kDateIndex);
    9091
    91     fTypeCol = new BStringColumn(_T("Type"), 100,
    92         be_plain_font->StringWidth(_T("Type")) + (kCLVTitlePadding * 2),
    93         rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
     92    fTypeCol = new BStringColumn(B_TRANSLATE("Type"), 100,
     93        be_plain_font->StringWidth(B_TRANSLATE("Type")) +
     94        (kCLVTitlePadding * 2), rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
    9495    fNotifications->AddColumn(fTypeCol, kTypeIndex);
    9596
    96     fAllowCol = new BStringColumn(_T("Allowed"), 100,
    97         be_plain_font->StringWidth(_T("Allowed")) + (kCLVTitlePadding * 2),
    98         rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
     97    fAllowCol = new BStringColumn(B_TRANSLATE("Allowed"), 100,
     98        be_plain_font->StringWidth(B_TRANSLATE("Allowed")) +
     99        (kCLVTitlePadding * 2), rect.Width(), B_TRUNCATE_END, B_ALIGN_LEFT);
    99100    fNotifications->AddColumn(fAllowCol, kAllowIndex);
    100101
    101102    // Load the applications list
     
    177178
    178179    if (create_directory(path.Path(), 0755) != B_OK) {
    179180        BAlert* alert = new BAlert("",
    180             _T("There was a problem saving the preferences.\n"
     181            B_TRANSLATE("There was a problem saving the preferences.\n"
    181182                "It's possible you don't have write access to the "
    182                 "settings directory."), "OK", NULL, NULL,
     183                "settings directory."), B_TRANSLATE("OK"), NULL, NULL,
    183184            B_WIDTH_AS_USUAL, B_STOP_ALERT);
    184185        (void)alert->Go();
    185186        return B_ERROR;
     
    247248    for (int32 i = 0; i < size; i++) {
    248249        NotificationReceived* notification = usage->NotificationAt(i);
    249250        time_t updated = notification->LastReceived();
    250         const char* allow = notification->Allowed() ? _T("Yes") : _T("No");
     251        const char* allow = notification->Allowed() ? B_TRANSLATE("Yes") :
     252            B_TRANSLATE("No");
    251253        const char* type = "";
    252254
    253255        switch (notification->Type()) {
    254256            case B_INFORMATION_NOTIFICATION:
    255                 type = _T("Information");
     257                type = B_TRANSLATE("Information");
    256258                break;
    257259            case B_IMPORTANT_NOTIFICATION:
    258                 type = _T("Important");
     260                type = B_TRANSLATE("Important");
    259261                break;
    260262            case B_ERROR_NOTIFICATION:
    261                 type = _T("Error");
     263                type = B_TRANSLATE("Error");
    262264                break;
    263265            case B_PROGRESS_NOTIFICATION:
    264                 type = _T("Progress");
     266                type = B_TRANSLATE("Progress");
    265267                break;
    266268            default:
    267                 type = _T("Unknown");
     269                type = B_TRANSLATE("Unknown");
    268270        }
    269271
    270272        BRow* row = new BRow();
  • src/preferences/notifications/GeneralView.cpp

     
    1212
    1313#include <vector>
    1414
    15 #include <Roster.h>
    16 #include <GroupLayout.h>
    17 #include <GroupLayoutBuilder.h>
    1815#include <Alert.h>
    19 #include <Font.h>
    2016#include <Button.h>
    21 #include <StringView.h>
    22 #include <TextControl.h>
     17#include <Catalog.h>
    2318#include <CheckBox.h>
    24 #include <String.h>
     19#include <Directory.h>
     20#include <File.h>
    2521#include <FindDirectory.h>
     22#include <Font.h>
     23#include <GroupLayout.h>
     24#include <GroupLayoutBuilder.h>
    2625#include <Node.h>
    2726#include <notification/Notifications.h>
    2827#include <Path.h>
    29 #include <File.h>
    30 #include <Directory.h>
    31 #include <VolumeRoster.h>
    32 #include <Volume.h>
    3328#include <Query.h>
     29#include <Roster.h>
     30#include <String.h>
     31#include <StringView.h>
    3432#include <SymLink.h>
     33#include <TextControl.h>
     34#include <Volume.h>
     35#include <VolumeRoster.h>
    3536
    3637#include "GeneralView.h"
    3738#include "SettingsHost.h"
    3839
    39 #define _T(str) (str)
     40#undef B_TRANSLATE_CONTEXT
     41#define B_TRANSLATE_CONTEXT "GeneralView"
    4042
    4143const int32 kServer = '_TSR';
    4244
    43 const char* kStartServer = _T("Enable notifications");
    44 const char* kStopServer = _T("Disable notifications");
    45 const char* kStarted = _T("Events are notified");
    46 const char* kStopped = _T("Events are not notified");
     45const char* kStartServer = B_TRANSLATE_MARK("Enable notifications");
     46const char* kStopServer = B_TRANSLATE_MARK("Disable notifications");
     47const char* kStarted = B_TRANSLATE_MARK("Events are notified");
     48const char* kStopped = B_TRANSLATE_MARK("Events are not notified");
    4749
    4850
    4951GeneralView::GeneralView(SettingsHost* host)
     
    7173
    7274    // Autostart
    7375    fAutoStart = new BCheckBox("autostart",
    74         _T("Enable notifications at startup"), new BMessage(kSettingChanged));
     76        B_TRANSLATE("Enable notifications at startup"),
     77        new BMessage(kSettingChanged));
    7578
    7679    // Display time
    77     fTimeout = new BTextControl(_T("Hide notifications from screen after"), NULL,
     80    fTimeout = new BTextControl(
     81        B_TRANSLATE("Hide notifications from screen after"), NULL,
    7882        new BMessage(kSettingChanged));
    7983    BStringView* displayTimeLabel = new BStringView("dt_label",
    80         _T("seconds of inactivity"));
     84        B_TRANSLATE("seconds of inactivity"));
    8185
    8286    // Default position
    8387    // TODO: Here will come a screen representation with the four corners clickable
     
    129133
    130134                // Check if server is available
    131135                if (!_CanFindServer(&ref)) {
    132                     BAlert* alert = new BAlert(_T("Notifications"),
    133                         _T("The notifications server cannot be found, "
    134                            "this means your InfoPopper installation was not "
    135                            "successfully completed."), _T("OK"), NULL,
    136                         NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
     136                    BAlert* alert = new BAlert(B_TRANSLATE("Notifications"),
     137                        B_TRANSLATE("The notifications server cannot be "
     138                        "found, this means your InfoPopper installation "
     139                        "was not successfully completed."),
     140                        B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
     141                        B_STOP_ALERT);
    137142                    (void)alert->Go();
    138143                    return;
    139144                }
     
    146151                    status_t ret = B_ERROR;
    147152                    BMessenger messenger(kNotificationServerSignature, team, &ret);
    148153                    if (ret != B_OK) {
    149                         BAlert* alert = new BAlert(_T("Notifications"),
    150                             _T("Notifications cannot be stopped, because "
    151                                "the server can't be reached."),
    152                             _T("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
     154                        BAlert* alert = new BAlert(B_TRANSLATE("Notifications"),
     155                            B_TRANSLATE("Notifications cannot be stopped, "
     156                            "because the server can't be reached."),
     157                            B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
     158                            B_STOP_ALERT);
    153159                        (void)alert->Go();
    154160                        return;
    155161                    }
    156162
    157163                    // Send quit message
    158164                    if (messenger.SendMessage(new BMessage(B_QUIT_REQUESTED)) != B_OK) {
    159                         BAlert* alert = new BAlert(_T("Notifications"),
    160                             _T("Cannot disable notifications because the server "
    161                                "can't be reached."), _T("OK"), NULL,
     165                        BAlert* alert = new BAlert(
     166                            B_TRANSLATE("Notifications"),
     167                            B_TRANSLATE("Cannot disable notifications because "
     168                            "the server can't be reached."), B_TRANSLATE("OK"), NULL,
    162169                            NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
    163170                        (void)alert->Go();
    164171                        return;
     
    170177                    // Start server
    171178                    status_t err = be_roster->Launch(kNotificationServerSignature);
    172179                    if (err != B_OK) {
    173                         BAlert* alert = new BAlert(_T("Notifications"),
    174                             _T("Cannot enable notifications because the server "
    175                                "cannot be found.\nThis means your InfoPopper "
    176                                "installation was not successfully completed."),
    177                             _T("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
     180                        BAlert* alert = new BAlert(
     181                            B_TRANSLATE("Notifications"),
     182                            B_TRANSLATE("Cannot enable notifications because "
     183                            "the server cannot be found.\nThis means your "
     184                            "InfoPopper installation was not successfully "
     185                            "completed."), B_TRANSLATE("OK"), NULL, NULL,
     186                            B_WIDTH_AS_USUAL, B_STOP_ALERT);
    178187                        (void)alert->Go();
    179188                        return;
    180189                    }
     
    205214
    206215    if (create_directory(path.Path(), 0755) != B_OK) {
    207216        BAlert* alert = new BAlert("",
    208             _T("There was a problem saving the preferences.\n"
    209                 "It's possible you don't have write access to the "
    210                 "settings directory."), "OK", NULL, NULL,
     217            B_TRANSLATE("There was a problem saving the preferences.\n"
     218            "It's possible you don't have write access to the "
     219            "settings directory."), B_TRANSLATE("OK"), NULL, NULL,
    211220            B_WIDTH_AS_USUAL, B_STOP_ALERT);
    212221        (void)alert->Go();
    213222    }
     
    261270    ret = settings.Flatten(&file);
    262271    if (ret != B_OK) {
    263272        BAlert* alert = new BAlert("",
    264             _T("An error is occurred saving the preferences.\n"
    265                 "It's possible you are running out of disk space."),
    266             "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
     273            B_TRANSLATE("An error is occurred saving the preferences.\n"
     274            "It's possible you are running out of disk space."),
     275            B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
    267276        (void)alert->Go();
    268277        return ret;
    269278    }
     
    272281    entry_ref ref;
    273282    if (!_CanFindServer(&ref)) {
    274283        BAlert* alert = new BAlert("",
    275             _T("The notifications server cannot be found.\n"
    276                "A possible cause is an installation not done correctly"),
    277             "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
     284            B_TRANSLATE("The notifications server cannot be found.\n"
     285            "A possible cause is an installation not done correctly"),
     286            B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
    278287        (void)alert->Go();
    279288        return B_ERROR;
    280289    }
     
    286295    ret = find_directory(B_USER_BOOT_DIRECTORY, &path, true);
    287296    if (ret != B_OK) {
    288297        BAlert* alert = new BAlert("",
    289             _T("Can't save preferences, you probably don't have write "
    290                "access to the boot settings directory."), "OK", NULL, NULL,
    291             B_WIDTH_AS_USUAL, B_STOP_ALERT);
     298            B_TRANSLATE("Can't save preferences, you probably don't have "
     299            "write access to the boot settings directory."),
     300            B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
    292301        (void)alert->Go();
    293302        return ret;
    294303    }
     
    305314        if ((ret = directory.CreateSymLink(serverPath.Leaf(),
    306315            serverPath.Path(), NULL) != B_OK)) {
    307316            BAlert* alert = new BAlert("",
    308                 _T("Can't enable notifications at startup time, you probably don't have "
    309                    "write permission to the boot settings directory."), "OK", NULL, NULL,
     317                B_TRANSLATE("Can't enable notifications at startup time, you "
     318                "probably don't have write permission to the boot settings "
     319                "directory."), B_TRANSLATE("OK"), NULL, NULL,
    310320                B_WIDTH_AS_USUAL, B_STOP_ALERT);
    311321            (void)alert->Go();
    312322            return ret;
  • src/preferences/notifications/PrefletWin.cpp

     
    88 */
    99
    1010#include <Application.h>
     11#include <Button.h>
    1112#include <GroupLayout.h>
    1213#include <GroupLayoutBuilder.h>
    13 #include <Button.h>
    1414
    1515#include "PrefletWin.h"
    1616#include "PrefletView.h"
    1717
    18 #define _T(str) (str)
    19 
    2018const int32 kRevert = '_RVT';
    2119const int32 kSave = '_SAV';
    2220
    2321
    2422PrefletWin::PrefletWin()
    2523    :
    26     BWindow(BRect(0, 0, 1, 1), "Notifications", B_TITLED_WINDOW, B_NOT_ZOOMABLE
    27         | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
     24    BWindow(BRect(0, 0, 1, 1), kAppName, B_TITLED_WINDOW,
     25        B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS |
     26        B_AUTO_UPDATE_SIZE_LIMITS)
    2827{
    2928    // Preflet container view
    3029    fMainView = new PrefletView(this);
    3130
    3231    // Save and revert buttons
    33     fRevert = new BButton("revert", _T("Revert"), new BMessage(kRevert));
     32    fRevert = new BButton("revert", B_TRANSLATE("Revert"),
     33        new BMessage(kRevert));
    3434    fRevert->SetEnabled(false);
    35     fSave = new BButton("save", _T("Save"), new BMessage(kSave));
     35    fSave = new BButton("save", B_TRANSLATE("Save"), new BMessage(kSave));
    3636    fSave->SetEnabled(false);
    3737
    3838    // Calculate inset
  • src/preferences/notifications/PrefletWin.h

     
    66#ifndef _PREFLET_WIN_H
    77#define _PREFLET_WIN_H
    88
     9#include <Catalog.h>
    910#include <Window.h>
    1011
    1112#include "SettingsHost.h"
     
    1415
    1516class PrefletView;
    1617
     18#undef B_TRANSLATE_CONTEXT
     19#define B_TRANSLATE_CONTEXT "Notifications"
     20
     21static const char* kAppName = B_TRANSLATE_MARK("Notifications");
     22
     23
    1724class PrefletWin : public BWindow, public SettingsHost {
    1825public:
    1926                            PrefletWin();
  • src/preferences/notifications/Jamfile

     
    1212    NotificationsView.cpp
    1313    IconRule.cpp
    1414    IconItem.cpp
    15     : be translation libcolumnlistview.a libnotification.a $(TARGET_LIBSTDC++)
     15    : be translation libcolumnlistview.a libnotification.a $(TARGET_LIBSTDC++)
     16    $(HAIKU_LOCALE_LIBS)
    1617    : Notifications.rdef
    1718;
    1819
    1920Depends Notifications : libcolumnlistview.a ;
    2021Depends Notifications : libnotification.a ;
     22
     23DoCatalogs Notifications :
     24    x-vnd.Haiku-Notifications
     25    :
     26    DisplayView.cpp
     27    GeneralView.cpp
     28    NotificationsView.cpp
     29    PrefletView.cpp
     30    PrefletWin.cpp
     31    PrefletWin.h
     32;
  • src/preferences/notifications/PrefletView.cpp

     
    77 *      Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
    88 */
    99
    10 #include <Message.h>
     10#include <Catalog.h>
    1111#include <GroupLayout.h>
    1212#include <GroupLayoutBuilder.h>
    1313#include <CardLayout.h>
    1414#include <LayoutItem.h>
     15#include <Message.h>
    1516
    1617#include "SettingsHost.h"
    1718#include "PrefletView.h"
     
    2021#include "DisplayView.h"
    2122#include "NotificationsView.h"
    2223
    23 #define _T(str) (str)
     24#undef B_TRANSLATE_CONTEXT
     25#define B_TRANSLATE_CONTEXT "PrefletView"
    2426
    2527const int32 kPageSelected = '_LCH';
    2628
     
    3234    // Page selector
    3335    fRule = new BIconRule("icon_rule");
    3436    fRule->SetSelectionMessage(new BMessage(kPageSelected));
    35     fRule->AddIcon(_T("General"), NULL);
    36     fRule->AddIcon(_T("Display"), NULL);
     37    fRule->AddIcon(B_TRANSLATE("General"), NULL);
     38    fRule->AddIcon(B_TRANSLATE("Display"), NULL);
    3739    //fRule->AddIcon(_T("Notifications"), NULL);
    3840
    3941    // View for card layout