Ticket #7152: app_server-localization.patch

File app_server-localization.patch, 22.9 KB (added by Karvjorm, 13 years ago)

A app_server localization patch.

  • src/servers/app/FontCacheEntry.cpp

     
    3131#include <new>
    3232
    3333#include <Autolock.h>
     34#include <Catalog.h>
    3435
    3536#include <agg_array.h>
    3637#include <utf8_functions.h>
     
    3839
    3940#include "GlobalSubpixelSettings.h"
    4041
     42#undef B_TRANSLATE_CONTEXT
     43#define B_TRANSLATE_CONTEXT "FontCacheEntry"
    4144
     45
    4246BLocker FontCacheEntry::sUsageUpdateLock("FontCacheEntry usage lock");
    4347
    4448
     
    159163
    160164    if (!fEngine.Init(font.Path(), 0, font.Size(), charMap,
    161165            renderingType, hinting)) {
    162         fprintf(stderr, "FontCacheEntry::Init() - some error loading font "
    163             "file %s\n", font.Path());
     166        fprintf(stderr, B_TRANSLATE("FontCacheEntry::Init() - some error "
     167            "loading font file %s\n"), font.Path());
    164168        return false;
    165169    }
    166170    if (fGlyphCache->Init() != B_OK) {
    167         fprintf(stderr, "FontCacheEntry::Init() - failed to allocate "
    168             "GlyphCache table for font file %s\n", font.Path());
     171        fprintf(stderr, B_TRANSLATE("FontCacheEntry::Init() - failed to "
     172            "allocate GlyphCache table for font file %s\n"), font.Path());
    169173        return false;
    170174    }
    171175
  • src/servers/app/RegionPool.cpp

     
    1515#include <debugger.h>
    1616#endif
    1717
     18#include <Catalog.h>
    1819#include <Region.h>
    1920
     21#undef B_TRANSLATE_CONTEXT
     22#define B_TRANSLATE_CONTEXT "RegionPool"
     23
    2024using std::nothrow;
    2125
    2226RegionPool::RegionPool()
     
    4953        region = new (nothrow) BRegion();
    5054        if (!region) {
    5155            // whoa
    52             fprintf(stderr, "RegionPool::GetRegion() - "
    53                             "no memory!\n");
     56            fprintf(stderr, B_TRANSLATE("RegionPool::GetRegion() - "
     57                            "no memory!\n"));
    5458        }
    5559    }
    5660#if DEBUG_LEAK
     
    7276        region = new (nothrow) BRegion(other);
    7377        if (!region) {
    7478            // whoa
    75             fprintf(stderr, "RegionPool::GetRegion() - "
    76                             "no memory!\n");
     79            fprintf(stderr, B_TRANSLATE("RegionPool::GetRegion() - "
     80                            "no memory!\n"));
    7781        }
    7882    }
    7983
  • src/servers/app/FontCache.cpp

     
    1212#include <stdio.h>
    1313#include <string.h>
    1414
     15#include <Catalog.h>
    1516#include <Entry.h>
    1617#include <Path.h>
    1718
    1819#include "AutoLocker.h"
    1920
     21#undef B_TRANSLATE_CONTEXT
     22#define B_TRANSLATE_CONTEXT "FontCache"
    2023
     24
    2125using std::nothrow;
    2226
    2327
     
    8791        entry = new (nothrow) FontCacheEntry();
    8892        if (!entry || !entry->Init(font)
    8993            || fFontCacheEntries.Put(signature, entry) < B_OK) {
    90             fprintf(stderr, "FontCache::FontCacheEntryFor() - "
    91                 "out of memory or no font file\n");
     94            fprintf(stderr, B_TRANSLATE("FontCache::FontCacheEntryFor() - "
     95                "out of memory or no font file\n"));
    9296            delete entry;
    9397            return NULL;
    9498        }
  • src/servers/app/EventStream.cpp

     
    99
    1010#include "EventStream.h"
    1111
     12#include <Catalog.h>
    1213#include <InputServerTypes.h>
    1314#include <ServerProtocol.h>
    1415#include <shared_cursor_area.h>
     
    1718#include <stdio.h>
    1819#include <string.h>
    1920
     21#undef B_TRANSLATE_CONTEXT
     22#define B_TRANSLATE_CONTEXT "EventStream"
    2023
     24
    2125EventStream::EventStream()
    2226{
    2327}
     
    266270    delete[] buffer;
    267271
    268272    if (status != B_OK) {
    269         printf("Unflatten event failed: %s, port message code was: %ld - %c%c%c%c\n",
     273        printf(B_TRANSLATE("Unflatten event failed: %s, "
     274            "port message code was: %ld - %c%c%c%c\n"),
    270275            strerror(status), code, (int8)(code >> 24), (int8)(code >> 16),
    271276            (int8)(code >> 8), (int8)code);
    272277        delete message;
  • src/servers/app/DrawState.cpp

     
    1717#include <new>
    1818#include <stdio.h>
    1919
     20#include <Catalog.h>
    2021#include <Region.h>
    2122
    2223#include "LinkReceiver.h"
    2324#include "LinkSender.h"
    2425#include "ServerProtocolStructs.h"
    2526
     27#undef B_TRANSLATE_CONTEXT
     28#define B_TRANSLATE_CONTEXT "DrawState"
    2629
    2730using std::nothrow;
    2831
     
    625628void
    626629DrawState::PrintToStream() const
    627630{
    628     printf("\t Origin: (%.1f, %.1f)\n", fOrigin.x, fOrigin.y);
    629     printf("\t Scale: %.2f\n", fScale);
     631    printf(B_TRANSLATE("\t Origin: (%.1f, %.1f)\n"), fOrigin.x, fOrigin.y);
     632    printf(B_TRANSLATE("\t Scale: %.2f\n"), fScale);
    630633
    631     printf("\t Pen Location and Size: (%.1f, %.1f) - %.2f (%.2f)\n",
    632           fPenLocation.x, fPenLocation.y, PenSize(), fPenSize);
     634    printf(B_TRANSLATE("\t Pen Location and Size: (%.1f, %.1f) - %.2f "
     635        "(%.2f)\n"), fPenLocation.x, fPenLocation.y, PenSize(), fPenSize);
    633636
    634     printf("\t HighColor: r=%d g=%d b=%d a=%d\n",
     637    printf(B_TRANSLATE("\t HighColor: r=%d g=%d b=%d a=%d\n"),
    635638        fHighColor.red, fHighColor.green, fHighColor.blue, fHighColor.alpha);
    636     printf("\t LowColor: r=%d g=%d b=%d a=%d\n",
     639    printf(B_TRANSLATE("\t LowColor: r=%d g=%d b=%d a=%d\n"),
    637640        fLowColor.red, fLowColor.green, fLowColor.blue, fLowColor.alpha);
    638     printf("\t Pattern: %llu\n", fPattern.GetInt64());
     641    printf(B_TRANSLATE("\t Pattern: %llu\n"), fPattern.GetInt64());
    639642
    640     printf("\t DrawMode: %lu\n", (uint32)fDrawingMode);
    641     printf("\t AlphaSrcMode: %ld\t AlphaFncMode: %ld\n",
     643    printf(B_TRANSLATE("\t DrawMode: %lu\n"), (uint32)fDrawingMode);
     644    printf(B_TRANSLATE("\t AlphaSrcMode: %ld\t AlphaFncMode: %ld\n"),
    642645           (int32)fAlphaSrcMode, (int32)fAlphaFncMode);
    643646
    644     printf("\t LineCap: %d\t LineJoin: %d\t MiterLimit: %.2f\n",
     647    printf(B_TRANSLATE("\t LineCap: %d\t LineJoin: %d\t MiterLimit: %.2f\n"),
    645648           (int16)fLineCapMode, (int16)fLineJoinMode, fMiterLimit);
    646649
    647650    if (fClippingRegion)
    648651        fClippingRegion->PrintToStream();
    649652
    650     printf("\t ===== Font Data =====\n");
    651     printf("\t Style: CURRENTLY NOT SET\n"); // ???
    652     printf("\t Size: %.1f (%.1f)\n", fFont.Size(), fUnscaledFontSize);
    653     printf("\t Shear: %.2f\n", fFont.Shear());
    654     printf("\t Rotation: %.2f\n", fFont.Rotation());
    655     printf("\t Spacing: %ld\n", fFont.Spacing());
    656     printf("\t Encoding: %ld\n", fFont.Encoding());
    657     printf("\t Face: %d\n", fFont.Face());
    658     printf("\t Flags: %lu\n", fFont.Flags());
     653    printf(B_TRANSLATE("\t ===== Font Data =====\n"));
     654    printf(B_TRANSLATE("\t Style: CURRENTLY NOT SET\n")); // ???
     655    printf(B_TRANSLATE("\t Size: %.1f (%.1f)\n"), fFont.Size(), fUnscaledFontSize);
     656    printf(B_TRANSLATE("\t Shear: %.2f\n"), fFont.Shear());
     657    printf(B_TRANSLATE("\t Rotation: %.2f\n"), fFont.Rotation());
     658    printf(B_TRANSLATE("\t Spacing: %ld\n"), fFont.Spacing());
     659    printf(B_TRANSLATE("\t Encoding: %ld\n"), fFont.Encoding());
     660    printf(B_TRANSLATE("\t Face: %d\n"), fFont.Face());
     661    printf(B_TRANSLATE("\t Flags: %lu\n"), fFont.Flags());
    659662}
    660663
  • src/servers/app/ServerApp.cpp

     
    2929
    3030#include <AppDefs.h>
    3131#include <Autolock.h>
     32#include <Catalog.h>
    3233#include <Debug.h>
     34#include <FontPrivate.h>
    3335#include <List.h>
    34 #include <ScrollBar.h>
    35 #include <Shape.h>
    36 #include <String.h>
    37 
    38 #include <FontPrivate.h>
    3936#include <MessengerPrivate.h>
    4037#include <PrivateScreen.h>
    4138#include <RosterPrivate.h>
     39#include <ScrollBar.h>
    4240#include <ServerProtocol.h>
     41#include <Shape.h>
     42#include <String.h>
    4343#include <WindowPrivate.h>
    4444
    4545#include "AppServer.h"
     
    6464#include "SystemPalette.h"
    6565#include "Window.h"
    6666
     67#undef B_TRANSLATE_CONTEXT
     68#define B_TRANSLATE_CONTEXT "ServerApp"
    6769
    6870//#define DEBUG_SERVERAPP
    6971#ifdef DEBUG_SERVERAPP
     
    31443146        }
    31453147
    31463148        default:
    3147             printf("ServerApp %s received unhandled message code %ld\n",
    3148                 Signature(), code);
     3149            printf(B_TRANSLATE("ServerApp %s received unhandled message code "
     3150                "%ld\n"), Signature(), code);
    31493151
    31503152            if (link.NeedsReply()) {
    31513153                // the client is now blocking and waiting for a reply!
    31523154                fLink.StartMessage(B_ERROR);
    31533155                fLink.Flush();
    31543156            } else
    3155                 puts("message doesn't need a reply!");
     3157                puts(B_TRANSLATE("message doesn't need a reply!"));
    31563158            break;
    31573159    }
    31583160}
  • src/servers/app/View.cpp

     
    2828
    2929#include "drawing_support.h"
    3030
     31#include <Catalog.h>
     32#include <GradientLinear.h>
     33#include <GradientRadial.h>
     34#include <GradientRadialFocus.h>
     35#include <GradientDiamond.h>
     36#include <GradientConic.h>
    3137#include <List.h>
    3238#include <Message.h>
    3339#include <PortLink.h>
    3440#include <View.h> // for resize modes
    3541#include <WindowPrivate.h>
    3642
    37 #include <GradientLinear.h>
    38 #include <GradientRadial.h>
    39 #include <GradientRadialFocus.h>
    40 #include <GradientDiamond.h>
    41 #include <GradientConic.h>
     43#undef B_TRANSLATE_CONTEXT
     44#define B_TRANSLATE_CONTEXT "View"
    4245
    43 
    4446using std::nothrow;
    4547
    4648
     
    224226View::AddChild(View* view)
    225227{
    226228    if (view->fParent) {
    227         printf("View::AddChild() - View already has a parent\n");
     229        printf(B_TRANSLATE("View::AddChild() - View already has a parent\n"));
    228230        return;
    229231    }
    230232
     
    267269View::RemoveChild(View* view)
    268270{
    269271    if (view == NULL || view->fParent != this) {
    270         printf("View::RemoveChild(%p - %s) - View is not child of "
    271             "this (%p) view!\n", view, view ? view->Name() : NULL, this);
     272        printf(B_TRANSLATE("View::RemoveChild(%p - %s) - View is not child of "
     273            "this (%p) view!\n"), view, view ? view->Name() : NULL, this);
    272274        return false;
    273275    }
    274276
     
    12661268View::PopState()
    12671269{
    12681270    if (fDrawState->PreviousState() == NULL) {
    1269         fprintf(stderr, "WARNING: User called BView(%s)::PopState(), "
    1270             "but there is NO state on stack!\n", Name());
     1271        fprintf(stderr, B_TRANSLATE("WARNING: User called "
     1272            "BView(%s)::PopState(), but there is NO state on stack!\n"),
     1273            Name());
    12711274        return;
    12721275    }
    12731276
     
    16251628    fLocalClipping.PrintToStream();
    16261629    printf("  fScreenClipping:\n");
    16271630    fScreenClipping.PrintToStream();
    1628     printf("  valid:            %d\n", fScreenClippingValid);
     1631    printf(B_TRANSLATE("  valid:            %d\n"),
     1632        fScreenClippingValid);
    16291633
    16301634    printf("  fUserClipping:\n");
    16311635    if (fUserClipping != NULL)
    16321636        fUserClipping->PrintToStream();
    16331637    else
    1634         printf("  none\n");
     1638        printf(B_TRANSLATE("  none\n"));
    16351639
    16361640    printf("  fScreenAndUserClipping:\n");
    16371641    if (fScreenAndUserClipping != NULL)
    16381642        fScreenAndUserClipping->PrintToStream();
    16391643    else
    1640         printf("  invalid\n");
     1644        printf(B_TRANSLATE("  invalid\n"));
    16411645
    1642     printf("  state:\n");
    1643     printf("    user clipping:  %d\n", fDrawState->HasClipping());
     1646    printf(B_TRANSLATE("  state:\n"));
     1647    printf(B_TRANSLATE("    user clipping:  %d\n"), fDrawState->HasClipping());
    16441648    BPoint origin = fDrawState->CombinedOrigin();
    1645     printf("    origin:         BPoint(%.1f, %.1f)\n", origin.x, origin.y);
    1646     printf("    scale:          %.2f\n", fDrawState->CombinedScale());
     1649    printf(B_TRANSLATE("    origin:         BPoint(%.1f, %.1f)\n"), origin.x,
     1650        origin.y);
     1651    printf(B_TRANSLATE("    scale:          %.2f\n"),
     1652        fDrawState->CombinedScale());
    16471653    printf("\n");
    16481654}
    16491655
  • src/servers/app/ServerPicture.cpp

     
    2323#include "View.h"
    2424#include "Window.h"
    2525
     26#include <Bitmap.h>
     27#include <Catalog.h>
     28#include <Debug.h>
    2629#include <LinkReceiver.h>
     30#include <List.h>
    2731#include <OffsetFile.h>
    2832#include <ObjectListPrivate.h>
    2933#include <PicturePlayer.h>
    3034#include <PictureProtocol.h>
    3135#include <PortLink.h>
    3236#include <ServerProtocol.h>
     37#include <Shape.h>
    3338#include <ShapePrivate.h>
    3439
    35 #include <Bitmap.h>
    36 #include <Debug.h>
    37 #include <List.h>
    38 #include <Shape.h>
     40#undef B_TRANSLATE_CONTEXT
     41#define B_TRANSLATE_CONTEXT "ServerPicture"
    3942
    4043
    4144using std::stack;
     
    545548static void
    546549clip_to_picture(View* view, BPicture* picture, BPoint pt, bool clipToInverse)
    547550{
    548     printf("ClipToPicture(picture, BPoint(%.2f, %.2f), %s)\n",
    549         pt.x, pt.y, clipToInverse ? "inverse" : "");
     551    if (clipToInverse)
     552        printf(B_TRANSLATE("ClipToPicture(picture, BPoint(%.2f, %.2f), \"inverse\")\n"),
     553            pt.x, pt.y);
     554    else
     555        printf(B_TRANSLATE("ClipToPicture(picture, BPoint(%.2f, %.2f), \"\")\n"),
     556            pt.x, pt.y);
    550557}
    551558
    552559
  • src/servers/app/MessageLooper.cpp

     
    1010#include "MessageLooper.h"
    1111
    1212#include <Autolock.h>
     13#include <Catalog.h>
    1314#include <stdio.h>
    1415#include <string.h>
    1516
     17#undef B_TRANSLATE_CONTEXT
     18#define B_TRANSLATE_CONTEXT "MessageLooper"
    1619
     20
    1721MessageLooper::MessageLooper(const char* name)
    1822    : BLocker(name),
    1923    fThread(-1),
     
    123127    if (get_sem_info(semaphore, &info) == B_OK)
    124128        strlcpy(name, info.name, length);
    125129    else
    126         strlcpy(name, "unnamed looper", length);
     130        strlcpy(name, B_TRANSLATE("unnamed looper"), length);
    127131}
    128132
    129133
     
    145149            // that shouldn't happen, it's our port
    146150            char name[256];
    147151            _GetLooperName(name, 256);
    148             printf("MessageLooper \"%s\": Someone deleted our message port %ld, %s!\n",
    149                 name, receiver.Port(), strerror(status));
     152            printf(B_TRANSLATE("MessageLooper \"%s\": Someone deleted our "
     153                "message port %ld, %s!\n"), name, receiver.Port(),
     154                strerror(status));
    150155            break;
    151156        }
    152157
  • src/servers/app/Jamfile

     
    6868    :
    6969    libtranslation.so libbe.so libbnetapi.so
    7070    libasdrawing.a libasremote.a libpainter.a libagg.a libfreetype.so
    71     libtextencoding.so libshared.a $(TARGET_LIBSTDC++)
     71    libtextencoding.so libshared.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
    7272
    7373    : app_server.rdef
    7474;
    7575
     76DoCatalogs app_server :
     77    x-vnd.Haiku-app-server
     78    :
     79    CursorSet.cpp
     80    DrawState.cpp   
     81    EventStream.cpp
     82    FontCache.cpp
     83    FontCacheEntry.cpp
     84    MessageLooper.cpp
     85    ProfileMessageSupport.cpp
     86    RegionPool.cpp
     87    ServerApp.cpp
     88    ServerBitmap.cpp
     89    ServerPicture.cpp
     90    ServerWindow.cpp
     91    View.cpp
     92    Window.cpp
     93;
     94
    7695SubInclude HAIKU_TOP src servers app drawing ;
  • src/servers/app/ServerWindow.cpp

     
    3131
    3232#include <AppDefs.h>
    3333#include <Autolock.h>
     34#include <Catalog.h>
    3435#include <Debug.h>
    3536#include <DirectWindow.h>
    36 #include <TokenSpace.h>
    37 #include <View.h>
    3837#include <GradientLinear.h>
    3938#include <GradientRadial.h>
    4039#include <GradientRadialFocus.h>
    4140#include <GradientDiamond.h>
    4241#include <GradientConic.h>
    43 
    4442#include <MessagePrivate.h>
    4543#include <PortLink.h>
    4644#include <ServerProtocolStructs.h>
     45#include <TokenSpace.h>
     46#include <View.h>
    4747#include <ViewPrivate.h>
    4848#include <WindowInfo.h>
    4949#include <WindowPrivate.h>
     
    6868#include "Window.h"
    6969#include "WorkspacesView.h"
    7070
     71#undef B_TRANSLATE_CONTEXT
     72#define B_TRANSLATE_CONTEXT "ServerWindow"
    7173
     74
    7275using std::nothrow;
    7376
    7477
     
    151154ServerWindow::ServerWindow(const char* title, ServerApp* app,
    152155        port_id clientPort, port_id looperPort, int32 clientToken)
    153156    :
    154     MessageLooper(title && *title ? title : "Unnamed Window"),
     157    MessageLooper(title && *title ? title : B_TRANSLATE("Unnamed Window")),
    155158    fTitle(NULL),
    156159    fDesktop(app->GetDesktop()),
    157160    fServerApp(app),
     
    326329{
    327330    const char *title = Title();
    328331    if (title == NULL || !title[0])
    329         title = "Unnamed Window";
     332        title = B_TRANSLATE("Unnamed Window");
    330333
    331334    snprintf(name, length, "w:%ld:%s", ClientTeam(), title);
    332335}
     
    33643367        status_t status = receiver.GetNextMessage(code);
    33653368        if (status != B_OK) {
    33663369            // that shouldn't happen, it's our port
    3367             printf("Someone deleted our message port!\n");
     3370            printf(B_TRANSLATE("Someone deleted our message port!\n"));
    33683371
    33693372            // try to let our client die happily
    33703373            NotifyQuitRequested();
     
    34843487            status_t status = receiver.GetNextMessage(code);
    34853488            if (status != B_OK) {
    34863489                // that shouldn't happen, it's our port
    3487                 printf("Someone deleted our message port!\n");
     3490                printf(B_TRANSLATE("Someone deleted our message port!\n"));
    34883491                if (lockedDesktopSingleWindow)
    34893492                    fDesktop->UnlockSingleWindow();
    34903493
     
    37513754ServerWindow::PictureToRegion(ServerPicture* picture, BRegion& region,
    37523755    bool inverse, BPoint where)
    37533756{
    3754     fprintf(stderr, "ServerWindow::PictureToRegion() not implemented\n");
     3757    fprintf(stderr, B_TRANSLATE("ServerWindow::PictureToRegion() not "
     3758        "implemented\n"));
    37553759    region.MakeEmpty();
    37563760    return B_ERROR;
    37573761}
  • src/servers/app/ProfileMessageSupport.cpp

     
    99
    1010#include "ProfileMessageSupport.h"
    1111
     12#include <Catalog.h>
    1213#include <ServerProtocol.h>
    1314
     15#undef B_TRANSLATE_CONTEXT
     16#define B_TRANSLATE_CONTEXT "ProfileMessageSupport"
    1417
     18
    1519void
    1620string_for_message_code(uint32 code, BString& string)
    1721{
     
    310314        CODE(AS_DIRECT_WINDOW_SET_FULLSCREEN);
    311315
    312316        default:
    313             string << "unkown code: " << code;
     317            string << B_TRANSLATE("unknown code:") << " " << code;
    314318            break;
    315319    }
    316320}
  • src/servers/app/ServerBitmap.cpp

     
    1010
    1111#include "ServerBitmap.h"
    1212
     13#include <Catalog.h>
    1314#include <new>
    1415#include <stdio.h>
    1516#include <stdlib.h>
     
    2324#include "Overlay.h"
    2425#include "ServerApp.h"
    2526
     27#undef B_TRANSLATE_CONTEXT
     28#define B_TRANSLATE_CONTEXT "ServerBitmap"
    2629
     30
    2731using std::nothrow;
    2832using namespace BPrivate;
    2933
     
    210214void
    211215ServerBitmap::PrintToStream()
    212216{
    213     printf("Bitmap@%p: (%ld:%ld), space %ld, bpr %ld, buffer %p\n",
    214         this, fWidth, fHeight, (int32)fSpace, fBytesPerRow, fBuffer);
     217    printf(B_TRANSLATE("Bitmap@%p: (%ld:%ld), space %ld, bpr %ld, "
     218        "buffer %p\n"), this, fWidth, fHeight, (int32)fSpace,
     219        fBytesPerRow, fBuffer);
    215220}
    216221
    217222
  • src/servers/app/Window.cpp

     
    2828#include "Workspace.h"
    2929#include "WorkspacesView.h"
    3030
    31 #include <ViewPrivate.h>
    32 #include <WindowPrivate.h>
    33 
     31#include <Catalog.h>
    3432#include <Debug.h>
    3533#include <DirectWindow.h>
    3634#include <PortLink.h>
    3735#include <View.h>
     36#include <ViewPrivate.h>
     37#include <WindowPrivate.h>
    3838
    3939#include <new>
    4040#include <stdio.h>
    4141
     42#undef B_TRANSLATE_CONTEXT
     43#define B_TRANSLATE_CONTEXT "Window"
    4244
    4345// Toggle debug output
    4446//#define DEBUG_WINDOW
     
    17661768    if (!fUpdateRequested) {
    17671769        link.StartMessage(B_ERROR);
    17681770        link.Flush();
    1769         fprintf(stderr, "Window::BeginUpdate() - no update requested!\n");
     1771        fprintf(stderr, B_TRANSLATE("Window::BeginUpdate() - no update "
     1772            "requested!\n"));
    17701773        return;
    17711774    }
    17721775
  • src/servers/app/CursorSet.cpp

     
    1111#include "ServerCursor.h"
    1212
    1313#include <AppServerLink.h>
     14#include <Catalog.h>
     15#include <File.h>
     16#include <OS.h>
    1417#include <PortLink.h>
    1518#include <ServerProtocol.h>
    16 
    17 #include <OS.h>
    1819#include <String.h>
    19 #include <File.h>
    2020
    2121#include <new>
    2222
     23#undef B_TRANSLATE_CONTEXT
     24#define B_TRANSLATE_CONTEXT "CursorSet"
    2325
    2426/*!
    2527    \brief Constructor
     
    2830CursorSet::CursorSet(const char *name)
    2931    : BMessage()
    3032{
    31     AddString("name", name != NULL ? name : "Untitled");
     33    AddString("name", name != NULL ? name :
     34        B_TRANSLATE_COMMENT("Untitled","Without name"));
    3235}
    3336
    3437
     
    302305{
    303306    switch (which) {
    304307        case B_CURSOR_ID_SYSTEM_DEFAULT:
    305             return "System default";
     308            return B_TRANSLATE("System default");
    306309        case B_CURSOR_ID_CONTEXT_MENU:
    307             return "Context menu";
     310            return B_TRANSLATE("Context menu");
    308311        case B_CURSOR_ID_COPY:
    309             return "Copy";
     312            return B_TRANSLATE("Copy");
    310313        case B_CURSOR_ID_CROSS_HAIR:
    311             return "Cross hair";
     314            return B_TRANSLATE("Cross hair");
    312315        case B_CURSOR_ID_NO_CURSOR:
    313             return "No cursor";
     316            return B_TRANSLATE("No cursor");
    314317        case B_CURSOR_ID_FOLLOW_LINK:
    315             return "Follow link";
     318            return B_TRANSLATE("Follow link");
    316319        case B_CURSOR_ID_GRAB:
    317             return "Grab";
     320            return B_TRANSLATE("Grab");
    318321        case B_CURSOR_ID_GRABBING:
    319             return "Grabbing";
     322            return B_TRANSLATE("Grabbing");
    320323        case B_CURSOR_ID_HELP:
    321             return "Help";
     324            return B_TRANSLATE("Help");
    322325        case B_CURSOR_ID_I_BEAM:
    323             return "I-beam";
     326            return B_TRANSLATE("I-beam");
    324327        case B_CURSOR_ID_I_BEAM_HORIZONTAL:
    325             return "I-beam horizontal";
     328            return B_TRANSLATE("I-beam horizontal");
    326329        case B_CURSOR_ID_MOVE:
    327             return "Move";
     330            return B_TRANSLATE("Move");
    328331        case B_CURSOR_ID_NOT_ALLOWED:
    329             return "Not allowed";
     332            return B_TRANSLATE("Not allowed");
    330333        case B_CURSOR_ID_PROGRESS:
    331             return "Progress";
     334            return B_TRANSLATE("Progress");
    332335        case B_CURSOR_ID_RESIZE_NORTH:
    333             return "Resize North";
     336            return B_TRANSLATE("Resize North");
    334337        case B_CURSOR_ID_RESIZE_EAST:
    335             return "Resize East";
     338            return B_TRANSLATE("Resize East");
    336339        case B_CURSOR_ID_RESIZE_SOUTH:
    337             return "Resize South";
     340            return B_TRANSLATE("Resize South");
    338341        case B_CURSOR_ID_RESIZE_WEST:
    339             return "Resize West";
     342            return B_TRANSLATE("Resize West");
    340343        case B_CURSOR_ID_RESIZE_NORTH_EAST:
    341             return "Resize North East";
     344            return B_TRANSLATE("Resize North East");
    342345        case B_CURSOR_ID_RESIZE_NORTH_WEST:
    343             return "Resize North West";
     346            return B_TRANSLATE("Resize North West");
    344347        case B_CURSOR_ID_RESIZE_SOUTH_EAST:
    345             return "Resize South East";
     348            return B_TRANSLATE("Resize South East");
    346349        case B_CURSOR_ID_RESIZE_SOUTH_WEST:
    347             return "Resize South West";
     350            return B_TRANSLATE("Resize South West");
    348351        case B_CURSOR_ID_RESIZE_NORTH_SOUTH:
    349             return "Resize North South";
     352            return B_TRANSLATE("Resize North South");
    350353        case B_CURSOR_ID_RESIZE_EAST_WEST:
    351             return "Resize East West";
     354            return B_TRANSLATE("Resize East West");
    352355        case B_CURSOR_ID_RESIZE_NORTH_EAST_SOUTH_WEST:
    353             return "Resize North East South West";
     356            return B_TRANSLATE("Resize North East South West");
    354357        case B_CURSOR_ID_RESIZE_NORTH_WEST_SOUTH_EAST:
    355             return "Resize North West South East";
     358            return B_TRANSLATE("Resize North West South East");
    356359        case B_CURSOR_ID_ZOOM_IN:
    357             return "Zoom in";
     360            return B_TRANSLATE("Zoom in");
    358361        case B_CURSOR_ID_ZOOM_OUT:
    359             return "Zoom out";
     362            return B_TRANSLATE("Zoom out");
    360363        default:
    361             return "Invalid";
     364            return B_TRANSLATE("Invalid");
    362365    }
    363366}
    364367