Ticket #7119: exrtranslator-localization.patch

File exrtranslator-localization.patch, 4.2 KB (added by Karvjorm, 9 years ago)

An EXRTranslator localization patch

  • src/add-ons/translators/exr/ConfigView.cpp

     
    99#include "ConfigView.h"
    1010#include "EXRTranslator.h"
    1111
    12 #include <StringView.h>
     12#include <Catalog.h>
    1313#include <CheckBox.h>
    1414#include <GroupLayout.h>
    1515#include <GroupLayoutBuilder.h>
    1616#include <SpaceLayoutItem.h>
     17#include <StringView.h>
    1718
    1819#include <stdio.h>
    1920#include <string.h>
    2021
     22#undef B_TRANSLATE_CONTEXT
     23#define B_TRANSLATE_CONTEXT "ConfigView"
    2124
     25
    2226ConfigView::ConfigView(uint32 flags)
    2327    : BView("EXRTranslator Settings", flags)
    2428{
    2529    SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    2630
    27     BStringView *fTitle = new BStringView("title", "EXR Images");
     31    BStringView *fTitle = new BStringView("title", B_TRANSLATE("EXR Images"));
    2832    fTitle->SetFont(be_bold_font);
    2933
    3034    char version[256];
    31     sprintf(version, "Version %d.%d.%d, %s",
     35    sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
    3236        int(B_TRANSLATION_MAJOR_VERSION(EXR_TRANSLATOR_VERSION)),
    3337        int(B_TRANSLATION_MINOR_VERSION(EXR_TRANSLATOR_VERSION)),
    3438        int(B_TRANSLATION_REVISION_VERSION(EXR_TRANSLATOR_VERSION)),
     
    3943        B_UTF8_COPYRIGHT "2008 Haiku Inc.");
    4044
    4145    BStringView *fCopyright2 = new BStringView("copyright2",
    42         "Based on OpenEXR (http://www.openexr.com)");
     46        B_TRANSLATE("Based on OpenEXR (http://www.openexr.com)"));
    4347
    4448    BStringView *fCopyright3 = new BStringView("copyright3",
    4549        B_UTF8_COPYRIGHT "2006, Industrial Light & Magic,");
    4650
    4751    BStringView *fCopyright4 = new BStringView("copyright4",
    48         "a division of Lucasfilm Entertainment Company Ltd");
     52        B_TRANSLATE("a division of Lucasfilm Entertainment Company Ltd"));
    4953
    5054    // Build the layout
    5155    SetLayout(new BGroupLayout(B_HORIZONTAL));
  • src/add-ons/translators/exr/main.cpp

     
    88
    99#include "TranslatorWindow.h"
    1010#include <Application.h>
     11#include <Catalog.h>
    1112
     13#undef B_TRANSLATE_CONTEXT
     14#define B_TRANSLATE_CONTEXT "main"
    1215
    1316int
    1417main(int /*argc*/, char **/*argv*/)
     
    1619    BApplication app("application/x-vnd.Haiku-EXRTranslator");
    1720
    1821    status_t result;
    19     result = LaunchTranslatorWindow(new EXRTranslator, "EXR Settings");
     22    result = LaunchTranslatorWindow(new EXRTranslator,
     23        B_TRANSLATE("EXR Settings"));
    2024    if (result != B_OK)
    2125        return 1;
    2226
  • src/add-ons/translators/exr/Jamfile

     
    1818    : true
    1919;
    2020
     21DoCatalogs EXRTranslator :
     22    x-vnd.Haiku-EXRTranslator
     23    :
     24    ConfigView.cpp
     25    EXRTranslator.cpp
     26    main.cpp
     27;
     28
    2129Package haiku-translationkit-cvs :
    2230    EXRTranslator :
    2331    boot home config add-ons Translators ;
  • src/add-ons/translators/exr/EXRTranslator.cpp

     
    55 * Distributed under the terms of the MIT License.
    66 */
    77
     8#include <Catalog.h>
     9
    810#include "ConfigView.h"
    911#include "EXRGamma.h"
    1012#include "EXRTranslator.h"
     
    1416#include "ImfRgbaFile.h"
    1517#include "IStreamWrapper.h"
    1618
     19#undef B_TRANSLATE_CONTEXT
     20#define B_TRANSLATE_CONTEXT "EXRTranslator"
    1721
     22
    1823// The input formats that this translator supports.
    1924translation_format sInputFormats[] = {
    2025    {
     
    5661
    5762
    5863EXRTranslator::EXRTranslator()
    59     : BaseTranslator("EXR Images", "EXR image translator",
     64    : BaseTranslator(B_TRANSLATE("EXR Images"),
     65        B_TRANSLATE("EXR image translator"),
    6066        EXR_TRANSLATOR_VERSION,
    6167        sInputFormats, kNumInputFormats,
    6268        sOutputFormats, kNumOutputFormats,
     
    9298            outInfo->quality = EXR_IN_QUALITY;
    9399            outInfo->capability = EXR_IN_CAPABILITY;
    94100            strcpy(outInfo->MIME, "image/exr");
    95             strcpy(outInfo->name, "EXR image");
     101            strcpy(outInfo->name, B_TRANSLATE("EXR image"));
    96102        }
    97103    } catch (const std::exception &e) {
    98104        return B_NO_TRANSLATOR;