Ticket #7530: new-0001-Added-localization-support-for-Cortex-app.patch

File new-0001-Added-localization-support-for-Cortex-app.patch, 115.2 KB (added by humdinger, 8 years ago)

updated patch

  • src/apps/cortex/AddOnHost/AddOnHostApp.cpp

    From 5be9bc30ea4ddc8adfef08bd05a3034855d5f55f Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Dancs=C3=B3=20R=C3=B3bert?= <dancso.robert@d-rendszer.hu>
    Date: Fri, 4 Jan 2013 18:48:34 +0100
    Subject: [PATCH] Added localization support for Cortex app.
    
    ---
     src/apps/cortex/AddOnHost/AddOnHostApp.cpp         |   12 +-
     src/apps/cortex/AddOnHost/Jamfile                  |    8 +-
     .../cortex/DormantNodeView/DormantNodeListItem.cpp |    7 +-
     .../cortex/DormantNodeView/DormantNodeWindow.cpp   |    7 +-
     src/apps/cortex/DormantNodeView/Jamfile            |    1 +
     src/apps/cortex/InfoView/AppNodeInfoView.cpp       |   15 +-
     src/apps/cortex/InfoView/ConnectionInfoView.cpp    |   71 ++---
     src/apps/cortex/InfoView/DormantNodeInfoView.cpp   |   31 ++-
     src/apps/cortex/InfoView/EndPointInfoView.cpp      |   82 +++---
     src/apps/cortex/InfoView/FileNodeInfoView.cpp      |   24 +-
     src/apps/cortex/InfoView/InfoView.cpp              |    7 +-
     src/apps/cortex/InfoView/Jamfile                   |    1 +
     src/apps/cortex/InfoView/LiveNodeInfoView.cpp      |   20 +-
     src/apps/cortex/MediaRoutingView/Jamfile           |    1 +
     src/apps/cortex/MediaRoutingView/MediaJack.cpp     |   13 +-
     .../cortex/MediaRoutingView/MediaNodePanel.cpp     |   27 +-
     .../cortex/MediaRoutingView/MediaRoutingView.cpp   |   33 ++-
     src/apps/cortex/MediaRoutingView/MediaWire.cpp     |    9 +-
     src/apps/cortex/NodeManager/Jamfile                |    1 +
     src/apps/cortex/NodeManager/NodeManager.cpp        |   17 +-
     src/apps/cortex/ParameterView/Jamfile              |    1 +
     src/apps/cortex/ParameterView/ParameterWindow.cpp  |   21 +-
     src/apps/cortex/RouteApp/Jamfile                   |    9 +-
     src/apps/cortex/RouteApp/RouteAppNodeManager.cpp   |   40 +--
     src/apps/cortex/RouteApp/RouteWindow.cpp           |   32 ++-
     src/apps/cortex/TipManager/Jamfile                 |    7 +
     src/apps/cortex/TipManager/TipWindow.cpp           |    7 +-
     src/apps/cortex/TransportView/Jamfile              |    7 +
     src/apps/cortex/TransportView/TransportView.cpp    |   37 +--
     .../addons/AudioAdapter/AudioAdapterParams.cpp     |   20 +-
     src/apps/cortex/addons/AudioAdapter/Jamfile        |    2 +-
     src/apps/cortex/addons/Flanger/FlangerAddOn.cpp    |   10 +-
     src/apps/cortex/addons/Flanger/FlangerNode.cpp     |   30 ++-
     src/apps/cortex/addons/Flanger/Jamfile             |    2 +-
     src/apps/cortex/addons/LoggingConsumer/Jamfile     |    2 +-
     .../addons/LoggingConsumer/LoggingConsumer.cpp     |   22 +-
     .../LoggingConsumer/LoggingConsumerAddOn.cpp       |    9 +-
     .../addons/LoggingConsumer/NodeHarnessApp.cpp      |    7 +-
     .../addons/LoggingConsumer/NodeHarnessWin.cpp      |   13 +-
     .../cortex/addons/NullFilter/NullFilterAddOn.cpp   |   12 +-
     .../cortex/addons/ToneProducer/NodeHarnessApp.cpp  |    7 +-
     .../cortex/addons/ToneProducer/NodeHarnessWin.cpp  |   11 +-
     .../cortex/addons/ToneProducer/ToneProducer.cpp    |   26 +-
     .../addons/ToneProducer/ToneProducerAddOn.cpp      |   11 +-
     src/apps/cortex/addons/common/AudioFilterNode.cpp  |   10 +-
     .../cortex/addons/common/MediaNodeControlApp.cpp   |   18 +-
     src/apps/cortex/support/Jamfile                    |    7 +
     src/apps/cortex/support/MediaString.cpp            |  283 ++++++++++----------
     48 files changed, 628 insertions(+), 422 deletions(-)
    
    diff --git a/src/apps/cortex/AddOnHost/AddOnHostApp.cpp b/src/apps/cortex/AddOnHost/AddOnHostApp.cpp
    index e481c4a..2c8d3fc 100644
    a b  
    3535#include "AddOnHostProtocol.h"
    3636
    3737#include <Alert.h>
     38#include <Catalog.h>
    3839#include <Debug.h>
    3940#include <MediaRoster.h>
    4041
    4142#include <cstdlib>
    4243#include <cstring>
    4344
     45#undef B_TRANSLATION_CONTEXT
     46#define B_TRANSLATION_CONTEXT "CortexAddOnHost"
     47
    4448__USE_CORTEX_NAMESPACE
    4549using namespace addon_host;
    4650
    main(int argc, char** argv)  
    170174{
    171175    App app;
    172176    if (argc < 2 || strcmp(argv[1], "--addon-host") != 0) {
    173         BAlert* alert = new BAlert("Cortex AddOnHost",
    174             "This program runs in the background, and is started automatically "
    175             "by Cortex when necessary.  You probably don't want to start it manually.",
    176             "Continue", "Quit");
     177        BAlert* alert = new BAlert(B_TRANSLATE("Cortex AddOnHost"),
     178            B_TRANSLATE("This program runs in the background, and is started automatically "
     179            "by Cortex when necessary.  You probably don't want to start it manually."),
     180            B_TRANSLATE("Continue"), B_TRANSLATE("Quit"));
    177181        alert->SetShortcut(1, B_ESCAPE);
    178182        int32 response = alert->Go();
    179183
  • src/apps/cortex/AddOnHost/Jamfile

    diff --git a/src/apps/cortex/AddOnHost/Jamfile b/src/apps/cortex/AddOnHost/Jamfile
    index 9675986..e678027 100644
    a b SetSubDirSupportedPlatformsBeOSCompatible ;  
    99
    1010Application CortexAddOnHost :
    1111    AddOnHostApp.cpp
    12     : be media $(TARGET_LIBSTDC++) cortex_support.a
     12    : be media $(TARGET_LIBSTDC++) cortex_support.a $(HAIKU_LOCALE_LIBS)
    1313    : AddOnHost_Resource.rsrc
    1414;
     15
     16DoCatalogs CorexAddOnHost :
     17    application/x-vnd.Cortex.AddOnHost
     18    :
     19    AddOnHostApp.cpp
     20;
  • src/apps/cortex/DormantNodeView/DormantNodeListItem.cpp

    diff --git a/src/apps/cortex/DormantNodeView/DormantNodeListItem.cpp b/src/apps/cortex/DormantNodeView/DormantNodeListItem.cpp
    index 202fe3c..d4677d7 100644
    a b  
    4141
    4242// Application Kit
    4343#include <Application.h>
     44// Locale Kit
     45#include <Catalog.h>
    4446// Interface Kit
    4547#include <PopUpMenu.h>
    4648#include <MenuItem.h>
     
    4850#include <MediaRoster.h>
    4951#include <MediaAddOn.h>
    5052
     53#undef B_TRANSLATION_CONTEXT
     54#define B_TRANSLATION_CONTEXT "CortexDormantNodeView"
     55
    5156__USE_CORTEX_NAMESPACE
    5257
    5358#include <Debug.h>
    void DormantNodeListItem::showContextMenu(  
    267272   
    268273    // Add the "Get Info" item
    269274    BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
    270     menu->AddItem(new BMenuItem("Get info", message));
     275    menu->AddItem(new BMenuItem(B_TRANSLATE("Get info"), message));
    271276
    272277    menu->SetTargetForItems(owner);
    273278    owner->ConvertToScreen(&point);
  • src/apps/cortex/DormantNodeView/DormantNodeWindow.cpp

    diff --git a/src/apps/cortex/DormantNodeView/DormantNodeWindow.cpp b/src/apps/cortex/DormantNodeView/DormantNodeWindow.cpp
    index 52f3aed..6b3d833 100644
    a b  
    4040
    4141// Application Kit
    4242#include <Application.h>
     43// Locale Kit
     44#include <Catalog.h>
    4345// Interface Kit
    4446#include <Screen.h>
    4547#include <ScrollBar.h>
    4648
     49#undef B_TRANSLATION_CONTEXT
     50#define B_TRANSLATION_CONTEXT "CortexDormantNodeView"
     51
    4752__USE_CORTEX_NAMESPACE
    4853
    4954#include <Debug.h>
    const BRect DormantNodeWindow::s_initFrame(500.0, 350.0, 640.0, 480.0);  
    6570
    6671DormantNodeWindow::DormantNodeWindow(
    6772    BWindow* parent)
    68     : BWindow(s_initFrame, "Media add-ons",
     73    : BWindow(s_initFrame, B_TRANSLATE("Media add-ons"),
    6974              B_FLOATING_WINDOW_LOOK,
    7075              B_FLOATING_SUBSET_WINDOW_FEEL,
    7176              B_WILL_ACCEPT_FIRST_CLICK|B_AVOID_FOCUS|B_ASYNCHRONOUS_CONTROLS),
  • src/apps/cortex/DormantNodeView/Jamfile

    diff --git a/src/apps/cortex/DormantNodeView/Jamfile b/src/apps/cortex/DormantNodeView/Jamfile
    index 4bf1abc..065edcb 100644
    a b StaticLibrary cortex_dormant_node_view.a :  
    1515    DormantNodeListItem.cpp
    1616    DormantNodeView.cpp
    1717    DormantNodeWindow.cpp
     18    : be $(HAIKU_LOCALE_LIBS)
    1819;
  • src/apps/cortex/InfoView/AppNodeInfoView.cpp

    diff --git a/src/apps/cortex/InfoView/AppNodeInfoView.cpp b/src/apps/cortex/InfoView/AppNodeInfoView.cpp
    index b5c964d..6793665 100644
    a b  
    4040
    4141// Application Kit
    4242#include <Roster.h>
     43// Locale Kit
     44#include <Catalog.h>
    4345// Media Kit
    4446#include <MediaNode.h>
    4547#include <MediaRoster.h>
     
    4951#include <File.h>
    5052#include <Path.h>
    5153
     54#undef B_TRANSLATION_CONTEXT
     55#define B_TRANSLATION_CONTEXT "CortexInfoView"
     56
    5257__USE_CORTEX_NAMESPACE
    5358
    5459#include <Debug.h>
    AppNodeInfoView::AppNodeInfoView(  
    6570    D_METHOD(("AppNodeInfoView::AppNodeInfoView()\n"));
    6671
    6772    // adjust view properties
    68     setSideBarWidth(be_plain_font->StringWidth(" File Format ") + 2 * InfoView::M_H_MARGIN);
    69     setSubTitle("Application-Owned Node");
     73    setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("File format")) + 2 * InfoView::M_H_MARGIN);
     74    setSubTitle(B_TRANSLATE("Application-owned node"));
    7075
    7176    // add separator
    7277    addField("", "");
    AppNodeInfoView::AppNodeInfoView(  
    8287        if ((appEntry.InitCheck() == B_OK)
    8388         && (appEntry.GetName(appName) == B_OK))
    8489        {
    85             addField("Application", appName);
     90            addField(B_TRANSLATE("Application"), appName);
    8691        }
    8792        BFile appFile(&appInfo.ref, B_READ_ONLY);
    8893        if (appFile.InitCheck() == B_OK)
    AppNodeInfoView::AppNodeInfoView(  
    9398                version_info appVersion;
    9499                if (appFileInfo.GetVersionInfo(&appVersion, B_APP_VERSION_KIND) == B_OK)
    95100                {
    96                     addField("Version", appVersion.long_info);
     101                    addField(B_TRANSLATE("Version"), appVersion.long_info);
    97102                }
    98103            }
    99104        }
    100         addField("Signature", appInfo.signature);
     105        addField(B_TRANSLATE("Signature"), appInfo.signature);
    101106    }
    102107}
    103108
  • src/apps/cortex/InfoView/ConnectionInfoView.cpp

    diff --git a/src/apps/cortex/InfoView/ConnectionInfoView.cpp b/src/apps/cortex/InfoView/ConnectionInfoView.cpp
    index 5b8cf3c..99a7bd2 100644
    a b  
    4040// NodeManager
    4141#include "Connection.h"
    4242
     43// Locale Kit
     44#include <Catalog.h>
    4345// MediaKit
    4446#include <MediaDefs.h>
    4547
     48#undef B_TRANSLATION_CONTEXT
     49#define B_TRANSLATION_CONTEXT "CortexInfoView"
     50
    4651__USE_CORTEX_NAMESPACE
    4752
    4853#include <Debug.h>
    __USE_CORTEX_NAMESPACE  
    5560
    5661ConnectionInfoView::ConnectionInfoView(
    5762    const Connection &connection)
    58     : InfoView("Connection", "", 0),
     63    : InfoView(B_TRANSLATE("Connection"), "", 0),
    5964      m_source(connection.source()),
    6065      m_destination(connection.destination())
    6166{
    6267    D_METHOD(("ConnectionInfoView::ConnectionInfoView()\n"));
    6368
    64     setSideBarWidth(be_plain_font->StringWidth(" Destination ")
     69    setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Destination"))
    6570                    + 2 * InfoView::M_H_MARGIN);
    6671    media_input input;
    6772    media_output output;
    ConnectionInfoView::ConnectionInfoView(  
    7277        if (s.Length() > 0)
    7378            s << " ";
    7479        s << "(" << MediaString::getStringFor(output.source) << ")";
    75         addField("Source", s);
     80        addField(B_TRANSLATE("Source"), s);
    7681    }
    7782    if (connection.getInput(&input) == B_OK) {
    7883        // add "Destination" field
    ConnectionInfoView::ConnectionInfoView(  
    8186        if (s.Length() > 0)
    8287            s << " ";
    8388        s << "(" << MediaString::getStringFor(input.destination) << ")";
    84         addField("Destination", s);
     89        addField(B_TRANSLATE("Destination"), s);
    8590    }
    8691
    8792    // add a separator field
    8893    addField("", "");
    8994
    9095    // add "Media Type" field
    91     addField("Media Type", MediaString::getStringFor(connection.format().type));
     96    addField(B_TRANSLATE("Media type"), MediaString::getStringFor(connection.format().type));
    9297
    9398    // add the format fields
    9499    _addFormatFields(connection.format());
    void ConnectionInfoView::_addFormatFields(  
    110115    switch (format.type) {
    111116        case B_MEDIA_RAW_AUDIO: {
    112117            // adjust view properties
    113             setSideBarWidth(be_plain_font->StringWidth(" Sample Rate ") + 2 * InfoView::M_H_MARGIN);
     118            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Sample rate ")) + 2 * InfoView::M_H_MARGIN);
    114119            BString s;
    115120            // add "Format" field
    116121            s = MediaString::forAudioFormat(format.u.raw_audio.format,
    117122                                            format.u.raw_audio.valid_bits);
    118             addField("Format", s);
     123            addField(B_TRANSLATE("Format"), s);
    119124            // add "Sample Rate" field
    120125            s = MediaString::forAudioFrameRate(format.u.raw_audio.frame_rate);
    121             addField("Sample Rate", s);
     126            addField(B_TRANSLATE("Sample rate"), s);
    122127            // add "Channels" field
    123128            s = MediaString::forAudioChannelCount(format.u.raw_audio.channel_count);
    124             addField("Channels", s);
     129            addField(B_TRANSLATE("Channels"), s);
    125130            // add "Channel Mask" field
    126131            s = MediaString::forAudioChannelMask(format.u.raw_audio.channel_mask);
    127             addField("Channel Mask", s);
     132            addField(B_TRANSLATE("Channel mask"), s);
    128133            // add "Matrix Mask" field
    129134            s = MediaString::forAudioMatrixMask(format.u.raw_audio.matrix_mask);
    130             addField("Matrix Mask", s);
     135            addField(B_TRANSLATE("Matrix mask"), s);
    131136            // add the "Byte Order" field
    132137            s = MediaString::forAudioByteOrder(format.u.raw_audio.byte_order);
    133             addField("Byte Order", s);
     138            addField(B_TRANSLATE("Byte order"), s);
    134139            // add the "Buffer Size" field
    135140            s = MediaString::forAudioBufferSize(format.u.raw_audio.buffer_size);
    136             addField("Buffer Size", s);
     141            addField(B_TRANSLATE("Buffer size"), s);
    137142            break;
    138143        }
    139144        case B_MEDIA_RAW_VIDEO: {
    140145            // adjust view properties
    141             setSideBarWidth(be_plain_font->StringWidth(" Video Data Between ") + 2 * InfoView::M_H_MARGIN);
     146            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Video data between ")) + 2 * InfoView::M_H_MARGIN);
    142147            BString s;
    143148            // add the "Format" field
    144149            s = MediaString::forVideoFormat(format.u.raw_video.display.format);
    145             addField("Format", s);
     150            addField(B_TRANSLATE("Format"), s);
    146151            // add the "Resolution" field
    147152            s = MediaString::forVideoResolution(format.u.raw_video.display.line_width,
    148153                                                format.u.raw_video.display.line_count);
    149             addField("Resolution", s);
     154            addField(B_TRANSLATE("Resolution"), s);
    150155            // add the "Field Rate" field
    151156            s = MediaString::forVideoFieldRate(format.u.raw_video.field_rate,
    152157                                               format.u.raw_video.interlace);
    153             addField("Field Rate", s);
     158            addField(B_TRANSLATE("Field rate"), s);
    154159            // add the "Orientation" field
    155160            s = MediaString::forVideoOrientation(format.u.raw_video.orientation);
    156             addField("Orientation", s);
     161            addField(B_TRANSLATE("Orientation"), s);
    157162            // add the "Aspect Ratio" field
    158163            s = MediaString::forVideoAspectRatio(format.u.raw_video.pixel_width_aspect,
    159164                                                 format.u.raw_video.pixel_height_aspect);
    160             addField("Aspect Ratio", s);
     165            addField(B_TRANSLATE("Aspect ratio"), s);
    161166            // add the "Active Lines" field
    162167            s = MediaString::forVideoActiveLines(format.u.raw_video.first_active,
    163168                                                 format.u.raw_video.last_active);
    164             addField("Active Lines", s);
     169            addField(B_TRANSLATE("Active lines"), s);
    165170            // add the "Offset" field
    166171            s = MediaString::forVideoOffset(format.u.raw_video.display.pixel_offset,
    167172                                            format.u.raw_video.display.line_offset);           
    168             addField("Offset", s);
     173            addField(B_TRANSLATE("Offset"), s);
    169174            break;
    170175        }
    171176        case B_MEDIA_ENCODED_AUDIO: {
    172177            // adjust view properties
    173             setSideBarWidth(be_plain_font->StringWidth(" Frame Size ") + 2 * InfoView::M_H_MARGIN);
     178            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Frame size ")) + 2 * InfoView::M_H_MARGIN);
    174179            BString s;
    175180            // add the "Bit Rate" field
    176181            s = MediaString::forAudioBitRate(format.u.encoded_audio.bit_rate);
    177             addField("Bit Rate", s);
     182            addField(B_TRANSLATE("Bit rate"), s);
    178183            // add the "Frame Size" field
    179184            s = MediaString::forAudioFrameSize(format.u.encoded_audio.frame_size);
    180             addField("Frame Size", s);
     185            addField(B_TRANSLATE("Frame size"), s);
    181186            break;
    182187        }
    183188        case B_MEDIA_ENCODED_VIDEO: {
    184189            // adjust view properties
    185             setSideBarWidth(be_plain_font->StringWidth(" Frame Size ") + 2 * InfoView::M_H_MARGIN);
     190            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Frame size ")) + 2 * InfoView::M_H_MARGIN);
    186191            BString s;
    187192            // add the "Bit Rate" field
    188193            s = MediaString::forVideoBitRate(format.u.encoded_video.avg_bit_rate,
    189194                                             format.u.encoded_video.max_bit_rate);
    190             addField("Bit Rate", s);
     195            addField(B_TRANSLATE("Bit rate"), s);
    191196            // add the "Frame Size" field
    192197            s = MediaString::forVideoFrameSize(format.u.encoded_video.frame_size);
    193             addField("Frame Size", s);
     198            addField(B_TRANSLATE("Frame size"), s);
    194199            // add the "History" field
    195200            s = MediaString::forVideoHistory(format.u.encoded_video.forward_history,
    196201                                             format.u.encoded_video.backward_history);
    197             addField("History", s);
     202            addField(B_TRANSLATE("History"), s);
    198203            break;
    199204        }
    200205        case B_MEDIA_MULTISTREAM: {
    201206            // adjust view properties
    202             setSideBarWidth(be_plain_font->StringWidth(" Chunk Size ") + 2 * InfoView::M_H_MARGIN);
     207            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Chunk size ")) + 2 * InfoView::M_H_MARGIN);
    203208            BString s;
    204209            // add the "Format" field
    205210            s = MediaString::forMultistreamFormat(format.u.multistream.format);
    206             addField("Format", s);
     211            addField(B_TRANSLATE("Format"), s);
    207212            // add the "Bit Rate" field
    208213            s = MediaString::forMultistreamBitRate(format.u.multistream.avg_bit_rate,
    209214                                                   format.u.multistream.max_bit_rate);
    210             addField("Bit Rate", s);
     215            addField(B_TRANSLATE("Bit rate"), s);
    211216            // add the "Chunk Size" field
    212217            s = MediaString::forMultistreamChunkSize(format.u.multistream.avg_chunk_size,
    213218                                                     format.u.multistream.max_chunk_size);
    214             addField("Chunk Size", s);
     219            addField(B_TRANSLATE("Chunk size"), s);
    215220            // add the "Flags" field
    216221            s = MediaString::forMultistreamFlags(format.u.multistream.flags);
    217             addField("Flags", s);
     222            addField(B_TRANSLATE("Flags"), s);
    218223            break;
    219224        }
    220225        default: {
  • src/apps/cortex/InfoView/DormantNodeInfoView.cpp

    diff --git a/src/apps/cortex/InfoView/DormantNodeInfoView.cpp b/src/apps/cortex/InfoView/DormantNodeInfoView.cpp
    index 8193702..23b39dd 100644
    a b  
    3838#include "MediaIcon.h"
    3939#include "MediaString.h"
    4040
     41// Locale Kit
     42#include <Catalog.h>
    4143// Media Kit
    4244#include <MediaAddOn.h>
    4345#include <MediaRoster.h>
    4446
     47#undef B_TRANSLATION_CONTEXT
     48#define B_TRANSLATION_CONTEXT "CortexInfoView"
     49
    4550__USE_CORTEX_NAMESPACE
    4651
    4752#include <Debug.h>
    __USE_CORTEX_NAMESPACE  
    5358
    5459DormantNodeInfoView::DormantNodeInfoView(
    5560    const dormant_node_info &info)
    56     : InfoView(info.name, "Dormant media node",
     61    : InfoView(info.name, B_TRANSLATE("Dormant media node"),
    5762               new MediaIcon(info, B_LARGE_ICON)),
    5863      m_addOnID(info.addon),
    5964      m_flavorID(info.flavor_id)
    DormantNodeInfoView::DormantNodeInfoView(  
    6166    D_METHOD(("DormantNodeInfoView::DormantNodeInfoView()\n"));
    6267
    6368    // adjust view properties
    64     setSideBarWidth(be_plain_font->StringWidth(" Output Formats ") + 2 * InfoView::M_H_MARGIN);
     69    setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Output formats ")) + 2 * InfoView::M_H_MARGIN);
    6570
    6671    BString s;
    6772
    6873    // add the "AddOn ID" field
    6974    s = "";
    7075    s << info.addon;
    71     addField("AddOn ID", s);
     76    addField(B_TRANSLATE("AddOn ID"), s);
    7277
    7378    // add the "Flavor ID" field
    7479    s = "";
    7580    s << info.flavor_id;
    76     addField("Flavor ID", s);
     81    addField(B_TRANSLATE("Flavor ID"), s);
    7782   
    7883    // add separator field
    7984    addField("", "");
    DormantNodeInfoView::DormantNodeInfoView(  
    8489    {
    8590        // add the "Description" field
    8691        s = flavorInfo.info;
    87         addField("Description", s);
     92        addField(B_TRANSLATE("Description"), s);
    8893
    8994        // add "Kinds" field
    90         addField("Kinds", MediaString::getStringFor(static_cast<node_kind>(flavorInfo.kinds)));
     95        addField(B_TRANSLATE("Kinds"), MediaString::getStringFor(static_cast<node_kind>(flavorInfo.kinds)));
    9196
    9297        // add "Flavor Flags" field
    93         addField("Flavor flags", "?");
     98        addField(B_TRANSLATE("Flavor flags"), "?");
    9499
    95100        // add "Max. instances" field
    96101        if (flavorInfo.possible_count > 0)
    DormantNodeInfoView::DormantNodeInfoView(  
    100105        }
    101106        else
    102107        {
    103             s = "Any number";
     108            s = B_TRANSLATE("Any number");
    104109        }
    105         addField("Max. instances", s);
     110        addField(B_TRANSLATE("Max. instances"), s);
    106111
    107112        // add "Input Formats" field
    108113        if (flavorInfo.in_format_count > 0)
    109114        {
    110115            if (flavorInfo.in_format_count == 1)
    111116            {
    112                 addField("Input format", MediaString::getStringFor(flavorInfo.in_formats[0], false));
     117                addField(B_TRANSLATE("Input format"), MediaString::getStringFor(flavorInfo.in_formats[0], false));
    113118            }
    114119            else
    115120            {
    116                 addField("Input formats", "");
     121                addField(B_TRANSLATE("Input formats"), "");
    117122                for (int32 i = 0; i < flavorInfo.in_format_count; i++)
    118123                {
    119124                    s = "";
    DormantNodeInfoView::DormantNodeInfoView(  
    128133        {
    129134            if (flavorInfo.out_format_count == 1)
    130135            {
    131                 addField("Output format", MediaString::getStringFor(flavorInfo.out_formats[0], false));
     136                addField(B_TRANSLATE("Output format"), MediaString::getStringFor(flavorInfo.out_formats[0], false));
    132137            }
    133138            else
    134139            {
    135                 addField("Output formats", "");
     140                addField(B_TRANSLATE("Output formats"), "");
    136141                for (int32 i = 0; i < flavorInfo.out_format_count; i++)
    137142                {
    138143                    s = "";
  • src/apps/cortex/InfoView/EndPointInfoView.cpp

    diff --git a/src/apps/cortex/InfoView/EndPointInfoView.cpp b/src/apps/cortex/InfoView/EndPointInfoView.cpp
    index 6107fca..608be37 100644
    a b  
    3838#include "MediaIcon.h"
    3939#include "MediaString.h"
    4040
     41// Locale Kit
     42#include <Catalog.h>
     43
     44#undef B_TRANSLATION_CONTEXT
     45#define B_TRANSLATION_CONTEXT "CortexInfoView"
     46
    4147__USE_CORTEX_NAMESPACE
    4248
    4349#include <Debug.h>
    __USE_CORTEX_NAMESPACE  
    4955
    5056EndPointInfoView::EndPointInfoView(
    5157    const media_input &input)
    52     : InfoView(input.name, "Media input", 0),
     58    : InfoView(input.name, B_TRANSLATE("Media input"), 0),
    5359      m_output(false),
    5460      m_port(input.destination.port),
    5561      m_id(input.destination.id) {
    5662    D_METHOD(("EndPointInfoView::EndPointInfoView(input)\n"));
    5763
    58     setSideBarWidth(be_plain_font->StringWidth(" Destination ")
     64    setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Destination "))
    5965                    + 2 * InfoView::M_H_MARGIN);
    6066
    6167    // add "Source" field
    62     addField("Source", MediaString::getStringFor(input.source));
     68    addField(B_TRANSLATE("Source"), MediaString::getStringFor(input.source));
    6369
    6470    // add "Destination" field
    65     addField("Destination", MediaString::getStringFor(input.destination));
     71    addField(B_TRANSLATE("Destination"), MediaString::getStringFor(input.destination));
    6672   
    6773    // add a separator field
    6874    addField("", "");
    6975
    7076    // add "Media Type" field
    71     addField("Media type", MediaString::getStringFor(input.format.type));
     77    addField(B_TRANSLATE("Media type"), MediaString::getStringFor(input.format.type));
    7278
    7379    _addFormatFields(input.format);
    7480}
    7581
    7682EndPointInfoView::EndPointInfoView(
    7783    const media_output &output)
    78     : InfoView(output.name, "Media output", 0),
     84    : InfoView(output.name, B_TRANSLATE("Media output"), 0),
    7985      m_output(true),
    8086      m_port(output.source.port),
    8187      m_id(output.source.id) {
    8288    D_METHOD(("EndPointInfoView::EndPointInfoView(output)\n"));
    8389
    84     setSideBarWidth(be_plain_font->StringWidth(" Destination ")
     90    setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Destination "))
    8591                    + 2 * InfoView::M_H_MARGIN);
    8692
    8793    // add "Source" field
    88     addField("Source", MediaString::getStringFor(output.source));
     94    addField(B_TRANSLATE("Source"), MediaString::getStringFor(output.source));
    8995
    9096    // add "Destination" field
    91     addField("Destination", MediaString::getStringFor(output.destination));
     97    addField(B_TRANSLATE("Destination"), MediaString::getStringFor(output.destination));
    9298   
    9399    // add a separator field
    94100    addField("", "");
    95101
    96102    // add "Media Type" field
    97     addField("Media type", MediaString::getStringFor(output.format.type));
     103    addField(B_TRANSLATE("Media type"), MediaString::getStringFor(output.format.type));
    98104
    99105    _addFormatFields(output.format);
    100106}
    void EndPointInfoView::_addFormatFields(  
    140146    switch (format.type) {
    141147        case B_MEDIA_RAW_AUDIO: {
    142148            // adjust view properties
    143             setSideBarWidth(be_plain_font->StringWidth(" Sample Rate ") + 2 * InfoView::M_H_MARGIN);
     149            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Sample rate ")) + 2 * InfoView::M_H_MARGIN);
    144150            BString s;
    145151            // add "Format" field
    146152            s = MediaString::forAudioFormat(format.u.raw_audio.format,
    147153                                            format.u.raw_audio.valid_bits);
    148             addField("Format", s);
     154            addField(B_TRANSLATE("Format"), s);
    149155            // add "Sample Rate" field
    150156            s = MediaString::forAudioFrameRate(format.u.raw_audio.frame_rate);
    151             addField("Sample rate", s);
     157            addField(B_TRANSLATE("Sample rate"), s);
    152158            // add "Channels" field
    153159            s = MediaString::forAudioChannelCount(format.u.raw_audio.channel_count);
    154             addField("Channels", s);
     160            addField(B_TRANSLATE("Channels"), s);
    155161            // add "Channel Mask" field
    156162            s = MediaString::forAudioChannelMask(format.u.raw_audio.channel_mask);
    157             addField("Channel mask", s);
     163            addField(B_TRANSLATE("Channel mask"), s);
    158164            // add "Matrix Mask" field
    159165            s = MediaString::forAudioMatrixMask(format.u.raw_audio.matrix_mask);
    160             addField("Matrix mask", s);
     166            addField(B_TRANSLATE("Matrix mask"), s);
    161167            // add the "Byte Order" field
    162168            s = MediaString::forAudioByteOrder(format.u.raw_audio.byte_order);
    163             addField("Byte order", s);
     169            addField(B_TRANSLATE("Byte order"), s);
    164170            // add the "Buffer Size" field
    165171            s = MediaString::forAudioBufferSize(format.u.raw_audio.buffer_size);
    166             addField("Buffer size", s);
     172            addField(B_TRANSLATE("Buffer size"), s);
    167173            break;
    168174        }
    169175        case B_MEDIA_RAW_VIDEO: {
    170176            // adjust view properties
    171             setSideBarWidth(be_plain_font->StringWidth(" Video Data Between ") + 2 * InfoView::M_H_MARGIN);
     177            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Video data between ")) + 2 * InfoView::M_H_MARGIN);
    172178            BString s;
    173179            // add the "Format" field
    174180            s = MediaString::forVideoFormat(format.u.raw_video.display.format);
    175             addField("Format", s);
     181            addField(B_TRANSLATE("Format"), s);
    176182            // add the "Resolution" field
    177183            s = MediaString::forVideoResolution(format.u.raw_video.display.line_width,
    178184                                                format.u.raw_video.display.line_count);
    179             addField("Resolution", s);
     185            addField(B_TRANSLATE("Resolution"), s);
    180186            // add the "Field Rate" field
    181187            s = MediaString::forVideoFieldRate(format.u.raw_video.field_rate,
    182188                                               format.u.raw_video.interlace);
    183             addField("Field rate", s);
     189            addField(B_TRANSLATE("Field rate"), s);
    184190            // add the "Orientation" field
    185191            s = MediaString::forVideoOrientation(format.u.raw_video.orientation);
    186             addField("Orientation", s);
     192            addField(B_TRANSLATE("Orientation"), s);
    187193            // add the "Aspect Ratio" field
    188194            s = MediaString::forVideoAspectRatio(format.u.raw_video.pixel_width_aspect,
    189195                                                 format.u.raw_video.pixel_height_aspect);
    190             addField("Aspect ratio", s);
     196            addField(B_TRANSLATE("Aspect ratio"), s);
    191197            // add the "Active Lines" field
    192198            s = MediaString::forVideoActiveLines(format.u.raw_video.first_active,
    193199                                                 format.u.raw_video.last_active);
    194             addField("Active lines", s);
     200            addField(B_TRANSLATE("Active lines"), s);
    195201            // add the "Offset" field
    196202            s = MediaString::forVideoOffset(format.u.raw_video.display.pixel_offset,
    197203                                            format.u.raw_video.display.line_offset);           
    198             addField("Offset", s);
     204            addField(B_TRANSLATE("Offset"), s);
    199205            break;
    200206        }
    201207        case B_MEDIA_ENCODED_AUDIO: {
    202208            // adjust view properties
    203             setSideBarWidth(be_plain_font->StringWidth(" Frame Size ") + 2 * InfoView::M_H_MARGIN);
     209            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Frame size ")) + 2 * InfoView::M_H_MARGIN);
    204210            BString s;
    205211            // add the "Bit Rate" field
    206212            s = MediaString::forAudioBitRate(format.u.encoded_audio.bit_rate);
    207             addField("Bit rate", s);
     213            addField(B_TRANSLATE("Bit rate"), s);
    208214            // add the "Frame Size" field
    209215            s = MediaString::forAudioFrameSize(format.u.encoded_audio.frame_size);
    210             addField("Frame size", s);
     216            addField(B_TRANSLATE("Frame size"), s);
    211217            break;
    212218        }
    213219        case B_MEDIA_ENCODED_VIDEO: {
    214220            // adjust view properties
    215             setSideBarWidth(be_plain_font->StringWidth(" Frame Size ") + 2 * InfoView::M_H_MARGIN);
     221            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Frame size ")) + 2 * InfoView::M_H_MARGIN);
    216222            BString s;
    217223            // add the "Bit Rate" field
    218224            s = MediaString::forVideoBitRate(format.u.encoded_video.avg_bit_rate,
    219225                                             format.u.encoded_video.max_bit_rate);
    220             addField("Bit rate", s);
     226            addField(B_TRANSLATE("Bit rate"), s);
    221227            // add the "Frame Size" field
    222228            s = MediaString::forVideoFrameSize(format.u.encoded_video.frame_size);
    223             addField("Frame size", s);
     229            addField(B_TRANSLATE("Frame size"), s);
    224230            // add the "History" field
    225231            s = MediaString::forVideoHistory(format.u.encoded_video.forward_history,
    226232                                             format.u.encoded_video.backward_history);
    227             addField("History", s);
     233            addField(B_TRANSLATE("History"), s);
    228234            break;
    229235        }
    230236        case B_MEDIA_MULTISTREAM: {
    231237            // adjust view properties
    232             setSideBarWidth(be_plain_font->StringWidth(" Chunk Size ") + 2 * InfoView::M_H_MARGIN);
     238            setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Chunk size ")) + 2 * InfoView::M_H_MARGIN);
    233239            BString s;
    234240            // add the "Format" field
    235241            s = MediaString::forMultistreamFormat(format.u.multistream.format);
    236             addField("Format", s);
     242            addField(B_TRANSLATE("Format"), s);
    237243            // add the "Bit Rate" field
    238244            s = MediaString::forMultistreamBitRate(format.u.multistream.avg_bit_rate,
    239245                                                   format.u.multistream.max_bit_rate);
    240             addField("Bit rate", s);
     246            addField(B_TRANSLATE("Bit rate"), s);
    241247            // add the "Chunk Size" field
    242248            s = MediaString::forMultistreamChunkSize(format.u.multistream.avg_chunk_size,
    243249                                                     format.u.multistream.max_chunk_size);
    244             addField("Chunk size", s);
     250            addField(B_TRANSLATE("Chunk size"), s);
    245251            // add the "Flags" field
    246252            s = MediaString::forMultistreamFlags(format.u.multistream.flags);
    247             addField("Flags", s);
     253            addField(B_TRANSLATE("Flags"), s);
    248254            break;
    249255        }
    250256        default: {
  • src/apps/cortex/InfoView/FileNodeInfoView.cpp

    diff --git a/src/apps/cortex/InfoView/FileNodeInfoView.cpp b/src/apps/cortex/InfoView/FileNodeInfoView.cpp
    index 1922d92..11cd550 100644
    a b  
    3636#include "MediaString.h"
    3737#include "NodeRef.h"
    3838
     39#include <Catalog.h>
    3940#include <MediaFile.h>
    4041#include <MediaNode.h>
    4142#include <MediaRoster.h>
    4243#include <MediaTrack.h>
    4344#include <TimeCode.h>
    4445
     46#undef B_TRANSLATION_CONTEXT
     47#define B_TRANSLATION_CONTEXT "CortexInfoView"
     48
    4549__USE_CORTEX_NAMESPACE
    4650
    4751#include <Debug.h>
    FileNodeInfoView::FileNodeInfoView(  
    5862    D_METHOD(("FileNodeInfoView::FileNodeInfoView()\n"));
    5963
    6064    // adjust view properties
    61     setSideBarWidth(be_plain_font->StringWidth(" File Format ") + 2 * InfoView::M_H_MARGIN);
    62     setSubTitle("Live File-Interface Node");
     65    setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" File format ")) + 2 * InfoView::M_H_MARGIN);
     66    setSubTitle(B_TRANSLATE("Live file-interface node"));
    6367
    6468    // if a ref is set for this file-interface display some info
    6569    // thru MediaFile and set the title appropriatly
    FileNodeInfoView::FileNodeInfoView(  
    8286            {
    8387                s = "";
    8488                s << format.pretty_name << " (" << format.mime_type << ")";
    85                 addField("File Format", s);
     89                addField(B_TRANSLATE("File format"), s);
    8690            }
    8791           
    8892            // add "Copyright" field
    FileNodeInfoView::FileNodeInfoView(  
    9094            if (copyRight)
    9195            {
    9296                s = copyRight;
    93                 addField("Copyright", s);
     97                addField(B_TRANSLATE("Copyright"), s);
    9498            }
    9599   
    96100            // add "Tracks" list
    97101            if (file.CountTracks() > 0)
    98102            {
    99                 addField("Tracks", "");
     103                addField(B_TRANSLATE("Tracks"), "");
    100104                for (int32 i = 0; i < file.CountTracks(); i++)
    101105                {
    102106                    BString label;
    FileNodeInfoView::FileNodeInfoView(  
    117121                        media_codec_info codec;
    118122                        if (track->GetCodecInfo(&codec) == B_OK)
    119123                        {
    120                             s << "\n- Codec: " << codec.pretty_name;
     124                            s << B_TRANSLATE("\n- Codec: ") << codec.pretty_name;
    121125                            if (codec.id > 0)
    122126                            {
    123                                 s << " (ID: " << codec.id << ")";
     127                                s << B_TRANSLATE(" (ID: ") << codec.id << ")";
    124128                            }
    125129                        }
    126130                    }
    FileNodeInfoView::FileNodeInfoView(  
    131135                    us_to_timecode(duration, &hours, &minutes, &seconds, &frames);
    132136                    char buffer[64];
    133137                    sprintf(buffer, "%02d:%02d:%02d:%02d", hours, minutes, seconds, frames);
    134                     s << "\n- Duration: " << buffer;
     138                    s << B_TRANSLATE("\n- Duration: ") << buffer;
    135139                   
    136140                    // add quality
    137141                    float quality;
    138142                    if (track->GetQuality(&quality) == B_OK)
    139143                    {
    140                         s << "\n- Quality: " << quality;
     144                        s << B_TRANSLATE("\n- Quality: ") << quality;
    141145                    }
    142146                    addField(label, s);
    143147                }
    FileNodeInfoView::FileNodeInfoView(  
    153157    {
    154158        // set title
    155159        title = ref->name();
    156         title += " (no file)";
     160        title += B_TRANSLATE(" (no file)");
    157161    }
    158162    setTitle(title);
    159163}
  • src/apps/cortex/InfoView/InfoView.cpp

    diff --git a/src/apps/cortex/InfoView/InfoView.cpp b/src/apps/cortex/InfoView/InfoView.cpp
    index b1d9c77..60deccb 100644
    a b  
    3636
    3737#include "array_delete.h"
    3838
     39// Locale Kit
     40#include <Catalog.h>
    3941// Interface Kit
    4042#include <Bitmap.h>
    4143#include <Region.h>
     
    4850// Support Kit
    4951#include <List.h>
    5052
     53#undef B_TRANSLATION_CONTEXT
     54#define B_TRANSLATION_CONTEXT "CortexInfoView"
     55
    5156__USE_CORTEX_NAMESPACE
    5257
    5358#include <Debug.h>
    void InfoView::AttachedToWindow() {  
    176181
    177182    // adjust the windows title
    178183    BString title = m_title;
    179     title << " info";
     184    title << B_TRANSLATE(" info");
    180185    Window()->SetTitle(title.String());
    181186   
    182187    // calculate the area occupied by title, subtitle and icon
  • src/apps/cortex/InfoView/Jamfile

    diff --git a/src/apps/cortex/InfoView/Jamfile b/src/apps/cortex/InfoView/Jamfile
    index f42989b..a8619a5 100644
    a b StaticLibrary cortex_info_view.a :  
    1818    InfoWindow.cpp
    1919    InfoWindowManager.cpp
    2020    LiveNodeInfoView.cpp
     21    : be $(HAIKU_LOCALE_LIBS)
    2122;
  • src/apps/cortex/InfoView/LiveNodeInfoView.cpp

    diff --git a/src/apps/cortex/InfoView/LiveNodeInfoView.cpp b/src/apps/cortex/InfoView/LiveNodeInfoView.cpp
    index 354eadd..240d35e 100644
    a b  
    4141#include "MediaIcon.h"
    4242#include "MediaString.h"
    4343
     44// Locale Kit
     45#include <Catalog.h>
     46
    4447// Media Kit
    4548#include <MediaNode.h>
    4649
    4750// Interface Kit
    4851#include <Window.h>
    4952
     53#undef B_TRANSLATION_CONTEXT
     54#define B_TRANSLATION_CONTEXT "CortexInfoView"
     55
    5056__USE_CORTEX_NAMESPACE
    5157
    5258#include <Debug.h>
    __USE_CORTEX_NAMESPACE  
    5965
    6066LiveNodeInfoView::LiveNodeInfoView(
    6167    const NodeRef *ref)
    62     : InfoView(ref->name(), "Live Media Node",
     68    : InfoView(ref->name(), B_TRANSLATE("Live media node"),
    6369               new MediaIcon(ref->nodeInfo(), B_LARGE_ICON)),
    6470      m_nodeID(ref->id())
    6571{
    6672    D_METHOD(("LiveNodeInfoView::LiveNodeInfoView()\n"));
    6773
    6874    // adjust view properties
    69     setSideBarWidth(be_plain_font->StringWidth(" Run Mode ") + 2 * InfoView::M_H_MARGIN);
     75    setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE(" Run mode ")) + 2 * InfoView::M_H_MARGIN);
    7076
    7177    // add "Node ID" field
    7278    BString s;
    7379    s << ref->id();
    74     addField("Node ID", s);
     80    addField(B_TRANSLATE("Node ID"), s);
    7581
    7682    // add "Port" field
    7783    s = "";
    LiveNodeInfoView::LiveNodeInfoView(  
    8187    {
    8288        s << " (" << portInfo.name << ")";
    8389    }
    84     addField("Port", s);
     90    addField(B_TRANSLATE("Port"), s);
    8591
    8692    // add separator field
    8793    addField("", "");
    8894
    8995    // add "Kinds" field
    90     addField("Kinds", MediaString::getStringFor(static_cast<node_kind>(ref->kind())));
     96    addField(B_TRANSLATE("Kinds"), MediaString::getStringFor(static_cast<node_kind>(ref->kind())));
    9197
    9298    // add "Run Mode" field
    9399    BMediaNode::run_mode runMode = static_cast<BMediaNode::run_mode>(ref->runMode());
    LiveNodeInfoView::LiveNodeInfoView(  
    99105            runMode = group->runMode();
    100106        }
    101107    }
    102     addField("Run Mode", MediaString::getStringFor(runMode));
     108    addField(B_TRANSLATE("Run mode"), MediaString::getStringFor(runMode));
    103109
    104110    // add "Latency" field
    105111    bigtime_t latency;
    LiveNodeInfoView::LiveNodeInfoView(  
    114120        {
    115121            s = "?";
    116122        }
    117         addField("Latency", s);
     123        addField(B_TRANSLATE("Latency"), s);
    118124    }
    119125}
    120126
  • src/apps/cortex/MediaRoutingView/Jamfile

    diff --git a/src/apps/cortex/MediaRoutingView/Jamfile b/src/apps/cortex/MediaRoutingView/Jamfile
    index c18a1c7..e1f6133 100644
    a b StaticLibrary cortex_media_routing_view.a :  
    2222    MediaNodePanel.cpp
    2323    MediaRoutingView.cpp
    2424    MediaWire.cpp
     25    : $(HAIKU_LOCALE_LIBS)
    2526;
  • src/apps/cortex/MediaRoutingView/MediaJack.cpp

    diff --git a/src/apps/cortex/MediaRoutingView/MediaJack.cpp b/src/apps/cortex/MediaRoutingView/MediaJack.cpp
    index dda28d7..c6403a3 100644
    a b  
    5151#include <Bitmap.h>
    5252#include <MenuItem.h>
    5353#include <PopUpMenu.h>
     54// Locale Kit
     55#include <Catalog.h>
     56
     57#undef B_TRANSLATION_CONTEXT
     58#define B_TRANSLATION_CONTEXT "CortexMediaRoutingView"
    5459
    5560__USE_CORTEX_NAMESPACE
    5661
    MediaJack::MediaJack(  
    8893    D_METHOD(("MediaJack::MediaJack()\n"));
    8994    makeSelectable(false);
    9095    if (m_label == "")
    91         m_label = "Input";
     96        m_label = B_TRANSLATE("Input");
    9297    _updateAbbreviation();
    9398}
    9499
    MediaJack::MediaJack(  
    108113    D_METHOD(("MediaJack::MediaJack()\n"));
    109114    makeSelectable(false);
    110115    if (m_label == "")
    111         m_label = "Output";
     116        m_label = B_TRANSLATE("Output");
    112117    _updateAbbreviation();
    113118}
    114119
    void MediaJack::showContextMenu(  
    749754        BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
    750755        message->AddData("input", B_RAW_TYPE,
    751756                         reinterpret_cast<const void *>(&input), sizeof(input));
    752         menu->AddItem(item = new BMenuItem("Get info", message));
     757        menu->AddItem(item = new BMenuItem(B_TRANSLATE("Get info"), message));
    753758    }
    754759    else if (isOutput())
    755760    {
    void MediaJack::showContextMenu(  
    758763        BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
    759764        message->AddData("output", B_RAW_TYPE,
    760765                         reinterpret_cast<const void *>(&output), sizeof(output));
    761         menu->AddItem(item = new BMenuItem("Get info", message));
     766        menu->AddItem(item = new BMenuItem(B_TRANSLATE("Get info"), message));
    762767    }
    763768
    764769    menu->SetTargetForItems(view());
  • src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp

    diff --git a/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp b/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp
    index 92d6864..cab0999 100644
    a b  
    6262// Media Kit
    6363#include <MediaDefs.h>
    6464#include <MediaRoster.h>
     65// Locale Kit
     66#include <Catalog.h>
     67
     68#undef B_TRANSLATION_CONTEXT
     69#define B_TRANSLATION_CONTEXT "CortexMediaNodePanel"
    6570
    6671using namespace std;
    6772
    void MediaNodePanel::showContextMenu(  
    564569
    565570    // add the "Tweak Parameters" item
    566571    message = new BMessage(MediaRoutingView::M_NODE_TWEAK_PARAMETERS);
    567     menu->AddItem(item = new BMenuItem("Tweak parameters", message, 'P'));
     572    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Tweak parameters"), message, 'P'));
    568573    if (!(ref->kind() & B_CONTROLLABLE))
    569574    {
    570575        item->SetEnabled(false);
    void MediaNodePanel::showContextMenu(  
    572577
    573578    message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
    574579    message->AddInt32("nodeID", ref->id());
    575     menu->AddItem(new BMenuItem("Get info", message, 'I'));
     580    menu->AddItem(new BMenuItem(B_TRANSLATE("Get info"), message, 'I'));
    576581    menu->AddSeparatorItem();
    577582
    578     menu->AddItem(item = new BMenuItem("Release", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T'));
     583    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Release"), new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T'));
    579584    if (!ref->isInternal())
    580585    {
    581586        item->SetEnabled(false);
    void MediaNodePanel::showContextMenu(  
    585590    // add the "Cycle" item
    586591    message = new BMessage(MediaRoutingView::M_NODE_CHANGE_CYCLING);
    587592    message->AddBool("cycle", !ref->isCycling());
    588     menu->AddItem(item = new BMenuItem("Cycle", message));
     593    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Cycle"), message));
    589594    item->SetMarked(ref->isCycling());
    590595    if (ref->flags() & NodeRef::NO_SEEK)
    591596    {
    void MediaNodePanel::showContextMenu(  
    593598    }
    594599
    595600    // add the "Run Mode" sub menu
    596     BMenu *subMenu = new BMenu("Run mode");
     601    BMenu *subMenu = new BMenu(B_TRANSLATE("Run mode"));
    597602    subMenu->SetFont(be_plain_font);
    598603    for (uint32 runMode = 1; runMode <= BMediaNode::B_RECORDING; runMode++)
    599604    {
    void MediaNodePanel::showContextMenu(  
    615620    subMenu->AddSeparatorItem();
    616621    message = new BMessage(MediaRoutingView::M_NODE_CHANGE_RUN_MODE);
    617622    message->AddInt32("run_mode", 0);
    618     subMenu->AddItem(item = new BMenuItem("(same as group)", message));
     623    subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("(same as group)"), message));
    619624    if (ref->group() == 0)
    620625    {
    621626        item->SetEnabled(false);
    void MediaNodePanel::showContextMenu(  
    628633    subMenu->SetTargetForItems(view());
    629634   
    630635    // [c.lenz 24dec99] hide rarely used commands in a 'Advanced' submenu
    631     subMenu = new BMenu("Advanced");
     636    subMenu = new BMenu(B_TRANSLATE("Advanced"));
    632637    subMenu->SetFont(be_plain_font);
    633638    // [e.moon 5dec99] ad-hoc timesource support
    634639    if(ref->kind() & B_TIME_SOURCE) {
    635640        message = new BMessage(MediaRoutingView::M_NODE_START_TIME_SOURCE);
    636641        message->AddInt32("nodeID", ref->id());
    637642        subMenu->AddItem(new BMenuItem(
    638             "Start time source",
     643            B_TRANSLATE("Start time source"),
    639644            message));
    640645        message = new BMessage(MediaRoutingView::M_NODE_START_TIME_SOURCE);
    641646        message->AddInt32("nodeID", ref->id());
    642647        subMenu->AddItem(new BMenuItem(
    643             "Stop time source",
     648            B_TRANSLATE("Stop time source"),
    644649            message));
    645650    }
    646651    // [c.lenz 24dec99] support for BControllable::StartControlPanel()
    void MediaNodePanel::showContextMenu(  
    648653        if (subMenu->CountItems() > 0)
    649654            subMenu->AddSeparatorItem();
    650655        message = new BMessage(MediaRoutingView::M_NODE_START_CONTROL_PANEL);
    651         subMenu->AddItem(new BMenuItem("Start Control Panel", message,
     656        subMenu->AddItem(new BMenuItem(B_TRANSLATE("Start control panel"), message,
    652657                                       'P', B_COMMAND_KEY | B_SHIFT_KEY));
    653658    }
    654659    // [em 1feb00] group tweaks
    void MediaNodePanel::showContextMenu(  
    662667            subMenu->AddSeparatorItem();
    663668        subMenu->AddItem(
    664669            new BMenuItem(
    665                 isLocked ? "Unlock group" : "Lock group", message));
     670                isLocked ? B_TRANSLATE("Unlock group") : B_TRANSLATE("Lock group"), message));
    666671    }
    667672   
    668673    if (subMenu->CountItems() > 0)
  • src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp

    diff --git a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp
    index b2290a0..e70c325 100644
    a b  
    7171// Translation Kit
    7272#include <BitmapStream.h>
    7373#include <TranslatorRoster.h>
     74// Locale Kit
     75#include <Catalog.h>
     76
     77#undef B_TRANSLATION_CONTEXT
     78#define B_TRANSLATION_CONTEXT "CortexMediaRoutingView"
    7479
    7580__USE_CORTEX_NAMESPACE
    7681
    MediaRoutingView::MessageDropped(BPoint point, BMessage *message)  
    268273                            m_lastDropPoint = Align(ConvertFromScreen(dropPoint - dropOffset));
    269274                        } else {
    270275                            BString s;
    271                             s << "Could not instantiate '" << info.name << "'";
     276                            s << B_TRANSLATE("Could not instantiate") << " '" << info.name << "'";
    272277                            showErrorMessage(s, error);
    273278                        }
    274279                    }   
    void MediaRoutingView::showContextMenu(  
    942947    BMenuItem *item;
    943948    BMessage *message = new BMessage(M_LAYOUT_CHANGED);
    944949    message->AddInt32("layout", M_ICON_VIEW);
    945     menu->AddItem(item = new BMenuItem("Icon view", message));
     950    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Icon view"), message));
    946951    if (m_layout == M_ICON_VIEW)
    947952    {
    948953        item->SetMarked(true);
    949954    }
    950955    message = new BMessage(M_LAYOUT_CHANGED);
    951956    message->AddInt32("layout", M_MINI_ICON_VIEW);
    952     menu->AddItem(item = new BMenuItem("Mini icon view", message));
     957    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Mini icon view"), message));
    953958    if (m_layout == M_MINI_ICON_VIEW)
    954959    {
    955960        item->SetMarked(true);
    void MediaRoutingView::showContextMenu(  
    957962    menu->AddSeparatorItem();
    958963
    959964    // add 'CleanUp' command
    960     menu->AddItem(new BMenuItem("Clean up", new BMessage(M_CLEANUP_REQUESTED), 'K'));
     965    menu->AddItem(new BMenuItem(B_TRANSLATE("Clean up"), new BMessage(M_CLEANUP_REQUESTED), 'K'));
    961966
    962967    // add 'Select All' command
    963     menu->AddItem(new BMenuItem("Select all", new BMessage(M_SELECT_ALL), 'A'));
     968    menu->AddItem(new BMenuItem(B_TRANSLATE("Select all"), new BMessage(M_SELECT_ALL), 'A'));
    964969
    965970    menu->SetTargetForItems(this);
    966971    ConvertToScreen(&point);
    void MediaRoutingView::showErrorMessage(  
    986991    BMessenger messenger(0, Window());
    987992    if (!messenger.IsValid()
    988993     || (messenger.SendMessage(&message) != B_OK)) {
    989         BAlert *alert = new BAlert("Error", text.String(), "OK", 0, 0,
     994        BAlert *alert = new BAlert("Error", text.String(), B_TRANSLATE("OK"), 0, 0,
    990995                                   B_WIDTH_AS_USUAL, B_WARNING_ALERT);
    991996        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
    992997        alert->Go();
    void MediaRoutingView::_initLayout()  
    14651470            font_height fh;
    14661471            be_plain_font->GetHeight(&fh);
    14671472            labelWidth = 4 * MediaNodePanel::M_LABEL_H_MARGIN
    1468                          + be_plain_font->StringWidth(" Be Audio Mixer ");
     1473                         + be_plain_font->StringWidth(B_TRANSLATE(" Be audio mixer "));
    14691474            bodyWidth = 2 * MediaNodePanel::M_BODY_H_MARGIN + B_LARGE_ICON
    14701475                        + 2 * MediaJack::M_DEFAULT_WIDTH;
    14711476            labelHeight = 2 * MediaNodePanel::M_LABEL_V_MARGIN
    void MediaRoutingView::_initLayout()  
    14881493            font_height fh;
    14891494            be_plain_font->GetHeight(&fh);
    14901495            labelWidth = 4 * MediaNodePanel::M_LABEL_H_MARGIN
    1491                          + be_plain_font->StringWidth(" Be Audio Mixer ");
     1496                         + be_plain_font->StringWidth(B_TRANSLATE(" Be audio mixer "));
    14921497            bodyWidth = 2 * MediaNodePanel::M_BODY_H_MARGIN + B_MINI_ICON;
    14931498            labelHeight = 3 * MediaNodePanel::M_LABEL_V_MARGIN
    14941499                          + fh.ascent + fh.descent + fh.leading
    void MediaRoutingView::_initContent()  
    15321537    NodeRef* videoIn = manager->videoInputNode();
    15331538    if (videoIn)
    15341539    {
    1535         group = manager->createGroup("Video input");
     1540        group = manager->createGroup(B_TRANSLATE("Video input"));
    15361541        group->setRunMode(BMediaNode::B_RECORDING);
    15371542        group->addNode(videoIn);
    15381543    }
    15391544    NodeRef* audioIn = manager->audioInputNode();
    15401545    if (audioIn)
    15411546    {
    1542         group = manager->createGroup("Audio input");
     1547        group = manager->createGroup(B_TRANSLATE("Audio input"));
    15431548        group->setRunMode(BMediaNode::B_RECORDING);
    15441549        group->addNode(audioIn);
    15451550    }
    15461551    NodeRef* videoOut = manager->videoOutputNode();
    15471552    if (videoOut)
    15481553    {
    1549         group = manager->createGroup("Video output");
     1554        group = manager->createGroup(B_TRANSLATE("Video output"));
    15501555        group->addNode(videoOut);
    15511556    }
    15521557}
    void MediaRoutingView::_deleteSelection()  
    16731678                if (error)
    16741679                {
    16751680                    BString s;
    1676                     s << "Could not release '" << panel->ref->name() << "'";
     1681                    s << B_TRANSLATE("Could not release") << " '" << panel->ref->name() << "'";
    16771682                    showErrorMessage(s, error);
    16781683                }
    16791684            }           
    void MediaRoutingView::_deleteSelection()  
    16891694                status_t error = manager->disconnect(wire->connection);
    16901695                if (error)
    16911696                {
    1692                     showErrorMessage("Could not disconnect", error);
     1697                    showErrorMessage(B_TRANSLATE("Could not disconnect"), error);
    16931698                }
    16941699            }
    16951700        }
    void MediaRoutingView::_checkDroppedFile(  
    17531758                            BEntry entry(ref);
    17541759                            entry.GetName(fileName);
    17551760                            BString s;
    1756                             s << "Could not load '" << fileName << "'";
     1761                            s << B_TRANSLATE("Could not load") << " '" << fileName << "'";
    17571762                            showErrorMessage(s, error);
    17581763                        }
    17591764                    }
  • src/apps/cortex/MediaRoutingView/MediaWire.cpp

    diff --git a/src/apps/cortex/MediaRoutingView/MediaWire.cpp b/src/apps/cortex/MediaRoutingView/MediaWire.cpp
    index 8f40f36..92b00ad 100644
    a b  
    5151#include <PopUpMenu.h>
    5252// Media Kit
    5353#include <MediaDefs.h>
     54// Locale Kit
     55#include <Catalog.h>
     56
     57#undef B_TRANSLATION_CONTEXT
     58#define B_TRANSLATION_CONTEXT "CortexMediaRoutingView"
    5459
    5560__USE_CORTEX_NAMESPACE
    5661
    void MediaWire::showContextMenu(  
    322327    BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
    323328    message->AddData("connection", B_RAW_TYPE,
    324329                     reinterpret_cast<const void *>(&output), sizeof(output));
    325     menu->AddItem(item = new BMenuItem("Get info", message, 'I'));
     330    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Get info"), message, 'I'));
    326331
    327332    // add the "Disconnect" item
    328     menu->AddItem(item = new BMenuItem("Disconnect", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T'));
     333    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Disconnect"), new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T'));
    329334    if (connection.flags() & Connection::LOCKED)
    330335    {
    331336        item->SetEnabled(false);
  • src/apps/cortex/NodeManager/Jamfile

    diff --git a/src/apps/cortex/NodeManager/Jamfile b/src/apps/cortex/NodeManager/Jamfile
    index 591976d..6a135aa 100644
    a b StaticLibrary cortex_node_manager.a :  
    1515    NodeGroup.cpp
    1616    NodeRef.cpp
    1717    NodeSyncThread.cpp
     18    : $(HAIKU_LOCALE_LIBS)
    1819;
  • src/apps/cortex/NodeManager/NodeManager.cpp

    diff --git a/src/apps/cortex/NodeManager/NodeManager.cpp b/src/apps/cortex/NodeManager/NodeManager.cpp
    index 7c87dba..cbc3dce 100644
    a b  
    4646#include <functional>
    4747#include <list>
    4848#include <set>
     49// Locale Kit
     50#include <Catalog.h>
     51
     52#undef B_TRANSLATION_CONTEXT
     53#define B_TRANSLATION_CONTEXT "CortexNodeManager"
    4954
    5055#include "set_tools.h"
    5156#include "functional_tools.h"
    NodeManager::~NodeManager() {  
    406411//
    407412}
    408413
    409 const char* const           NodeManager::s_defaultGroupPrefix = "No Name";
    410 const char* const           NodeManager::s_timeSourceGroup = "Time Sources";
    411 const char* const           NodeManager::s_audioInputGroup = "System Audio Input";
    412 const char* const           NodeManager::s_videoInputGroup = "System Video Input";
    413 const char* const           NodeManager::s_audioMixerGroup = "System Audio Mixer";
    414 const char* const           NodeManager::s_videoOutputGroup = "System Video Output";
     414const char* const           NodeManager::s_defaultGroupPrefix = B_TRANSLATE("No name");
     415const char* const           NodeManager::s_timeSourceGroup = B_TRANSLATE("Time sources");
     416const char* const           NodeManager::s_audioInputGroup = B_TRANSLATE("System audio input");
     417const char* const           NodeManager::s_videoInputGroup = B_TRANSLATE("System video input");
     418const char* const           NodeManager::s_audioMixerGroup = B_TRANSLATE("System audio mixer");
     419const char* const           NodeManager::s_videoOutputGroup = B_TRANSLATE("System video output");
    415420
    416421NodeManager::NodeManager(
    417422    bool                                                    useAddOnHost) :
  • src/apps/cortex/ParameterView/Jamfile

    diff --git a/src/apps/cortex/ParameterView/Jamfile b/src/apps/cortex/ParameterView/Jamfile
    index 6f9b98c..98743c1 100644
    a b StaticLibrary cortex_parameter_view.a :  
    1212    ParameterWindowManager.cpp
    1313    ParameterWindow.cpp
    1414    ParameterContainerView.cpp
     15    : $(HAIKU_LOCALE_LIBS)
    1516;
  • src/apps/cortex/ParameterView/ParameterWindow.cpp

    diff --git a/src/apps/cortex/ParameterView/ParameterWindow.cpp b/src/apps/cortex/ParameterView/ParameterWindow.cpp
    index 8a8b963..14644d8 100644
    a b  
    5454#include <Path.h>
    5555// Support Kit
    5656#include <String.h>
     57// Locale Kit
     58#include <Catalog.h>
     59
     60#undef B_TRANSLATION_CONTEXT
     61#define B_TRANSLATION_CONTEXT "CortexParameterWindow"
    5762
    5863__USE_CORTEX_NAMESPACE
    5964
    ParameterWindow::ParameterWindow(  
    8388
    8489    // add the nodes name to the title
    8590    {
    86         char* title = new char[strlen(nodeInfo.name) + strlen(" parameters") + 1];
    87         sprintf(title, "%s parameters", nodeInfo.name);
     91        char* title = new char[strlen(nodeInfo.name) + strlen(B_TRANSLATE(" parameters")) + 1];
     92        sprintf(title, B_TRANSLATE("%s parameters"), nodeInfo.name);
    8893        SetTitle(title);
    8994        delete [] title;
    9095    }
    9196    // add the menu bar
    9297    BMenuBar *menuBar = new BMenuBar(Bounds(), "ParameterWindow MenuBar");
    9398
    94     BMenu *menu = new BMenu("Window");
    95     menu->AddItem(new BMenuItem("Start control panel",
     99    BMenu *menu = new BMenu(B_TRANSLATE("Window"));
     100    menu->AddItem(new BMenuItem(B_TRANSLATE("Start control panel"),
    96101                                new BMessage(M_START_CONTROL_PANEL),
    97102                                'P', B_COMMAND_KEY | B_SHIFT_KEY));
    98103    menu->AddSeparatorItem();
    99     menu->AddItem(new BMenuItem("Close",
     104    menu->AddItem(new BMenuItem(B_TRANSLATE("Close"),
    100105                                new BMessage(B_QUIT_REQUESTED),
    101106                                'W', B_COMMAND_KEY));
    102107    menuBar->AddItem(menu);
    103108
    104109    // future Media Theme selection capabilities go here
    105     menu = new BMenu("Themes");
     110    menu = new BMenu(B_TRANSLATE("Themes"));
    106111    BMessage *message = new BMessage(M_THEME_SELECTED);
    107112    BMediaTheme *theme = BMediaTheme::PreferredTheme();
    108113    message->AddInt32("themeID", theme->ID());
    void ParameterWindow::MessageReceived(  
    158163            D_MESSAGE((" -> M_START_CONTROL_PANEL\n"));
    159164            status_t error = _startControlPanel();
    160165            if (error) {
    161                 BString s = "Could not start control panel";
     166                BString s = B_TRANSLATE("Could not start control panel");
    162167                s << " (" << strerror(error) << ")";
    163                 BAlert *alert = new BAlert("", s.String(), "OK", 0, 0,
     168                BAlert *alert = new BAlert("", s.String(), B_TRANSLATE("OK"), 0, 0,
    164169                                           B_WIDTH_AS_USUAL, B_WARNING_ALERT);
    165170                alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
    166171                alert->Go(0);
  • src/apps/cortex/RouteApp/Jamfile

    diff --git a/src/apps/cortex/RouteApp/Jamfile b/src/apps/cortex/RouteApp/Jamfile
    index b66ab30..0175220 100644
    a b Application Cortex :  
    4141    cortex_support.a
    4242    be media tracker translation
    4343    libexpat.a
    44     $(TARGET_LIBSTDC++)
     44    $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
    4545    : ../Resource.rdef
    4646;
     47
     48DoCatalogs Cortex :
     49    application/x-vnd.Cortex.Route
     50    :
     51    RouteAppNodeManager.cpp
     52    RouteWindow.cpp
     53    ;
  • src/apps/cortex/RouteApp/RouteAppNodeManager.cpp

    diff --git a/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp b/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp
    index 0199bb9..d29d282 100644
    a b  
    6262
    6363#include "set_tools.h"
    6464
     65// Locale Kit
     66#include <Catalog.h>
     67
     68#undef B_TRANSLATION_CONTEXT
     69#define B_TRANSLATION_CONTEXT "CortexRouteApp"
     70
    6571using namespace std;
    6672
    6773__USE_CORTEX_NAMESPACE
    void RouteAppNodeManager::nodeCreated(  
    170176
    171177    // prepare the log message
    172178    BMessage logMsg(M_LOG);
    173     BString title = "Node '";
    174     title << ref->name() << "' created";
     179    BString title = B_TRANSLATE("Node '");
     180    title << ref->name() << B_TRANSLATE("' created");
    175181    logMsg.AddString("title", title);
    176182
    177183    // create a default group for the node
    void RouteAppNodeManager::nodeDeleted(  
    210216
    211217    // prepare the log message
    212218    BMessage logMsg(M_LOG);
    213     BString title = "Node '";
    214     title << ref->name() << "' released";
     219    BString title = B_TRANSLATE("Node '");
     220    title << ref->name() << B_TRANSLATE("' released");
    215221    logMsg.AddString("title", title);
    216222
    217223    if(ref->kind() & B_TIME_SOURCE) {
    void RouteAppNodeManager::connectionMade(  
    234240
    235241    // prepare the log message
    236242    BMessage logMsg(M_LOG);
    237     BString title = "Connection ";
     243    BString title = B_TRANSLATE("Connection ");
    238244    if (strcmp(connection->outputName(), connection->inputName()) == 0) {
    239245        title << "'" << connection->outputName() << "' ";
    240246    }
    241     title << "made";
     247    title << B_TRANSLATE("made");
    242248    logMsg.AddString("title", title);
    243249
    244250    if(!(connection->flags() & Connection::INTERNAL))
    void RouteAppNodeManager::connectionMade(  
    265271    }
    266272
    267273    // add node names to log messages
    268     BString line = "Between:";
     274    BString line = B_TRANSLATE("Between:");
    269275    logMsg.AddString("line", line);
    270276    line = "    ";
    271     line << producer->name() << " and ";
     277    line << producer->name() << B_TRANSLATE(" and ");
    272278    line << consumer->name();
    273279    logMsg.AddString("line", line);
    274280
    275281    // add format to log message
    276     line = "Negotiated format:";
     282    line = B_TRANSLATE("Negotiated format:");
    277283    logMsg.AddString("line", line);
    278284    line = "    ";
    279285    line << MediaString::getStringFor(connection->format(), false);
    280286    logMsg.AddString("line", line);
    281287
    282288    NodeGroup *group = 0;
    283     BString groupName = "Untitled group ";
     289    BString groupName = B_TRANSLATE("Untitled group ");
    284290    if(_canGroup(producer) && _canGroup(consumer))
    285291    {
    286292        if (producer->group() && consumer->group() &&
    void RouteAppNodeManager::connectionBroken(  
    335341       
    336342    // prepare the log message
    337343    BMessage logMsg(M_LOG);
    338     BString title = "Connection ";
     344    BString title = B_TRANSLATE("Connection ");
    339345    if (strcmp(connection->outputName(), connection->inputName()) == 0) {
    340346        title << "'" << connection->outputName() << "' ";
    341347    }
    342     title << "broken";
     348    title << B_TRANSLATE("broken");
    343349    logMsg.AddString("title", title);
    344350
    345351    if(!(connection->flags() & Connection::INTERNAL))
    void RouteAppNodeManager::connectionBroken(  
    371377    }
    372378
    373379    // add node names to log messages
    374     BString line = "Between:";
     380    BString line = B_TRANSLATE("Between:");
    375381    logMsg.AddString("line", line);
    376382    line = "    ";
    377     line << producer->name() << " and ";
     383    line << producer->name() << B_TRANSLATE(" and ");
    378384    line << consumer->name();
    379385    logMsg.AddString("line", line);
    380386   
    void RouteAppNodeManager::connectionFailed(  
    402408       
    403409    // prepare the log message
    404410    BMessage logMsg(M_LOG);
    405     BString title = "Connection failed";
     411    BString title = B_TRANSLATE("Connection failed");
    406412    logMsg.AddString("title", title);
    407413    logMsg.AddInt32("error", error);
    408414
    void RouteAppNodeManager::connectionFailed(  
    417423    }
    418424
    419425    // add node names to log messages
    420     BString line = "Between:";
     426    BString line = B_TRANSLATE("Between:");
    421427    logMsg.AddString("line", line);
    422428    line = "    ";
    423429    line << producer->name() << " and " << consumer->name();
    424430    logMsg.AddString("line", line);
    425431
    426432    // add format to log message
    427     line = "Tried format:";
     433    line = B_TRANSLATE("Tried format:");
    428434    logMsg.AddString("line", line);
    429435    line = "    ";
    430436    line << MediaString::getStringFor(format, true);
  • src/apps/cortex/RouteApp/RouteWindow.cpp

    diff --git a/src/apps/cortex/RouteApp/RouteWindow.cpp b/src/apps/cortex/RouteApp/RouteWindow.cpp
    index ae5fd26..bcd93bd 100644
    a b  
    6464#define D_HOOK(x) //PRINT (x)
    6565#define D_INTERNAL(x) //PRINT (x)
    6666
     67// Locale Kit
     68#include <Catalog.h>
     69
     70#undef B_TRANSLATION_CONTEXT
     71#define B_TRANSLATION_CONTEXT "CortexRouteApp"
     72
    6773__USE_CORTEX_NAMESPACE
    6874
    6975
    70 const char* const RouteWindow::s_windowName = "Cortex";
     76const char* const RouteWindow::s_windowName = B_TRANSLATE("Cortex");
    7177
    7278const BRect RouteWindow::s_initFrame(100,100,700,550);
    7379
    7480const char* const g_aboutText =
    75     "Cortex/Route 2.1.2\n\n"
     81    B_TRANSLATE("Cortex/Route 2.1.2\n\n"
    7682    "Copyright 1999-2000 Eric Moon\n"
    7783    "All rights reserved.\n\n"
    7884    "The Cortex Team:\n\n"
    const char* const g_aboutText =  
    8086    "Eric Moon: UI, back-end\n\n"
    8187    "Thanks to:\nJohn Ashmun\nJon Watte\nDoug Wright\n<your name here>\n\n"
    8288    "Certain icons used herein are the property of\n"
    83     "Be, Inc. and are used by permission.";
     89    "Be, Inc. and are used by permission.");
    8490
    8591
    8692RouteWindow::~RouteWindow()
    RouteWindow::RouteWindow(RouteAppNodeManager* manager)  
    103109
    104110    // initialize the menu bar: add all menus that target this window
    105111    BMenuBar* pMenuBar = new BMenuBar(b, "menuBar");
    106     BMenu* pFileMenu = new BMenu("File");
    107     BMenuItem* item = new BMenuItem("Open" B_UTF8_ELLIPSIS,
     112    BMenu* pFileMenu = new BMenu(B_TRANSLATE("File"));
     113    BMenuItem* item = new BMenuItem(B_TRANSLATE("Open" B_UTF8_ELLIPSIS),
    108114        new BMessage(RouteApp::M_SHOW_OPEN_PANEL), 'O');
    109115    item->SetTarget(be_app);
    110116    pFileMenu->AddItem(item);
    111117    pFileMenu->AddItem(new BSeparatorItem());
    112     item = new BMenuItem("Save nodes" B_UTF8_ELLIPSIS,
     118    item = new BMenuItem(B_TRANSLATE("Save nodes" B_UTF8_ELLIPSIS),
    113119        new BMessage(RouteApp::M_SHOW_SAVE_PANEL), 'S');
    114120    item->SetTarget(be_app);
    115121    pFileMenu->AddItem(item);
    116122    pFileMenu->AddItem(new BSeparatorItem());
    117     pFileMenu->AddItem(new BMenuItem("About Cortex/Route" B_UTF8_ELLIPSIS,
     123    pFileMenu->AddItem(new BMenuItem(B_TRANSLATE("About Cortex/Route" B_UTF8_ELLIPSIS),
    118124        new BMessage(B_ABOUT_REQUESTED)));
    119125    pFileMenu->AddItem(new BSeparatorItem());
    120     pFileMenu->AddItem(new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED)));
     126    pFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Quit"), new BMessage(B_QUIT_REQUESTED)));
    121127    pMenuBar->AddItem(pFileMenu);
    122128    AddChild(pMenuBar);
    123129
    RouteWindow::RouteWindow(RouteAppNodeManager* manager)  
    166172    SetSizeLimits(minWidth, maxWidth, minHeight, maxHeight);
    167173
    168174    // construct the Window menu
    169     BMenu* windowMenu = new BMenu("Window");
     175    BMenu* windowMenu = new BMenu(B_TRANSLATE("Window"));
    170176    m_transportWindowItem = new BMenuItem(
    171         "Show transport",
     177        B_TRANSLATE("Show transport"),
    172178        new BMessage(M_TOGGLE_TRANSPORT_WINDOW));
    173179    windowMenu->AddItem(m_transportWindowItem);
    174180
    175181    m_dormantNodeWindowItem = new BMenuItem(
    176         "Show add-ons",
     182        B_TRANSLATE("Show add-ons"),
    177183        new BMessage(M_TOGGLE_DORMANT_NODE_WINDOW));
    178184    windowMenu->AddItem(m_dormantNodeWindowItem);
    179185
    180186    windowMenu->AddItem(new BSeparatorItem());
    181187
    182188    m_pullPalettesItem = new BMenuItem(
    183         "Pull palettes",
     189        B_TRANSLATE("Pull palettes"),
    184190        new BMessage(M_TOGGLE_PULLING_PALETTES));
    185191    windowMenu->AddItem(m_pullPalettesItem);
    186192
    RouteWindow::MessageReceived(BMessage* pMsg)  
    373379    switch (pMsg->what) {
    374380        case B_ABOUT_REQUESTED:
    375381        {
    376             BAlert* alert = new BAlert("About", g_aboutText, "OK");
     382            BAlert* alert = new BAlert("About", g_aboutText, B_TRANSLATE("OK"));
    377383            alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
    378384            alert->Go();
    379385            break;
  • src/apps/cortex/TipManager/Jamfile

    diff --git a/src/apps/cortex/TipManager/Jamfile b/src/apps/cortex/TipManager/Jamfile
    index 2c73b63..a29041b 100644
    a b StaticLibrary cortex_tip_manager.a :  
    1212    TipManagerImpl.cpp
    1313    TipWindow.cpp
    1414    TipView.cpp
     15    : $(HAIKU_LOCALE_LIBS)
     16;
     17
     18DoCatalogs Cortex :
     19    application/x-vnd.Cortex.Route
     20    :
     21    TipWindow.cpp
    1522;
  • src/apps/cortex/TipManager/TipWindow.cpp

    diff --git a/src/apps/cortex/TipManager/TipWindow.cpp b/src/apps/cortex/TipManager/TipWindow.cpp
    index 1cda91b..639db42 100644
    a b  
    3535#include "TipView.h"
    3636
    3737#include <Debug.h>
     38// Locale Kit
     39#include <Catalog.h>
     40
     41#undef B_TRANSLATION_CONTEXT
     42#define B_TRANSLATION_CONTEXT "CortexTipManager"
    3843
    3944__USE_CORTEX_NAMESPACE
    4045
    void TipWindow::_createTipView() {  
    145150    if(m_text.Length())
    146151        m_tipView->setText(m_text.String());
    147152    else
    148         m_tipView->setText("(no info)");
     153        m_tipView->setText(B_TRANSLATE("(no info)"));
    149154}
    150155
    151156void TipWindow::_destroyTipView() {
  • src/apps/cortex/TransportView/Jamfile

    diff --git a/src/apps/cortex/TransportView/Jamfile b/src/apps/cortex/TransportView/Jamfile
    index 9b9d7fb..dfc94b5 100644
    a b SetSubDirSupportedPlatformsBeOSCompatible ;  
    1414StaticLibrary cortex_transport_view.a :
    1515    TransportView.cpp
    1616    TransportWindow.cpp
     17    : $(HAIKU_LOCALE_LIBS)
     18;
     19
     20DoCatalogs Cortex :
     21    application/x-vnd.Cortex.Route
     22    :
     23    TransportView.cpp
    1724;
  • src/apps/cortex/TransportView/TransportView.cpp

    diff --git a/src/apps/cortex/TransportView/TransportView.cpp b/src/apps/cortex/TransportView/TransportView.cpp
    index 9dc1ef5..abf19a1 100644
    a b  
    5656
    5757#include <algorithm>
    5858#include <functional>
     59// Locale Kit
     60#include <Catalog.h>
     61
     62#undef B_TRANSLATION_CONTEXT
     63#define B_TRANSLATION_CONTEXT "CortexTransportView"
    5964
    6065using namespace std;
    6166
    public: // BView  
    136141        // background +++++
    137142       
    138143        // name
    139         BString name = g ? g->name() : "(no group)";
     144        BString name = g ? g->name() : B_TRANSLATE("(no group)");
    140145        // +++++ constrain width
    141146        SetFont(&m_boldFont);
    142147        DrawString(name.String(), m_namePosition);
    public: // BView  
    149154            nodeCount << g->countNodes();
    150155        else
    151156            nodeCount << '0';
    152         nodeCount << ((nodeCount == "1") ? " node." : " nodes.");
     157        nodeCount << ((nodeCount == "1") ? B_TRANSLATE(" node.") : B_TRANSLATE(" nodes."));
    153158        // +++++ constrain width
    154159        DrawString(nodeCount.String(), m_nodeCountPosition);
    155160       
    156161        // status
    157         BString status = "No errors.";
     162        BString status = B_TRANSLATE("No errors.");
    158163        // +++++ constrain width
    159164        DrawString(status.String(), m_statusPosition);
    160165    }
    const int _run_modes = 5;  
    569574//};
    570575//const int _time_sources = 2;
    571576
    572 const char* _region_start_label = "From:";
    573 const char* _region_end_label = "To:";
     577const char* _region_start_label = B_TRANSLATE("From:");
     578const char* _region_end_label = B_TRANSLATE("To:");
    574579
    575580void TransportView::_constructControls() {
    576581
    void TransportView::_constructControls() {  
    595600    m_runModeView = new BMenuField(
    596601        BRect(),
    597602        "runModeView",
    598         "Run mode:",
     603        B_TRANSLATE("Run mode:"),
    599604        new BPopUpMenu("runModeMenu"));
    600605    _populateRunModeMenu(
    601606        m_runModeView->Menu());
    void TransportView::_constructControls() {  
    604609    m_timeSourceView = new BMenuField(
    605610        BRect(),
    606611        "timeSourceView",
    607         "Time source:",
     612        B_TRANSLATE("Time source:"),
    608613        new BPopUpMenu("timeSourceMenu"));
    609614    _populateTimeSourceMenu(
    610615        m_timeSourceView->Menu());
    611616    AddChild(m_timeSourceView);
    612617
    613618
    614     m_fromLabel = new BStringView(BRect(), 0, "Roll from");
     619    m_fromLabel = new BStringView(BRect(), 0, B_TRANSLATE("Roll from"));
    615620    AddChild(m_fromLabel);
    616621   
    617622   
    void TransportView::_constructControls() {  
    673678    m_startButton = new BButton(
    674679        BRect(),
    675680        "startButton",
    676         "Start",
     681        B_TRANSLATE("Start"),
    677682        m);
    678683    _addGroupTarget(m_startButton);
    679684    AddChild(m_startButton);
    void TransportView::_constructControls() {  
    682687    m_stopButton = new BButton(
    683688        BRect(),
    684689        "stopButton",
    685         "Stop",
     690        B_TRANSLATE("Stop"),
    686691        m);
    687692    _addGroupTarget(m_stopButton);
    688693    AddChild(m_stopButton);
    void TransportView::_constructControls() {  
    691696    m_prerollButton = new BButton(
    692697        BRect(),
    693698        "prerollButton",
    694         "Preroll",
     699        B_TRANSLATE("Preroll"),
    695700        m);
    696701    _addGroupTarget(m_prerollButton);
    697702    AddChild(m_prerollButton);
    void TransportView::_populateTimeSourceMenu(  
    737742            &dacTimeSource,
    738743            sizeof(media_node));
    739744        i = new BMenuItem(
    740             "DAC time source",
     745            B_TRANSLATE("DAC time source"),
    741746            m);
    742747        menu->AddItem(i);
    743748        _addGroupTarget(i);
    void TransportView::_populateTimeSourceMenu(  
    752757            &systemTimeSource,
    753758            sizeof(media_node));
    754759        i = new BMenuItem(
    755             "System clock",
     760            B_TRANSLATE("System clock"),
    756761            m);
    757762        menu->AddItem(i);
    758763        _addGroupTarget(i);
    void TransportView::_updateTransportButtons() {  
    980985        (runMode == BMediaNode::B_OFFLINE ||
    981986            !m_group->canCycle())) {
    982987           
    983         m_startButton->SetLabel("Roll");
     988        m_startButton->SetLabel(B_TRANSLATE("Roll"));
    984989        m_startButton->Message()->what = NodeGroup::M_ROLL;
    985990
    986991    } else {
    987         m_startButton->SetLabel("Start");
     992        m_startButton->SetLabel(B_TRANSLATE("Start"));
    988993        m_startButton->Message()->what = NodeGroup::M_START;
    989994    }
    990995}
    void TransportView::_updateTimeSource() {  
    10051010    BMenu* menu = m_timeSourceView->Menu();
    10061011    ASSERT(menu);
    10071012    if(tsNode == media_node::null) {
    1008         menu->Superitem()->SetLabel("(none)");
     1013        menu->Superitem()->SetLabel(B_TRANSLATE("(none)"));
    10091014        return;
    10101015    }
    10111016
  • src/apps/cortex/addons/AudioAdapter/AudioAdapterParams.cpp

    diff --git a/src/apps/cortex/addons/AudioAdapter/AudioAdapterParams.cpp b/src/apps/cortex/addons/AudioAdapter/AudioAdapterParams.cpp
    index bdb2d21..21845fa 100644
    a b  
    3333
    3434#include "AudioAdapterParams.h"
    3535
     36#include <Catalog.h>
    3637#include <Debug.h>
    3738#include <ParameterWeb.h>
    3839
     40#undef B_TRANSLATION_CONTEXT
     41#define B_TRANSLATION_CONTEXT "CortexAudioAdapter"
     42
    3943status_t
    4044_AudioAdapterParams::store(int32 parameterID, const void* data, size_t size)
    4145{
    status_t _AudioAdapterParams::retrieve(  
    110114void _AudioAdapterParams::populateGroup(
    111115    BParameterGroup*                group) {
    112116   
    113     BParameterGroup* inputGroup = group->MakeGroup("Input Format");
     117    BParameterGroup* inputGroup = group->MakeGroup(B_TRANSLATE("Input format"));
    114118   
    115119    BNullParameter* groupName;
    116120    BDiscreteParameter* param;
    117121
    118122    groupName = inputGroup->MakeNullParameter(
    119         0, B_MEDIA_NO_TYPE, "Input Format", B_GENERIC);
     123        0, B_MEDIA_NO_TYPE, B_TRANSLATE("Input format"), B_GENERIC);
    120124
    121125    param = inputGroup->MakeDiscreteParameter(
    122126        P_INPUT_FORMAT,
    123127        B_MEDIA_NO_TYPE,
    124         "Sample format:",
     128        B_TRANSLATE("Sample format:"),
    125129        B_GENERIC);
    126130    param->AddItem(
    127131        0,
    void _AudioAdapterParams::populateGroup(  
    142146    param = inputGroup->MakeDiscreteParameter(
    143147        P_INPUT_CHANNEL_COUNT,
    144148        B_MEDIA_NO_TYPE,
    145         "Channels:",
     149        B_TRANSLATE("Channels:"),
    146150        B_GENERIC);
    147151    param->AddItem(
    148152        0,
    void _AudioAdapterParams::populateGroup(  
    160164        8,
    161165        "8");
    162166
    163     BParameterGroup* outputGroup = group->MakeGroup("Output Format");
     167    BParameterGroup* outputGroup = group->MakeGroup(B_TRANSLATE("Output format"));
    164168
    165169    groupName = outputGroup->MakeNullParameter(
    166         0, B_MEDIA_NO_TYPE, "Output Format", B_GENERIC);
     170        0, B_MEDIA_NO_TYPE, B_TRANSLATE("Output format"), B_GENERIC);
    167171
    168172    param = outputGroup->MakeDiscreteParameter(
    169173        P_OUTPUT_FORMAT,
    170174        B_MEDIA_NO_TYPE,
    171         "Sample format:",
     175        B_TRANSLATE("Sample format:"),
    172176        B_GENERIC);
    173177    param->AddItem(
    174178        0,
    void _AudioAdapterParams::populateGroup(  
    189193    param = outputGroup->MakeDiscreteParameter(
    190194        P_OUTPUT_CHANNEL_COUNT,
    191195        B_MEDIA_NO_TYPE,
    192         "Channels:",
     196        B_TRANSLATE("Channels:"),
    193197        B_GENERIC);
    194198    param->AddItem(
    195199        0,
  • src/apps/cortex/addons/AudioAdapter/Jamfile

    diff --git a/src/apps/cortex/addons/AudioAdapter/Jamfile b/src/apps/cortex/addons/AudioAdapter/Jamfile
    index dff82f0..cee5147 100644
    a b Addon cortex_audioadapter.media_addon :  
    2121    RawBuffer.cpp
    2222    SoundUtils.cpp
    2323
    24     : be media $(TARGET_LIBSUPC++)
     24    : be media $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
    2525;
  • src/apps/cortex/addons/Flanger/FlangerAddOn.cpp

    diff --git a/src/apps/cortex/addons/Flanger/FlangerAddOn.cpp b/src/apps/cortex/addons/Flanger/FlangerAddOn.cpp
    index 884a07d..338c8b2 100644
    a b  
    3434
    3535#include "FlangerNode.h"
    3636#include "FlangerAddOn.h"
     37#include <Catalog.h>
    3738#include <Entry.h>
    3839#include <Debug.h>
    3940#include <cstring>
    4041#include <cstdlib>
    4142
     43#undef B_TRANSLATION_CONTEXT
     44#define B_TRANSLATION_CONTEXT "CortexAddOnsFlanger"
     45
    4246// instantiation function
    4347extern "C" _EXPORT BMediaAddOn* make_media_addon(image_id image);
    4448extern "C" _EXPORT BMediaAddOn* make_media_addon(image_id image) {
    status_t FlangerAddOn::GetFlavorAt(  
    7680   
    7781    flavor_info* pInfo = new flavor_info;
    7882    pInfo->internal_id = n;
    79     pInfo->name = (char *)"Flanger";
     83    pInfo->name = (char *)B_TRANSLATE("Flanger");
    8084    pInfo->info = (char *)
    81         "An add-on version of FlangerNode.\n"
    82         "by Eric Moon (16 June, 1999)";
     85        B_TRANSLATE("An add-on version of FlangerNode.\n"
     86        "by Eric Moon (16 June, 1999)");
    8387    pInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_CONTROLLABLE;
    8488    pInfo->flavor_flags = 0;
    8589    pInfo->possible_count = 0;
  • src/apps/cortex/addons/Flanger/FlangerNode.cpp

    diff --git a/src/apps/cortex/addons/Flanger/FlangerNode.cpp b/src/apps/cortex/addons/Flanger/FlangerNode.cpp
    index 157ee1a..9829335 100644
    a b  
    4040#include <Buffer.h>
    4141#include <BufferGroup.h>
    4242#include <ByteOrder.h>
     43#include <Catalog.h>
    4344#include <Debug.h>
    4445#include <ParameterWeb.h>
    4546#include <TimeSource.h>
     
    4950#include <cstring>
    5051#include <cmath>
    5152
     53#undef B_TRANSLATION_CONTEXT
     54#define B_TRANSLATION_CONTEXT "CortexAddOnsFlanger"
     55
    5256// -------------------------------------------------------- //
    5357// local helpers
    5458// -------------------------------------------------------- //
    void FlangerNode::NodeRegistered() {  
    245249    m_input.node = Node();
    246250    m_input.source = media_source::null;
    247251    m_input.format = m_format;
    248     strncpy(m_input.name, "Audio Input", B_MEDIA_NAME_LENGTH);
     252    strncpy(m_input.name, B_TRANSLATE("Audio input"), B_MEDIA_NAME_LENGTH);
    249253
    250254    // init output
    251255    m_output.source.port = ControlPort();
    void FlangerNode::NodeRegistered() {  
    253257    m_output.node = Node();
    254258    m_output.destination = media_destination::null;
    255259    m_output.format = m_format;
    256     strncpy(m_output.name, "Mix Output", B_MEDIA_NAME_LENGTH);
     260    strncpy(m_output.name, B_TRANSLATE("Mix output"), B_MEDIA_NAME_LENGTH);
    257261
    258262    // init parameters
    259263    initParameterValues();
    void FlangerNode::initParameterValues() {  
    12511255// create and register a parameter web
    12521256void FlangerNode::initParameterWeb() {
    12531257    BParameterWeb* pWeb = new BParameterWeb();
    1254     BParameterGroup* pTopGroup = pWeb->MakeGroup("FlangerNode Parameters");
     1258    BParameterGroup* pTopGroup = pWeb->MakeGroup(B_TRANSLATE("FlangerNode parameters"));
    12551259
    12561260    BNullParameter* label;
    12571261    BContinuousParameter* value;
    12581262    BParameterGroup* g;
    12591263
    12601264    // mix ratio
    1261     g = pTopGroup->MakeGroup("Mix ratio");
     1265    g = pTopGroup->MakeGroup(B_TRANSLATE("Mix ratio"));
    12621266    label = g->MakeNullParameter(
    12631267        P_MIX_RATIO_LABEL,
    12641268        B_MEDIA_NO_TYPE,
    1265         "Mix ratio",
     1269        B_TRANSLATE("Mix ratio"),
    12661270        B_GENERIC);
    12671271
    12681272    value = g->MakeContinuousParameter(
    void FlangerNode::initParameterWeb() {  
    12741278    value->AddInput(label);
    12751279
    12761280    // sweep rate
    1277     g = pTopGroup->MakeGroup("Sweep rate");
     1281    g = pTopGroup->MakeGroup(B_TRANSLATE("Sweep rate"));
    12781282    label = g->MakeNullParameter(
    12791283        P_SWEEP_RATE_LABEL,
    12801284        B_MEDIA_NO_TYPE,
    1281         "Sweep rate",
     1285        B_TRANSLATE("Sweep rate"),
    12821286        B_GENERIC);
    12831287
    12841288    value = g->MakeContinuousParameter(
    void FlangerNode::initParameterWeb() {  
    12901294    value->AddInput(label);
    12911295
    12921296    // sweep range: minimum delay
    1293     g = pTopGroup->MakeGroup("Delay");
     1297    g = pTopGroup->MakeGroup(B_TRANSLATE("Delay"));
    12941298    label = g->MakeNullParameter(
    12951299        P_DELAY_LABEL,
    12961300        B_MEDIA_NO_TYPE,
    1297         "Delay",
     1301        B_TRANSLATE("Delay"),
    12981302        B_GENERIC);
    12991303
    13001304    value = g->MakeContinuousParameter(
    void FlangerNode::initParameterWeb() {  
    13061310    value->AddInput(label);
    13071311
    13081312    // sweep range: maximum
    1309     g = pTopGroup->MakeGroup("Depth");
     1313    g = pTopGroup->MakeGroup(B_TRANSLATE("Depth"));
    13101314    label = g->MakeNullParameter(
    13111315        P_DEPTH_LABEL,
    13121316        B_MEDIA_NO_TYPE,
    1313         "Depth",
     1317        B_TRANSLATE("Depth"),
    13141318        B_GENERIC);
    13151319
    13161320    value = g->MakeContinuousParameter(
    void FlangerNode::initParameterWeb() {  
    13221326    value->AddInput(label);
    13231327
    13241328    // feedback
    1325     g = pTopGroup->MakeGroup("Feedback");
     1329    g = pTopGroup->MakeGroup(B_TRANSLATE("Feedback"));
    13261330    label = g->MakeNullParameter(
    13271331        P_FEEDBACK_LABEL,
    13281332        B_MEDIA_NO_TYPE,
    1329         "Feedback",
     1333        B_TRANSLATE("Feedback"),
    13301334        B_GENERIC);
    13311335
    13321336    value = g->MakeContinuousParameter(
  • src/apps/cortex/addons/Flanger/Jamfile

    diff --git a/src/apps/cortex/addons/Flanger/Jamfile b/src/apps/cortex/addons/Flanger/Jamfile
    index e1e3896..abe5f34 100644
    a b Addon cortex_flanger.media_addon :  
    1010    MediaNodeControlApp.cpp
    1111    RawBuffer.cpp
    1212    SoundUtils.cpp
    13     : be media $(TARGET_LIBSUPC++)
     13    : be media $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
    1414    : Resource.rsrc
    1515;
  • src/apps/cortex/addons/LoggingConsumer/Jamfile

    diff --git a/src/apps/cortex/addons/LoggingConsumer/Jamfile b/src/apps/cortex/addons/LoggingConsumer/Jamfile
    index 1fa2834..e6cfed7 100644
    a b Application cortex_logging_consumer.media_addon :  
    1111    NodeHarnessWin.cpp
    1212    LogWriter.cpp
    1313    LoggingConsumer.cpp
    14     : be media
     14    : be media $(HAIKU_LOCALE_LIBS)
    1515;
  • src/apps/cortex/addons/LoggingConsumer/LoggingConsumer.cpp

    diff --git a/src/apps/cortex/addons/LoggingConsumer/LoggingConsumer.cpp b/src/apps/cortex/addons/LoggingConsumer/LoggingConsumer.cpp
    index 5d67863..a860f30 100644
    a b  
    4343#include <string.h>
    4444
    4545// e.moon [11jun99]
     46#include <Catalog.h>
    4647#include <Debug.h>
    4748
     49#undef B_TRANSLATION_CONTEXT
     50#define B_TRANSLATION_CONTEXT "CortexAddOnsLoggingConsumer"
     51
    4852// id's of the node's BParameters
    4953const int32 INPUT_NULL_PARAM = 1;
    5054const int32 LATENCY_PARAM = 2;
    static BParameterWeb* build_parameter_web()  
    5963{
    6064    BParameterWeb* web = new BParameterWeb;
    6165
    62     BParameterGroup* mainGroup = web->MakeGroup("LoggingConsumer Parameters");
    63     BParameterGroup* group = mainGroup->MakeGroup("Latency control");
    64     BParameter* nullParam = group->MakeNullParameter(INPUT_NULL_PARAM, B_MEDIA_NO_TYPE, "Latency", B_GENERIC);
     66    BParameterGroup* mainGroup = web->MakeGroup(B_TRANSLATE("LoggingConsumer parameters"));
     67    BParameterGroup* group = mainGroup->MakeGroup(B_TRANSLATE("Latency control"));
     68    BParameter* nullParam = group->MakeNullParameter(INPUT_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Latency"), B_GENERIC);
    6569    BParameter* latencyParam = group->MakeContinuousParameter(LATENCY_PARAM, B_MEDIA_NO_TYPE, "",
    6670        B_GAIN, "ms", 5, 100, 5);
    6771    nullParam->AddOutput(latencyParam);
    6872    latencyParam->AddInput(nullParam);
    6973
    70     group = mainGroup->MakeGroup("CPU percentage");
    71     nullParam = group->MakeNullParameter(CPU_NULL_PARAM, B_MEDIA_NO_TYPE, "CPU spin percentage", B_GENERIC);
     74    group = mainGroup->MakeGroup(B_TRANSLATE("CPU percentage"));
     75    nullParam = group->MakeNullParameter(CPU_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("CPU spin percentage"), B_GENERIC);
    7276    BContinuousParameter* cpuParam = group->MakeContinuousParameter(CPU_SPIN_PARAM, B_MEDIA_NO_TYPE, "",
    73         B_GAIN, "percent", 5, 80, 5);
     77        B_GAIN, B_TRANSLATE("percent"), 5, 80, 5);
    7478    nullParam->AddOutput(cpuParam);
    7579    cpuParam->AddInput(nullParam);
    7680
    77     group = mainGroup->MakeGroup("Priority");
    78     nullParam = group->MakeNullParameter(PRIO_NULL_PARAM, B_MEDIA_NO_TYPE, "Thread priority", B_GENERIC);
     81    group = mainGroup->MakeGroup(B_TRANSLATE("Priority"));
     82    nullParam = group->MakeNullParameter(PRIO_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Thread priority"), B_GENERIC);
    7983    BDiscreteParameter* prioParam = group->MakeDiscreteParameter(PRIORITY_PARAM, B_MEDIA_NO_TYPE, "", B_GENERIC);
    8084    prioParam->AddItem(5, "B_LOW_PRIORITY");
    8185    prioParam->AddItem(10, "B_NORMAL_PRIORITY");
    LoggingConsumer::NodeRegistered()  
    521525    mInput.destination.port = ControlPort();
    522526    mInput.destination.id = 0;
    523527    mInput.node = Node();
    524     strcpy(mInput.name, "Logged input");
     528    strcpy(mInput.name, B_TRANSLATE("Logged input"));
    525529}
    526530
    527531void
  • src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp

    diff --git a/src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp b/src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp
    index 38d5a8a..cce480e 100644
    a b  
    3737#include "LoggingConsumerAddOn.h"
    3838#include <Entry.h>
    3939#include <Debug.h>
     40#include <Catalog.h>
    4041#include <cstring>
    4142#include <cstdlib>
    4243
    4344// logfile path
    4445const char* const       g_pLogPath = "/tmp/node_log";
    4546
     47#undef B_TRANSLATION_CONTEXT
     48#define B_TRANSLATION_CONTEXT "CortexAddOnsLoggingConsumer"
    4649
    4750// instantiation function
    4851extern "C" _EXPORT BMediaAddOn* make_media_addon(image_id image) {
    status_t LoggingConsumerAddOn::GetFlavorAt(  
    8083
    8184    flavor_info* pInfo = new flavor_info;
    8285    pInfo->internal_id = n;
    83     pInfo->name = "LoggingConsumer";
    84     pInfo->info =
     86    pInfo->name = (char *)B_TRANSLATE("LoggingConsumer");
     87    pInfo->info = (char *)B_TRANSLATE(
    8588        "An add-on version of the LoggingConsumer node.\n"
    8689        "See the Be Developer Newsletter III.18: 5 May, 1999\n"
    87         "adapted by Eric Moon (4 June, 1999)";
     90        "adapted by Eric Moon (4 June, 1999)");
    8891    pInfo->kinds = B_BUFFER_CONSUMER | B_CONTROLLABLE;
    8992    pInfo->flavor_flags = 0;
    9093    pInfo->possible_count = 0;
  • src/apps/cortex/addons/LoggingConsumer/NodeHarnessApp.cpp

    diff --git a/src/apps/cortex/addons/LoggingConsumer/NodeHarnessApp.cpp b/src/apps/cortex/addons/LoggingConsumer/NodeHarnessApp.cpp
    index 09a53d0..29c6d63 100644
    a b  
    3535#include "NodeHarnessApp.h"
    3636#include "NodeHarnessWin.h"
    3737
     38#include <Catalog.h>
     39
     40#undef B_TRANSLATION_CONTEXT
     41#define B_TRANSLATION_CONTEXT "CortexAddOnsLoggingConsumers"
     42
    3843NodeHarnessApp::NodeHarnessApp(const char *signature)
    3944    : BApplication(signature)
    4045{
    NodeHarnessApp::NodeHarnessApp(const char *signature)  
    4348void
    4449NodeHarnessApp::ReadyToRun()
    4550{
    46     BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), "NodeLogger");
     51    BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), B_TRANSLATE("NodeLogger"));
    4752    win->Show();
    4853}
  • src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp

    diff --git a/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp b/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp
    index df486b6..f633bce 100644
    a b  
    4444#include <media/MediaTheme.h>
    4545#include <stdio.h>
    4646
     47#include <Catalog.h>
     48
     49#undef B_TRANSLATION_CONTEXT
     50#define B_TRANSLATION_CONTEXT "CortexAddOnsLoggingConsumer"
     51
    4752const int32 BUTTON_CONNECT = 'Cnct';
    4853const int32 BUTTON_START = 'Strt';
    4954const int32 BUTTON_STOP = 'Stop';
    NodeHarnessWin::NodeHarnessWin(BRect frame, const char *title)  
    6974{
    7075    // build the UI
    7176    BRect r(10, 10, 100, 40);
    72     mConnectButton = new BButton(r, "Connect", "Connect", new BMessage(BUTTON_CONNECT));
     77    mConnectButton = new BButton(r, "Connect", B_TRANSLATE("Connect"), new BMessage(BUTTON_CONNECT));
    7378    mConnectButton->SetEnabled(true);
    7479    AddChild(mConnectButton);
    7580    r.OffsetBy(0, 40);
    76     mStartButton = new BButton(r, "Start", "Start", new BMessage(BUTTON_START));
     81    mStartButton = new BButton(r, "Start", B_TRANSLATE("Start"), new BMessage(BUTTON_START));
    7782    mStartButton->SetEnabled(false);
    7883    AddChild(mStartButton);
    7984    r.OffsetBy(0, 40);
    80     mStopButton = new BButton(r, "Stop", "Stop", new BMessage(BUTTON_STOP));
     85    mStopButton = new BButton(r, "Stop", B_TRANSLATE("Stop"), new BMessage(BUTTON_STOP));
    8186    mStopButton->SetEnabled(false);
    8287    AddChild(mStopButton);
    8388}
    NodeHarnessWin::MessageReceived(BMessage *msg)  
    159164            BParameterWeb* web;
    160165            r->GetParameterWebFor(mConnection.consumer, &web);
    161166            BView* view = BMediaTheme::ViewFor(web);
    162             BWindow* win = new BWindow(BRect(250, 200, 300, 300), "Controls",
     167            BWindow* win = new BWindow(BRect(250, 200, 300, 300), B_TRANSLATE("Controls"),
    163168                B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS);
    164169            win->AddChild(view);
    165170            win->ResizeTo(view->Bounds().Width(), view->Bounds().Height());
  • src/apps/cortex/addons/NullFilter/NullFilterAddOn.cpp

    diff --git a/src/apps/cortex/addons/NullFilter/NullFilterAddOn.cpp b/src/apps/cortex/addons/NullFilter/NullFilterAddOn.cpp
    index e1e8c32..f45304c 100644
    a b  
    3838
    3939#include <Entry.h>
    4040#include <Debug.h>
     41#include <Catalog.h>
    4142#include <cstring>
    4243#include <cstdlib>
    4344
     45#undef B_TRANSLATION_CONTEXT
     46#define B_TRANSLATION_CONTEXT "CortexAddOnsNullFilter"
     47
    4448// -------------------------------------------------------- //
    4549// _NullFilterNode
    4650// -------------------------------------------------------- //
    status_t NullFilterAddOn::GetFlavorAt(  
    119123   
    120124    flavor_info* pInfo = new flavor_info;
    121125    pInfo->internal_id = n;
    122     pInfo->name = "NullFilter";
     126    pInfo->name = B_TRANSLATE("NullFilter");
    123127    pInfo->info =
    124         "NullFilter (empty test filter).\n"
    125         "by Eric Moon (8 September 1999)";
     128        B_TRANSLATE("NullFilter (empty test filter).\n"
     129        "by Eric Moon (8 September 1999)");
    126130    pInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_CONTROLLABLE;
    127131    pInfo->flavor_flags = 0;
    128132    pInfo->possible_count = 0;
    status_t NullFilterAddOn::GetConfigurationFor(  
    163167}
    164168
    165169
    166 // END -- NullFilterAddOn.cpp --
    167  No newline at end of file
     170// END -- NullFilterAddOn.cpp --
  • src/apps/cortex/addons/ToneProducer/NodeHarnessApp.cpp

    diff --git a/src/apps/cortex/addons/ToneProducer/NodeHarnessApp.cpp b/src/apps/cortex/addons/ToneProducer/NodeHarnessApp.cpp
    index 21af8f8..c9a9cbf 100644
    a b  
    3333#include "NodeHarnessApp.h"
    3434#include "NodeHarnessWin.h"
    3535
     36#include <Catalog.h>
     37
     38#undef B_TRANSLATION_CONTEXT
     39#define B_TRANSLATION_CONTEXT "CortexAddOnsToneProducer"
     40
    3641NodeHarnessApp::NodeHarnessApp(const char *signature)
    3742    : BApplication(signature)
    3843{
    NodeHarnessApp::NodeHarnessApp(const char *signature)  
    4146void
    4247NodeHarnessApp::ReadyToRun()
    4348{
    44     BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), "ToneProducer");
     49    BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), B_TRANSLATE("ToneProducer"));
    4550    win->Show();
    4651}
  • src/apps/cortex/addons/ToneProducer/NodeHarnessWin.cpp

    diff --git a/src/apps/cortex/addons/ToneProducer/NodeHarnessWin.cpp b/src/apps/cortex/addons/ToneProducer/NodeHarnessWin.cpp
    index f27fc58..7d827a2 100644
    a b  
    4141#include <media/MediaTheme.h>
    4242#include <stdio.h>
    4343
     44#include <Catalog.h>
     45
     46#undef B_TRANSLATION_CONTEXT
     47#define B_TRANSLATION_CONTEXT "CortexAddOnsToneProducer"
     48
    4449const int32 BUTTON_CONNECT = 'Cnct';
    4550const int32 BUTTON_START = 'Strt';
    4651const int32 BUTTON_STOP = 'Stop';
    NodeHarnessWin::NodeHarnessWin(BRect frame, const char *title)  
    6671{
    6772    // build the UI
    6873    BRect r(10, 10, 100, 40);
    69     mConnectButton = new BButton(r, "Connect", "Connect", new BMessage(BUTTON_CONNECT));
     74    mConnectButton = new BButton(r, "Connect", B_TRANSLATE("Connect"), new BMessage(BUTTON_CONNECT));
    7075    mConnectButton->SetEnabled(true);
    7176    AddChild(mConnectButton);
    7277    r.OffsetBy(0, 40);
    73     mStartButton = new BButton(r, "Start", "Start", new BMessage(BUTTON_START));
     78    mStartButton = new BButton(r, "Start", B_TRANSLATE("Start"), new BMessage(BUTTON_START));
    7479    mStartButton->SetEnabled(false);
    7580    AddChild(mStartButton);
    7681    r.OffsetBy(0, 40);
    77     mStopButton = new BButton(r, "Stop", "Stop", new BMessage(BUTTON_STOP));
     82    mStopButton = new BButton(r, "Stop", B_TRANSLATE("Stop"), new BMessage(BUTTON_STOP));
    7883    mStopButton->SetEnabled(false);
    7984    AddChild(mStopButton);
    8085
  • src/apps/cortex/addons/ToneProducer/ToneProducer.cpp

    diff --git a/src/apps/cortex/addons/ToneProducer/ToneProducer.cpp b/src/apps/cortex/addons/ToneProducer/ToneProducer.cpp
    index 4f8445a..6e7545c 100644
    a b  
    4949#include <math.h>
    5050
    5151#include <Messenger.h>
     52#include <Catalog.h>
     53
     54#undef B_TRANSLATION_CONTEXT
     55#define B_TRANSLATION_CONTEXT "CortexAddOnsToneProducer"
    5256
    5357#include <Debug.h>
    5458#if DEBUG
    ToneProducer::ToneProducer(BMediaAddOn* pAddOn)  
    118122    mOutput.source.port = ControlPort();
    119123    mOutput.source.id = 0;
    120124    mOutput.node = Node();
    121     ::strcpy(mOutput.name, "ToneProducer Output");
     125    ::strcpy(mOutput.name, B_TRANSLATE("ToneProducer output"));
    122126}
    123127
    124128ToneProducer::~ToneProducer()
    static BParameterWeb* make_parameter_web()  
    10631067    FPRINTF(stderr, "make_parameter_web() called\n");
    10641068
    10651069    BParameterWeb* web = new BParameterWeb;
    1066     BParameterGroup* mainGroup = web->MakeGroup("Tone Generator Parameters");
     1070    BParameterGroup* mainGroup = web->MakeGroup(B_TRANSLATE("Tone generator parameters"));
    10671071
    1068     BParameterGroup* group = mainGroup->MakeGroup("Frequency");
    1069     BParameter* nullParam = group->MakeNullParameter(FREQUENCY_NULL_PARAM, B_MEDIA_NO_TYPE, "Frequency", B_GENERIC);
     1072    BParameterGroup* group = mainGroup->MakeGroup(B_TRANSLATE("Frequency"));
     1073    BParameter* nullParam = group->MakeNullParameter(FREQUENCY_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Frequency"), B_GENERIC);
    10701074    BContinuousParameter* param = group->MakeContinuousParameter(FREQUENCY_PARAM, B_MEDIA_NO_TYPE, "", B_GAIN, "Hz", 0, 2500, 0.1);
    10711075    nullParam->AddOutput(param);
    10721076    param->AddInput(nullParam);
    10731077
    1074     group = mainGroup->MakeGroup("Amplitude");
    1075     nullParam = group->MakeNullParameter(GAIN_NULL_PARAM, B_MEDIA_NO_TYPE, "Amplitude", B_GENERIC);
     1078    group = mainGroup->MakeGroup(B_TRANSLATE("Amplitude"));
     1079    nullParam = group->MakeNullParameter(GAIN_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Amplitude"), B_GENERIC);
    10761080    param = group->MakeContinuousParameter(GAIN_PARAM, B_MEDIA_NO_TYPE, "", B_GAIN, "", 0, 1, 0.01);
    10771081    nullParam->AddOutput(param);
    10781082    param->AddInput(nullParam);
    10791083
    1080     group = mainGroup->MakeGroup("Waveform");
    1081     nullParam = group->MakeNullParameter(WAVEFORM_NULL_PARAM, B_MEDIA_NO_TYPE, "Waveform", B_GENERIC);
     1084    group = mainGroup->MakeGroup(B_TRANSLATE("Waveform"));
     1085    nullParam = group->MakeNullParameter(WAVEFORM_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Waveform"), B_GENERIC);
    10821086    BDiscreteParameter* waveParam = group->MakeDiscreteParameter(WAVEFORM_PARAM, B_MEDIA_NO_TYPE, "", B_GENERIC);
    1083     waveParam->AddItem(SINE_WAVE, "Sine wave");
    1084     waveParam->AddItem(TRIANGLE_WAVE, "Triangle");
    1085     waveParam->AddItem(SAWTOOTH_WAVE, "Sawtooth");
     1087    waveParam->AddItem(SINE_WAVE, B_TRANSLATE("Sine wave"));
     1088    waveParam->AddItem(TRIANGLE_WAVE, B_TRANSLATE"Triangle"));
     1089    waveParam->AddItem(SAWTOOTH_WAVE, B_TRANSLATE("Sawtooth"));
    10861090    nullParam->AddOutput(waveParam);
    10871091    waveParam->AddInput(nullParam);
    10881092
  • src/apps/cortex/addons/ToneProducer/ToneProducerAddOn.cpp

    diff --git a/src/apps/cortex/addons/ToneProducer/ToneProducerAddOn.cpp b/src/apps/cortex/addons/ToneProducer/ToneProducerAddOn.cpp
    index 4a6bd34..599d3cc 100644
    a b  
    3838#include <cstring>
    3939#include <cstdlib>
    4040
     41#include <Catalog.h>
     42
     43#undef B_TRANSLATION_CONTEXT
     44#define B_TRANSLATION_CONTEXT "CortexAddOnsToneProducer"
     45
    4146// instantiation function
    4247extern "C" _EXPORT BMediaAddOn* make_media_addon(image_id image) {
    4348    return new ToneProducerAddOn(image);
    status_t ToneProducerAddOn::GetFlavorAt(  
    7277
    7378    flavor_info* pInfo = new flavor_info;
    7479    pInfo->internal_id = n;
    75     pInfo->name = "ToneProducer";
     80    pInfo->name = B_TRANSLATE("ToneProducer");
    7681    pInfo->info =
    77         "An add-on version of the ToneProducer node.\n"
     82        B_TRANSLATE("An add-on version of the ToneProducer node.\n"
    7883        "See the Be Developer Newsletter: 2 June, 1999\n"
    79         "adapted by Eric Moon (4 June, 1999)";
     84        "adapted by Eric Moon (4 June, 1999)");
    8085    pInfo->kinds = B_BUFFER_PRODUCER | B_CONTROLLABLE;
    8186    pInfo->flavor_flags = 0;
    8287    pInfo->possible_count = 0;
  • src/apps/cortex/addons/common/AudioFilterNode.cpp

    diff --git a/src/apps/cortex/addons/common/AudioFilterNode.cpp b/src/apps/cortex/addons/common/AudioFilterNode.cpp
    index 79e413f..56d36db 100644
    a b  
    4242#include <Buffer.h>
    4343#include <BufferGroup.h>
    4444#include <ByteOrder.h>
     45#include <Catalog.h>
    4546#include <ParameterWeb.h>
    4647#include <String.h>
    4748#include <TimeSource.h>
     
    5253#include <cstring>
    5354//#include <cmath>
    5455
     56#undef B_TRANSLATION_CONTEXT
     57#define B_TRANSLATION_CONTEXT "CortexAddOnsCommon"
     58
    5559// -------------------------------------------------------- //
    5660// constants
    5761// -------------------------------------------------------- //
    void AudioFilterNode::NodeRegistered() {  
    398402    err = getRequiredInputFormat(m_input.format);
    399403    ASSERT(err == B_OK);
    400404
    401     strncpy(m_input.name, "Audio Input", B_MEDIA_NAME_LENGTH);
     405    strncpy(m_input.name, B_TRANSLATE("Audio input"), B_MEDIA_NAME_LENGTH);
    402406   
    403407    // init output
    404408    m_output.source.port = ControlPort();
    void AudioFilterNode::NodeRegistered() {  
    410414    err = getRequiredOutputFormat(m_output.format);
    411415    ASSERT(err == B_OK);
    412416
    413     strncpy(m_output.name, "Audio Output", B_MEDIA_NAME_LENGTH);
     417    strncpy(m_output.name, B_TRANSLATE("Audio output"), B_MEDIA_NAME_LENGTH);
    414418
    415419    // init parameters
    416420    initParameterWeb();
    void AudioFilterNode::initParameterWeb() {  
    13241328   
    13251329    BParameterWeb* web = new BParameterWeb();
    13261330    BString groupName = Name();
    1327     groupName << " Parameters";
     1331    groupName << B_TRANSLATE(" parameters");
    13281332    BParameterGroup* group = web->MakeGroup(groupName.String());
    13291333    m_parameterSet->populateGroup(group);
    13301334   
  • src/apps/cortex/addons/common/MediaNodeControlApp.cpp

    diff --git a/src/apps/cortex/addons/common/MediaNodeControlApp.cpp b/src/apps/cortex/addons/common/MediaNodeControlApp.cpp
    index d0326eb..1f8b79c 100644
    a b  
    4040#include <ParameterWeb.h>
    4141#include <String.h>
    4242#include <Alert.h>
     43#include <Catalog.h>
    4344
    4445#include <cstdlib>
    4546#include <cstring>
    4647#include <cstdio>
    4748
     49#undef B_TRANSLATION_CONTEXT
     50#define B_TRANSLATION_CONTEXT "CortexAddOnsCommon"
     51
    4852// -------------------------------------------------------- //
    4953// ctor/dtor
    5054// -------------------------------------------------------- //
    MediaNodeControlApp::MediaNodeControlApp(  
    8286    if(err < B_OK) {
    8387        char buffer[512];
    8488        sprintf(buffer,
    85             "MediaNodeControlApp: couldn't find node (%ld):\n%s\n",
     89            B_TRANSLATE("MediaNodeControlApp: couldn't find node (%ld):\n%s\n"),
    8690            nodeID, strerror(err));
    87         BAlert* alert = new BAlert("error", buffer, "OK");
     91        BAlert* alert = new BAlert("error", buffer, B_TRANSLATE("OK"));
    8892        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
    8993        alert->Go();
    9094        return;
    MediaNodeControlApp::MediaNodeControlApp(  
    96100    if(err < B_OK) {
    97101        char buffer[512];
    98102        sprintf(buffer,
    99             "MediaNodeControlApp: couldn't get node info (%ld):\n%s\n",
     103            B_TRANSLATE("MediaNodeControlApp: couldn't get node info (%ld):\n%s\n"),
    100104            nodeID, strerror(err));
    101         BAlert* alert = new BAlert("error", buffer, "OK");
     105        BAlert* alert = new BAlert("error", buffer, B_TRANSLATE("OK"));
    102106        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
    103107        alert->Go();
    104108        return;
    105109    }
    106110   
    107111    BString windowTitle;
    108     windowTitle << nInfo.name << '(' << nodeID << ") controls";    
     112    windowTitle << nInfo.name << '(' << nodeID << ") " << B_TRANSLATE("controls"); 
    109113   
    110114    // get parameter web
    111115    BParameterWeb* pWeb;
    MediaNodeControlApp::MediaNodeControlApp(  
    113117    if(err < B_OK) {
    114118        char buffer[512];
    115119        sprintf(buffer,
    116             "MediaNodeControlApp: no parameters for node (%ld):\n%s\n",
     120            B_TRANSLATE("MediaNodeControlApp: no parameters for node (%ld):\n%s\n"),
    117121            nodeID, strerror(err));
    118         BAlert* alert = new BAlert("error", buffer, "OK");
     122        BAlert* alert = new BAlert("error", buffer, B_TRANSLATE("OK"));
    119123        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
    120124        alert->Go();
    121125        return;
  • src/apps/cortex/support/Jamfile

    diff --git a/src/apps/cortex/support/Jamfile b/src/apps/cortex/support/Jamfile
    index 7ae4a86..4fe4321 100644
    a b StaticLibrary cortex_support.a :  
    1717    observe.cpp
    1818    SoundUtils.cpp
    1919    TextControlFloater.cpp
     20    : $(HAIKU_LOCALE_LIBS)
     21;
     22
     23DoCatalogs Cortex :
     24    application/x-vnd.Cortex.Route
     25    :
     26    MediaString.cpp
    2027;
  • src/apps/cortex/support/MediaString.cpp

    diff --git a/src/apps/cortex/support/MediaString.cpp b/src/apps/cortex/support/MediaString.cpp
    index e156380..ab2bf3c 100644
    a b  
    3737#include <MediaFormats.h>
    3838// Support Kit
    3939#include <String.h>
     40// Locale Kit
     41#include <Catalog.h>
     42
     43#undef B_TRANSLATION_CONTEXT
     44#define B_TRANSLATION_CONTEXT "CortexMediaString"
    4045
    4146__USE_CORTEX_NAMESPACE
    4247
    BString MediaString::getStringFor(  
    5762
    5863    if (kinds & B_BUFFER_PRODUCER) {
    5964        if (first) {
    60             list = "Buffer producer";
     65            list = B_TRANSLATE("Buffer producer");
    6166            first = false;
    6267        }
    6368    }
    6469    if (kinds & B_BUFFER_CONSUMER) {
    6570        if (first) {
    66             list = "Buffer consumer";
     71            list = B_TRANSLATE("Buffer consumer");
    6772            first = false;
    6873        }
    6974        else {
    7075            if (last != "")
    7176                list << ", " << last;
    72             last = "Buffer consumer";
     77            last = B_TRANSLATE("Buffer consumer");
    7378        }
    7479    }
    7580    if (kinds & B_TIME_SOURCE) {
    7681        if (first) {
    77             list = "Time source";
     82            list = B_TRANSLATE("Time source");
    7883            first = false;
    7984        }
    8085        else {
    8186            if (last != "")
    8287                list << ", " << last;
    83             last = "Time source";
     88            last = B_TRANSLATE("Time source");
    8489        }
    8590    }
    8691    if (kinds & B_CONTROLLABLE) {
    8792        if (first) {
    88             list = "Controllable";
     93            list = B_TRANSLATE("Controllable");
    8994            first = false;
    9095        }
    9196        else {
    9297            if (last != "")
    9398                list << ", " << last;
    94             last = "Controllable";
     99            last = B_TRANSLATE("Controllable");
    95100        }
    96101    }
    97102    if (kinds & B_FILE_INTERFACE) {
    98103        if (first) {
    99             list = "File interface";
     104            list = B_TRANSLATE("File interface");
    100105            first = false;
    101106        }
    102107        else {
    103108            if (last != "")
    104109                list << ", " << last;
    105             last = "File interface";
     110            last = B_TRANSLATE("File interface");
    106111        }
    107112    }
    108113    if (kinds & B_ENTITY_INTERFACE) {
    109114        if (first) {
    110             list = "Entity interface";
     115            list = B_TRANSLATE("Entity interface");
    111116            first = false;
    112117        }
    113118        else {
    114119            if (last != "")
    115120                list << ", " << last;
    116             last = "Entity interface";
     121            last = B_TRANSLATE("Entity interface");
    117122        }
    118123    }
    119124    if (kinds & B_PHYSICAL_INPUT) {
    120125        if (first) {
    121             list = "Physical input";
     126            list = B_TRANSLATE("Physical input");
    122127            first = false;
    123128        }
    124129        else {
    125130            if (last != "")
    126131                list << ", " << last;
    127             last = "Physical input";
     132            last = B_TRANSLATE("Physical input");
    128133        }
    129134    }
    130135    if (kinds & B_PHYSICAL_OUTPUT) {
    131136        if (first) {
    132             list = "Physical output";
     137            list = B_TRANSLATE("Physical output");
    133138            first = false;
    134139        }
    135140        else {
    136141            if (last != "")
    137142                list << ", " << last;
    138             last = "Physical output";
     143            last = B_TRANSLATE("Physical output");
    139144        }
    140145    }
    141146    if (kinds & B_SYSTEM_MIXER) {
    142147        if (first) {
    143             list = "System mixer";
     148            list = B_TRANSLATE("System mixer");
    144149            first = false;
    145150        }
    146151        else {
    147152            if (last != "")
    148153                list << ", " << last;
    149             last = "System mixer";
     154            last = B_TRANSLATE("System mixer");
    150155        }
    151156    }
    152157
    BString MediaString::getStringFor(  
    162167    D_METHOD(("MediaString::getStringFor(run_mode)\n"));
    163168
    164169    switch (runMode) {
    165         case BMediaNode::B_OFFLINE:             return "Offline";
    166         case BMediaNode::B_RECORDING:           return "Recording";
    167         case BMediaNode::B_DECREASE_PRECISION:  return "Decrease precision";
    168         case BMediaNode::B_INCREASE_LATENCY:    return "Increase latency";
    169         case BMediaNode::B_DROP_DATA:           return "Drop data";
    170         default:                                return "(unknown run mode)";
     170        case BMediaNode::B_OFFLINE:             return B_TRANSLATE("Offline");
     171        case BMediaNode::B_RECORDING:           return B_TRANSLATE("Recording");
     172        case BMediaNode::B_DECREASE_PRECISION:  return B_TRANSLATE("Decrease precision");
     173        case BMediaNode::B_INCREASE_LATENCY:    return B_TRANSLATE("Increase latency");
     174        case BMediaNode::B_DROP_DATA:           return B_TRANSLATE("Drop data");
     175        default:                                return B_TRANSLATE("(unknown run mode)");
    171176    }
    172177}
    173178
    BString MediaString::getStringFor(  
    181186    D_METHOD(("MediaString::getStringFor(media_type)\n"));
    182187
    183188    switch (type) {
    184         case B_MEDIA_NO_TYPE:           return "Typeless media";
    185         case B_MEDIA_UNKNOWN_TYPE:      return "Unknown media type";
    186         case B_MEDIA_RAW_AUDIO:         return "Raw audio";
    187         case B_MEDIA_RAW_VIDEO:         return "Raw video";
    188         case B_MEDIA_VBL:               return "Raw data from VBL area";
    189         case B_MEDIA_TIMECODE:          return "Timecode";
    190         case B_MEDIA_MIDI:              return "MIDI";
    191         case B_MEDIA_TEXT:              return "Text";
    192         case B_MEDIA_HTML:              return "HTML";
    193         case B_MEDIA_MULTISTREAM:       return "Multistream media";
    194         case B_MEDIA_PARAMETERS:        return "Parameters";
    195         case B_MEDIA_ENCODED_AUDIO:     return "Encoded audio";
    196         case B_MEDIA_ENCODED_VIDEO:     return "Encoded video";
     189        case B_MEDIA_NO_TYPE:           return B_TRANSLATE("Typeless media");
     190        case B_MEDIA_UNKNOWN_TYPE:      return B_TRANSLATE("Unknown media type");
     191        case B_MEDIA_RAW_AUDIO:         return B_TRANSLATE("Raw audio");
     192        case B_MEDIA_RAW_VIDEO:         return B_TRANSLATE("Raw video");
     193        case B_MEDIA_VBL:               return B_TRANSLATE("Raw data from VBL area");
     194        case B_MEDIA_TIMECODE:          return B_TRANSLATE("Timecode");
     195        case B_MEDIA_MIDI:              return B_TRANSLATE("MIDI");
     196        case B_MEDIA_TEXT:              return B_TRANSLATE("Text");
     197        case B_MEDIA_HTML:              return B_TRANSLATE("HTML");
     198        case B_MEDIA_MULTISTREAM:       return B_TRANSLATE("Multistream media");
     199        case B_MEDIA_PARAMETERS:        return B_TRANSLATE("Parameters");
     200        case B_MEDIA_ENCODED_AUDIO:     return B_TRANSLATE("Encoded audio");
     201        case B_MEDIA_ENCODED_VIDEO:     return B_TRANSLATE("Encoded video");
    197202        default: {
    198203            if (type >= B_MEDIA_FIRST_USER_TYPE)
    199                 return "User-defined media type";
     204                return B_TRANSLATE("User-defined media type");
    200205            if (type >= B_MEDIA_PRIVATE)
    201                 return "Private Be media type";
     206                return B_TRANSLATE("Private Be media type");
    202207        }
    203208    }
    204     return "Unknown Media Type";
     209    return B_TRANSLATE("Unknown media type");
    205210}
    206211
    207212BString MediaString::getStringFor(
    BString MediaString::getStringFor(  
    210215    D_METHOD(("MediaString::getStringFor(media_format_family)\n"));
    211216
    212217    switch (family) {
    213         case B_ANY_FORMAT_FAMILY:       return "Any format family";
    214         case B_BEOS_FORMAT_FAMILY:      return "BeOS format family";
    215         case B_QUICKTIME_FORMAT_FAMILY: return "QuickTime format family";
    216         case B_AVI_FORMAT_FAMILY:       return "AVI format family";
    217         case B_ASF_FORMAT_FAMILY:       return "ASF format family";
    218         case B_MPEG_FORMAT_FAMILY:      return "MPEG format family";
    219         case B_WAV_FORMAT_FAMILY:       return "WAV format family";
    220         case B_AIFF_FORMAT_FAMILY:      return "AIFF format family";
    221         default:                        return "Miscellaneous format family";
     218        case B_ANY_FORMAT_FAMILY:       return B_TRANSLATE("Any format family");
     219        case B_BEOS_FORMAT_FAMILY:      return B_TRANSLATE("BeOS format family");
     220        case B_QUICKTIME_FORMAT_FAMILY: return B_TRANSLATE("QuickTime format family");
     221        case B_AVI_FORMAT_FAMILY:       return B_TRANSLATE("AVI format family");
     222        case B_ASF_FORMAT_FAMILY:       return B_TRANSLATE("ASF format family");
     223        case B_MPEG_FORMAT_FAMILY:      return B_TRANSLATE("MPEG format family");
     224        case B_WAV_FORMAT_FAMILY:       return B_TRANSLATE("WAV format family");
     225        case B_AIFF_FORMAT_FAMILY:      return B_TRANSLATE("AIFF format family");
     226        default:                        return B_TRANSLATE("Miscellaneous format family");
    222227    }
    223228}
    224229
    BString MediaString::getStringFor(  
    488493    BString s;
    489494    if ((source.port != media_source::null.port)
    490495     && (source.id != media_source::null.id)) {
    491         s << "Port " << source.port << ", ID " << source.id;
     496        s << B_TRANSLATE("Port ") << source.port << B_TRANSLATE(", ID ") << source.id;
    492497    }
    493498    else {
    494         s = "(none)";
     499        s = B_TRANSLATE("(none)");
    495500    }
    496501    return s;
    497502}
    BString MediaString::getStringFor(  
    504509    BString s;
    505510    if ((destination.port != media_destination::null.port)
    506511     && (destination.id != media_destination::null.id)) {
    507         s << "Port " << destination.port << ", ID " << destination.id;
     512        s << B_TRANSLATE("Port ") << destination.port << B_TRANSLATE(", ID ") << destination.id;
    508513    }
    509514    else {
    510         s = "(none)";
     515        s = B_TRANSLATE("(none)");
    511516    }
    512517    return s;
    513518}
    BString MediaString::forAudioFormat(  
    528533
    529534    switch (format) {
    530535        case media_raw_audio_format::B_AUDIO_UCHAR: {
    531             return "8 bit integer";
     536            return B_TRANSLATE("8 bit integer");
    532537        }
    533538        case media_raw_audio_format::B_AUDIO_SHORT: {
    534             return "16 bit integer";
     539            return B_TRANSLATE("16 bit integer");
    535540        }
    536541        case media_raw_audio_format::B_AUDIO_FLOAT: {
    537             return "32 bit float";
     542            return B_TRANSLATE("32 bit float");
    538543        }
    539544        case media_raw_audio_format::B_AUDIO_INT: {
    540545            BString s = "";
    541546            if (validBits != media_multi_audio_format::wildcard.valid_bits)
    542                 s << validBits << " bit ";
     547                s << validBits << B_TRANSLATE(" bit ");
    543548            else
    544                 s << "32 bit ";
    545             s << "integer";
     549                s << B_TRANSLATE("32 bit ");
     550            s << B_TRANSLATE("integer");
    546551            return s;
    547552        }
    548553        default: {
    549             return "(unknown format)";
     554            return B_TRANSLATE("(unknown format)");
    550555        }
    551556    }
    552557}
    BString MediaString::forAudioChannelCount(  
    576581   
    577582    switch (channelCount) {
    578583        case 1: {
    579             return "Mono";
     584            return B_TRANSLATE("Mono");
    580585        }
    581586        case 2: {
    582             return "Stereo";
     587            return B_TRANSLATE("Stereo");
    583588        }
    584589        default: {
    585590            BString s = "";
    586             s << channelCount << " Channels";
     591            s << channelCount << B_TRANSLATE(" channels");
    587592            return s;
    588593        }   
    589594    }
    BString MediaString::forAudioByteOrder(  
    600605
    601606    switch (byteOrder) {
    602607        case B_MEDIA_BIG_ENDIAN: {
    603             return "Big endian";
     608            return B_TRANSLATE("Big endian");
    604609        }
    605610        case B_MEDIA_LITTLE_ENDIAN: {
    606             return "Little endian";
     611            return B_TRANSLATE("Little endian");
    607612        }
    608613        default: {
    609             return "(unknown byte order)";
     614            return B_TRANSLATE("(unknown byte order)");
    610615        }
    611616    }
    612617}
    BString MediaString::forAudioBufferSize(  
    621626    }
    622627
    623628    BString s = "";
    624     s << bufferSize << " bytes per buffer";
     629    s << bufferSize << B_TRANSLATE(" bytes per buffer");
    625630    return s;
    626631}
    627632
    BString MediaString::forAudioChannelMask(  
    634639
    635640    if (channelMask & B_CHANNEL_LEFT) {
    636641        if (first) {
    637             list = "Left";
     642            list = B_TRANSLATE("Left");
    638643            first = false;
    639644        }
    640645    }
    641646    if (channelMask & B_CHANNEL_RIGHT) {
    642647        if (first) {
    643             list = "Right";
     648            list = B_TRANSLATE("Right");
    644649            first = false;
    645650        }
    646651        else {
    647652            if (last != "")
    648653                list << ", " << last;
    649             last = "Right";
     654            last = B_TRANSLATE("Right");
    650655        }
    651656    }
    652657    if (channelMask & B_CHANNEL_CENTER) {
    653658        if (first) {
    654             list = "Center";
     659            list = B_TRANSLATE("Center");
    655660            first = false;
    656661        }
    657662        else {
    658663            if (last != "")
    659664                list << ", " << last;
    660             last = "Center";
     665            last = B_TRANSLATE("Center");
    661666        }
    662667    }
    663668    if (channelMask & B_CHANNEL_SUB) {
    664669        if (first) {
    665             list = "Sub";
     670            list = B_TRANSLATE("Sub");
    666671            first = false;
    667672        }
    668673        else {
    669674            if (last != "")
    670675                list << ", " << last;
    671             last = "Sub";
     676            last = B_TRANSLATE("Sub");
    672677        }
    673678    }
    674679    if (channelMask & B_CHANNEL_REARLEFT) {
    675680        if (first) {
    676             list = "Rear-left";
     681            list = B_TRANSLATE("Rear-left");
    677682            first = false;
    678683        }
    679684        else {
    680685            if (last != "")
    681686                list << ", " << last;
    682             last = "Rear-left";
     687            last = B_TRANSLATE("Rear-left");
    683688        }
    684689    }
    685690    if (channelMask & B_CHANNEL_REARRIGHT) {
    686691        if (first) {
    687             list = "Rear-right";
     692            list = B_TRANSLATE("Rear-right");
    688693            first = false;
    689694        }
    690695        else {
    691696            if (last != "")
    692697                list << ", " << last;
    693             last = "Rear-right";
     698            last = B_TRANSLATE("Rear-right");
    694699        }
    695700    }
    696701    if (channelMask & B_CHANNEL_FRONT_LEFT_CENTER) {
    697702        if (first) {
    698             list = "Front-left-center";
     703            list = B_TRANSLATE("Front-left-center");
    699704            first = false;
    700705        }
    701706        else {
    702707            if (last != "")
    703708                list << ", " << last;
    704             last = "Front-left-center";
     709            last = B_TRANSLATE("Front-left-center");
    705710        }
    706711    }
    707712    if (channelMask & B_CHANNEL_FRONT_RIGHT_CENTER) {
    708713        if (first) {
    709             list = "Front-right-center";
     714            list = B_TRANSLATE("Front-right-center");
    710715            first = false;
    711716        }
    712717        else {
    713718            if (last != "")
    714719                list << ", " << last;
    715             last = "Front-right-center";
     720            last = B_TRANSLATE("Front-right-center");
    716721        }
    717722    }
    718723    if (channelMask & B_CHANNEL_BACK_CENTER) {
    719724        if (first) {
    720             list = "Back-center";
     725            list = B_TRANSLATE("Back-center");
    721726            first = false;
    722727        }
    723728        else {
    724729            if (last != "")
    725730                list << ", " << last;
    726             last = "Back-center";
     731            last = B_TRANSLATE("Back-center");
    727732        }
    728733    }
    729734    if (channelMask & B_CHANNEL_SIDE_LEFT) {
    730735        if (first) {
    731             list = "Side-left";
     736            list = B_TRANSLATE("Side-left");
    732737            first = false;
    733738        }
    734739        else {
    735740            if (last != "")
    736741                list << ", " << last;
    737             last = "Side-left";
     742            last = B_TRANSLATE("Side-left");
    738743        }
    739744    }
    740745    if (channelMask & B_CHANNEL_SIDE_RIGHT) {
    741746        if (first) {
    742             list = "Side-right";
     747            list = B_TRANSLATE("Side-right");
    743748            first = false;
    744749        }
    745750        else {
    746751            if (last != "")
    747752                list << ", " << last;
    748             last = "Side-right";
     753            last = B_TRANSLATE("Side-right");
    749754        }
    750755    }
    751756    if (channelMask & B_CHANNEL_TOP_CENTER) {
    752757        if (first) {
    753             list = "Top-center";
     758            list = B_TRANSLATE("Top-center");
    754759            first = false;
    755760        }
    756761        else {
    757762            if (last != "")
    758763                list << ", " << last;
    759             last = "Top-center";
     764            last = B_TRANSLATE("Top-center");
    760765        }
    761766    }
    762767    if (channelMask & B_CHANNEL_TOP_FRONT_LEFT) {
    763768        if (first) {
    764             list = "Top-Front-left";
     769            list = B_TRANSLATE("Top-front-left");
    765770            first = false;
    766771        }
    767772        else {
    768773            if (last != "")
    769774                list << ", " << last;
    770             last = "Top-Front-left";
     775            last = B_TRANSLATE("Top-front-left");
    771776        }
    772777    }
    773778    if (channelMask & B_CHANNEL_TOP_FRONT_CENTER) {
    774779        if (first) {
    775             list = "Top-Front-center";
     780            list = B_TRANSLATE("Top-front-center");
    776781            first = false;
    777782        }
    778783        else {
    779784            if (last != "")
    780785                list << ", " << last;
    781             last = "Top-Front-center";
     786            last = B_TRANSLATE("Top-front-center");
    782787        }
    783788    }
    784789    if (channelMask & B_CHANNEL_TOP_FRONT_RIGHT) {
    785790        if (first) {
    786             list = "Top-Front-right";
     791            list = B_TRANSLATE("Top-front-right");
    787792            first = false;
    788793        }
    789794        else {
    790795            if (last != "")
    791796                list << ", " << last;
    792             last = "Top-Front-right";
     797            last = B_TRANSLATE("Top-front-right");
    793798        }
    794799    }
    795800    if (channelMask & B_CHANNEL_TOP_BACK_LEFT) {
    796801        if (first) {
    797             list = "Top-Back-left";
     802            list = B_TRANSLATE("Top-back-left");
    798803            first = false;
    799804        }
    800805        else {
    801806            if (last != "")
    802807                list << ", " << last;
    803             last = "Top-Back-left";
     808            last = B_TRANSLATE("Top-back-left");
    804809        }
    805810    }
    806811    if (channelMask & B_CHANNEL_TOP_BACK_CENTER) {
    807812        if (first) {
    808             list = "Top-Back-center";
     813            list = B_TRANSLATE("Top-back-center");
    809814            first = false;
    810815        }
    811816        else {
    812817            if (last != "")
    813818                list << ", " << last;
    814             last = "Top-Back-center";
     819            last = B_TRANSLATE("Top-back-center");
    815820        }
    816821    }
    817822    if (channelMask & B_CHANNEL_TOP_BACK_RIGHT) {
    818823        if (first) {
    819             list = "Top-Back-right";
     824            list = B_TRANSLATE("Top-back-right");
    820825            first = false;
    821826        }
    822827        else {
    823828            if (last != "")
    824829                list << ", " << last;
    825             last = "Top-Back-right";
     830            last = B_TRANSLATE("Top-back-right");
    826831        }
    827832    }
    828833    if (last != "") {
    829834        list << " & " << last;
    830835    }
    831836    if (list == "") {
    832         list = "(none)";
     837        list = B_TRANSLATE("(none)");
    833838    }
    834839
    835840    return list;
    BString MediaString::forAudioMatrixMask(  
    840845    D_METHOD(("MediaString::forAudioMatrixMask()\n"));
    841846
    842847    switch (matrixMask) {
    843         case 0:                                 return "(none)";
    844         case B_MATRIX_PROLOGIC_LR:              return "ProLogic LR";
    845         case B_MATRIX_AMBISONIC_WXYZ:           return "Ambisonic WXYZ";
    846         default:                                return "(unknown matrix mask)";
     848        case 0:                                 return B_TRANSLATE("(none)");
     849        case B_MATRIX_PROLOGIC_LR:              return B_TRANSLATE("ProLogic LR");
     850        case B_MATRIX_AMBISONIC_WXYZ:           return B_TRANSLATE("Ambisonic WXYZ");
     851        default:                                return B_TRANSLATE("(unknown matrix mask)");
    847852    }
    848853}
    849854
    BString MediaString::forAudioFrameSize(  
    876881    }
    877882
    878883    BString s = "";
    879     s << frameSize << " bytes per frame";
     884    s << frameSize << B_TRANSLATE(" bytes per frame");
    880885    return s;
    881886}
    882887
    BString MediaString::forVideoFormat(  
    907912        case B_RGB15_BIG:       return "15 bit RGB";
    908913        case B_RGBA15:
    909914        case B_RGBA15_BIG:      return "15 bit RGBA";
    910         case B_CMAP8:           return "8 bit color-index";
    911         case B_GRAY8:           return "8 bit grayscale-index";
    912         case B_GRAY1:           return "Monochrome";
     915        case B_CMAP8:           return B_TRANSLATE("8 bit color-index");
     916        case B_GRAY8:           return B_TRANSLATE("8 bit grayscale-index");
     917        case B_GRAY1:           return B_TRANSLATE("Monochrome");
    913918        case B_YUV422:          return "YUV422";
    914919        case B_YUV411:          return "YUV411";
    915920        case B_YUV420:          return "YUV420";
    BString MediaString::forVideoFormat(  
    940945        case B_CMYA32:          return "32 bit CMYA";
    941946        case B_CMYK32:          return "32 bit CMYK";
    942947        default: {
    943             return "(unknown video format)";
     948            return B_TRANSLATE("(unknown video format)");
    944949        }
    945950    }
    946951}
    BString MediaString::forVideoFieldRate(  
    973978
    974979    BString s = "";
    975980    if (interlace == 1) {
    976         s << "Non-interlaced ";
     981        s << B_TRANSLATE("Non-interlaced ");
    977982    }
    978983    else {
    979         s << "Interlaced ";
     984        s << B_TRANSLATE("Interlaced ");
    980985    }
    981986    s << fieldRate << " Hz";
    982987    if ((fieldRate > 49.9) && (fieldRate < 50.1)) {
    BString MediaString::forVideoOrientation(  
    10011006
    10021007    switch (orientation) {
    10031008        case B_VIDEO_TOP_LEFT_RIGHT: {
    1004             return "Top to bottom, left to right";
     1009            return B_TRANSLATE("Top to bottom, left to right");
    10051010        }
    10061011        case B_VIDEO_BOTTOM_LEFT_RIGHT: {
    1007             return "Bottom to top, left to right";
     1012            return B_TRANSLATE("Bottom to top, left to right");
    10081013        }
    10091014        default: {
    1010             return "(unkown video orientation)";
     1015            return B_TRANSLATE("(unkown video orientation)");
    10111016        }
    10121017    }
    10131018}
    BString MediaString::forVideoActiveLines(  
    10401045        return "*";
    10411046    }
    10421047
    1043     BString s = "Video data between";
    1044     s << " line " << firstActive;
    1045     s << " and " << lastActive;
     1048    BString s = B_TRANSLATE("Video data between");
     1049    s << B_TRANSLATE(" line ") << firstActive;
     1050    s << B_TRANSLATE(" and ") << lastActive;
    10461051    return s;
    10471052}
    10481053
    BString MediaString::forVideoBytesPerRow(  
    10561061    }
    10571062
    10581063    BString s = "";
    1059     s << bytesPerRow << " bytes per row";
     1064    s << bytesPerRow << B_TRANSLATE(" bytes per row");
    10601065    return s;
    10611066}
    10621067
    BString MediaString::forVideoOffset(  
    10681073
    10691074    BString s = "";
    10701075    if (pixelOffset != media_video_display_info::wildcard.pixel_offset) {
    1071         s << pixelOffset << " pixels";
     1076        s << pixelOffset << B_TRANSLATE(" pixels");
    10721077    }
    10731078    if (lineOffset != media_video_display_info::wildcard.line_offset) {
    10741079        if (s != "") {
    10751080            s << ", ";
    10761081        }
    1077         s << pixelOffset << " lines";
     1082        s << pixelOffset << B_TRANSLATE(" lines");
    10781083    }
    10791084    if (s == "") {
    10801085        s = "*";
    BString MediaString::forVideoBitRate(  
    10951100
    10961101    BString s = "";
    10971102    if (avgBitRate != media_encoded_video_format::wildcard.avg_bit_rate) {
    1098         s << avgBitRate / 1000.0f << " kb/s (avg)";
     1103        s << avgBitRate / 1000.0f << B_TRANSLATE(" kb/s (avg)");
    10991104    }
    11001105    if (maxBitRate != media_encoded_video_format::wildcard.max_bit_rate) {
    11011106        if (s != "") {
    11021107            s << ", ";
    11031108        }
    1104         s << maxBitRate / 1000.0f << " kb/s (max)";
     1109        s << maxBitRate / 1000.0f << B_TRANSLATE(" kb/s (max)");
    11051110    }
    11061111    if (s == "") {
    11071112        s = "*";
    BString MediaString::forVideoFrameSize(  
    11191124    }
    11201125
    11211126    BString s = "";
    1122     s << frameSize << " bytes per frame";
     1127    s << frameSize << B_TRANSLATE(" bytes per frame");
    11231128    return s;
    11241129}
    11251130
    BString MediaString::forVideoHistory(  
    11311136
    11321137    BString s = "";
    11331138    if (forwardHistory != media_encoded_video_format::wildcard.forward_history) {
    1134         s << static_cast<int32>(forwardHistory) << " frames forward";
     1139        s << static_cast<int32>(forwardHistory) << B_TRANSLATE(" frames forward");
    11351140    }
    11361141    if (backwardHistory != media_encoded_video_format::wildcard.backward_history) {
    11371142        if (s != "") {
    11381143            s << ", ";
    11391144        }
    1140         s << static_cast<int32>(backwardHistory) << " frames backward";
     1145        s << static_cast<int32>(backwardHistory) << B_TRANSLATE(" frames backward");
    11411146    }
    11421147    if (s == "") {
    11431148        s = "*";
    BString MediaString::forMultistreamFormat(  
    11601165    }
    11611166
    11621167    switch (format) {
    1163         case media_multistream_format::B_VID:       return "BeOS video";
     1168        case media_multistream_format::B_VID:       return B_TRANSLATE("BeOS video");
    11641169        case media_multistream_format::B_AVI:       return "AVI";
    11651170        case media_multistream_format::B_MPEG1:     return "MPEG1";
    11661171        case media_multistream_format::B_MPEG2:     return "MPEG2";
    11671172        case media_multistream_format::B_QUICKTIME: return "QuickTime";
    1168         default:                                    return "(unknown multistream format)";
     1173        default:                                    return B_TRANSLATE("(unknown multistream format)");
    11691174    }
    11701175}
    11711176
    BString MediaString::forMultistreamBitRate(  
    11771182
    11781183    BString s = "";
    11791184    if (avgBitRate != media_multistream_format::wildcard.avg_bit_rate) {
    1180         s << avgBitRate / 1000.0f << " kb/s (avg)";
     1185        s << avgBitRate / 1000.0f << B_TRANSLATE(" kb/s (avg)");
    11811186    }
    11821187    if (maxBitRate != media_multistream_format::wildcard.max_bit_rate) {
    11831188        if (s != "") {
    11841189            s << ", ";
    11851190        }
    1186         s << maxBitRate / 1000.0f << " kb/s (max)";
     1191        s << maxBitRate / 1000.0f << B_TRANSLATE(" kb/s (max)");
    11871192    }
    11881193    if (s == "") {
    11891194        s = "*";
    BString MediaString::forMultistreamChunkSize(  
    11991204
    12001205    BString s = "";
    12011206    if (avgChunkSize != media_multistream_format::wildcard.avg_chunk_size) {
    1202         s << avgChunkSize << " bytes (avg)";
     1207        s << avgChunkSize << B_TRANSLATE(" bytes (avg)");
    12031208    }
    12041209    if (maxChunkSize != media_multistream_format::wildcard.max_chunk_size) {
    12051210        if (s != "") {
    12061211            s << ", ";
    12071212        }
    1208         s << maxChunkSize << " bytes (max)";
     1213        s << maxChunkSize << B_TRANSLATE(" bytes (max)");
    12091214    }
    12101215    if (s == "") {
    12111216        s = "*";
    BString MediaString::forMultistreamFlags(  
    12231228
    12241229    if (flags & media_multistream_format::B_HEADER_HAS_FLAGS) {
    12251230        if (first) {
    1226             list = "Header has flags";
     1231            list = B_TRANSLATE("Header has flags");
    12271232            first = false;
    12281233        }
    12291234    }
    12301235    if (flags & media_multistream_format::B_CLEAN_BUFFERS) {
    12311236        if (first) {
    1232             list = "Clean buffers";
     1237            list = B_TRANSLATE("Clean buffers");
    12331238            first = false;
    12341239        }
    12351240        else {
    12361241            if (last != "")
    12371242                list << ", " << last;
    1238             last = "Clean buffers";
     1243            last = B_TRANSLATE("Clean buffers");
    12391244        }
    12401245    }
    12411246    if (flags & media_multistream_format::B_HOMOGENOUS_BUFFERS) {
    12421247        if (first) {
    1243             list = "Homogenous buffers";
     1248            list = B_TRANSLATE("Homogenous buffers");
    12441249            first = false;
    12451250        }
    12461251        else {
    12471252            if (last != "")
    12481253                list << ", " << last;
    1249             last = "Homogenous buffers";
     1254            last = B_TRANSLATE("Homogenous buffers");
    12501255        }
    12511256    }
    12521257
    BString MediaString::forMultistreamFlags(  
    12541259        list << " & " << last;
    12551260
    12561261    if (list == "")
    1257         list = "(none)";
     1262        list = B_TRANSLATE("(none)");
    12581263
    12591264    return list;
    12601265}