Ticket #7128: icotranslator-localization.patch

File icotranslator-localization.patch, 5.3 KB (added by Karvjorm, 14 years ago)

A ICOTranslator localization patch

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

     
    77#include "ConfigView.h"
    88#include "ICOTranslator.h"
    99
     10#include <Catalog.h>
    1011#include <CheckBox.h>
    1112#include <ControlLook.h>
    1213#include <SpaceLayoutItem.h>
     
    1516#include <stdio.h>
    1617#include <string.h>
    1718
     19#undef B_TRANSLATE_CONTEXT
     20#define B_TRANSLATE_CONTEXT "ConfigView"
    1821
     22
    1923ConfigView::ConfigView()
    2024    :
    21     BGroupView("ICOTranslator Settings", B_VERTICAL, 0)
     25    BGroupView(B_TRANSLATE("ICOTranslator Settings"), B_VERTICAL, 0)
    2226{
    2327    BAlignment leftAlignment(B_ALIGN_LEFT, B_ALIGN_VERTICAL_UNSET);
    2428
    25     BStringView* stringView = new BStringView("title", "Windows icon images");
     29    BStringView* stringView = new BStringView("title",
     30        B_TRANSLATE("Windows icon images"));
    2631    stringView->SetFont(be_bold_font);
    2732    stringView->SetExplicitAlignment(leftAlignment);
    2833    AddChild(stringView);
     
    3136    AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing));
    3237
    3338    char version[256];
    34     sprintf(version, "Version %d.%d.%d, %s",
     39    sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
    3540        int(B_TRANSLATION_MAJOR_VERSION(ICO_TRANSLATOR_VERSION)),
    3641        int(B_TRANSLATION_MINOR_VERSION(ICO_TRANSLATOR_VERSION)),
    3742        int(B_TRANSLATION_REVISION_VERSION(ICO_TRANSLATOR_VERSION)),
     
    4752
    4853    AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing));
    4954
    50     BCheckBox *checkBox = new BCheckBox("color", "Write 32 bit images on"
    51         " true color input", NULL);
     55    BCheckBox *checkBox = new BCheckBox("color",
     56        B_TRANSLATE("Write 32 bit images on true color input"), NULL);
    5257    checkBox->SetExplicitAlignment(leftAlignment);
    5358    AddChild(checkBox);
    5459
    55     checkBox = new BCheckBox("size", "Enforce valid icon sizes", NULL);
     60    checkBox = new BCheckBox("size", B_TRANSLATE("Enforce valid icon sizes"),
     61        NULL);
    5662    checkBox->SetValue(1);
    5763    checkBox->SetExplicitAlignment(leftAlignment);
    5864    AddChild(checkBox);
    5965
    6066    AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing));
    6167
    62     stringView = new BStringView("valid1", "Valid icon sizes are"
    63         " 16, 32, or 48");
     68    stringView = new BStringView("valid1",
     69        B_TRANSLATE("Valid icon sizes are 16, 32, or 48"));
    6470    stringView->SetExplicitAlignment(leftAlignment);
    6571    AddChild(stringView);
    6672
    67     stringView = new BStringView("valid2", "pixel in either direction.");
     73    stringView = new BStringView("valid2",
     74        B_TRANSLATE("pixel in either direction."));
    6875    stringView->SetExplicitAlignment(leftAlignment);
    6976    AddChild(stringView);
    7077
  • src/add-ons/translators/ico/ICOTranslator.cpp

     
    88#include "ConfigView.h"
    99#include "ICO.h"
    1010
     11#include <Catalog.h>
    1112#include <stdlib.h>
    1213#include <stdio.h>
    1314#include <string.h>
    1415
     16#undef B_TRANSLATE_CONTEXT
     17#define B_TRANSLATE_CONTEXT "ICOTranslator"
    1518
     19
    1620const char *kDocumentCount = "/documentCount";
    1721const char *kDocumentIndex = "/documentIndex";
    1822
     
    7276
    7377
    7478ICOTranslator::ICOTranslator()
    75     : BaseTranslator("Windows icon images", "Windows icon translator",
     79    : BaseTranslator(B_TRANSLATE("Windows icon images"),
     80        B_TRANSLATE("Windows icon translator"),
    7681        ICO_TRANSLATOR_VERSION,
    7782        sInputFormats, kNumInputFormats,
    7883        sOutputFormats, kNumOutputFormats,
     
    107112    info->group = B_TRANSLATOR_BITMAP;
    108113    info->quality = ICO_IN_QUALITY;
    109114    info->capability = ICO_IN_CAPABILITY;
    110     snprintf(info->name, sizeof(info->name), "Windows %s %ld bit image",
    111         type == ICO::kTypeIcon ? "Icon" : "Cursor", bitsPerPixel);
     115    snprintf(info->name, sizeof(info->name),
     116        B_TRANSLATE("Windows %s %ld bit image"),
     117        type == ICO::kTypeIcon ? B_TRANSLATE("Icon") : B_TRANSLATE("Cursor"),
     118        bitsPerPixel);
    112119    strcpy(info->MIME, kICOMimeType);
    113120
    114121    return B_OK;
  • src/add-ons/translators/ico/main.cpp

     
    99
    1010#include "TranslatorWindow.h"
    1111#include <Application.h>
     12#include <Catalog.h>
    1213
     14#undef B_TRANSLATE_CONTEXT
     15#define B_TRANSLATE_CONTEXT "main"
    1316
     17
    1418int
    1519main(int /*argc*/, char **/*argv*/)
    1620{
    1721    BApplication app("application/x-vnd.Haiku-ICOTranslator");
    1822
    1923    status_t result;
    20     result = LaunchTranslatorWindow(new ICOTranslator, "ICO Settings", BRect(0, 0, 225, 175));
     24    result = LaunchTranslatorWindow(new ICOTranslator,
     25        B_TRANSLATE("ICO Settings"), BRect(0, 0, 225, 175));
    2126    if (result != B_OK)
    2227        return 1;
    2328
  • src/add-ons/translators/ico/Jamfile

     
    1010    ICOTranslator.cpp
    1111    ConfigView.cpp
    1212    ICO.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 ICOTranslator :
     18    x-vnd.Haiku-ICOTranslator
     19    :
     20    ConfigView.cpp
     21    ICOTranslator.cpp
     22;
     23
    1824Package haiku-translationkit-cvs :
    1925    ICOTranslator
    2026    : boot home config add-ons Translators