Ticket #7129: pcxtranslator-localization.patch

File pcxtranslator-localization.patch, 4.0 KB (added by Karvjorm, 13 years ago)

A PCXTranslator localization patch

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

     
    88#include "ConfigView.h"
    99#include "PCXTranslator.h"
    1010
     11#include <Catalog.h>
    1112#include <StringView.h>
    1213#include <CheckBox.h>
    1314
     
    1516#include <string.h>
    1617
    1718
     19#undef B_TRANSLATE_CONTEXT
     20#define B_TRANSLATE_CONTEXT "ConfigView"
     21
     22
    1823ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags)
    19     : BView(frame, "PCXTranslator Settings", resize, flags)
     24    : BView(frame, B_TRANSLATE("PCXTranslator Settings"), resize, flags)
    2025{
    2126    SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    2227
     
    2530    float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading;
    2631
    2732    BRect rect(10, 10, 200, 10 + height);
    28     BStringView *stringView = new BStringView(rect, "title", "PCX images");
     33    BStringView *stringView = new BStringView(rect, "title",
     34        B_TRANSLATE("PCX images"));
    2935    stringView->SetFont(be_bold_font);
    3036    stringView->ResizeToPreferred();
    3137    AddChild(stringView);
    3238
    3339    rect.OffsetBy(0, height + 10);
    3440    char version[256];
    35     sprintf(version, "Version %d.%d.%d, %s",
     41    sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
    3642        int(B_TRANSLATION_MAJOR_VERSION(PCX_TRANSLATOR_VERSION)),
    3743        int(B_TRANSLATION_MINOR_VERSION(PCX_TRANSLATOR_VERSION)),
    3844        int(B_TRANSLATION_REVISION_VERSION(PCX_TRANSLATOR_VERSION)),
  • src/add-ons/translators/pcx/PCXTranslator.cpp

     
    99#include "ConfigView.h"
    1010#include "PCX.h"
    1111
     12#include <Catalog.h>
    1213#include <stdlib.h>
    1314#include <stdio.h>
    1415#include <string.h>
    1516
     17#undef B_TRANSLATE_CONTEXT
     18#define B_TRANSLATE_CONTEXT "PCXTranslator"
    1619
    1720#define kPCXMimeType "image/x-pcx"
    1821
     
    6972
    7073
    7174PCXTranslator::PCXTranslator()
    72     : BaseTranslator("PCX images", "PCX translator",
     75    : BaseTranslator(B_TRANSLATE("PCX images"), B_TRANSLATE("PCX translator"),
    7376        PCX_TRANSLATOR_VERSION,
    7477        sInputFormats, kNumInputFormats,
    7578        sOutputFormats, kNumOutputFormats,
     
    104107    info->group = B_TRANSLATOR_BITMAP;
    105108    info->quality = PCX_IN_QUALITY;
    106109    info->capability = PCX_IN_CAPABILITY;
    107     snprintf(info->name, sizeof(info->name), "PCX %lu bit image",
     110    snprintf(info->name, sizeof(info->name), B_TRANSLATE("PCX %lu bit image"),
    108111        bitsPerPixel);
    109112    strcpy(info->MIME, kPCXMimeType);
    110113
  • src/add-ons/translators/pcx/main.cpp

     
    1010
    1111#include "TranslatorWindow.h"
    1212#include <Application.h>
     13#include <Catalog.h>
    1314
    1415
     16#undef B_TRANSLATE_CONTEXT
     17#define B_TRANSLATE_CONTEXT "main"
     18
     19
    1520int
    1621main(int /*argc*/, char **/*argv*/)
    1722{
    1823    BApplication app("application/x-vnd.Haiku-PCXTranslator");
    1924
    2025    status_t result;
    21     result = LaunchTranslatorWindow(new PCXTranslator, "PCX Settings", BRect(0, 0, 225, 175));
     26    result = LaunchTranslatorWindow(new PCXTranslator,
     27        B_TRANSLATE("PCX Settings"), BRect(0, 0, 225, 175));
    2228    if (result != B_OK)
    2329        return 1;
    2430
  • src/add-ons/translators/pcx/Jamfile

     
    1010    PCXTranslator.cpp
    1111    ConfigView.cpp
    1212    PCX.cpp
    13     : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++)
    14     $(HAIKU_LOCALE_LIBS)
     13    : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
    1514    : true
    1615;
    1716
     17DoCatalogs PCXTranslator :
     18    x-vnd.Haiku-PCXTranslator
     19    :
     20    main.cpp
     21    ConfigView.cpp
     22    PCXTranslator.cpp
     23;
     24
    1825Package haiku-translationkit-cvs :
    1926    PCXTranslator
    2027    : boot home config add-ons Translators