Ticket #9339: 0001-Added-localization-support-for-Apple-Icon-translator.patch

File 0001-Added-localization-support-for-Apple-Icon-translator.patch, 3.1 KB (added by dsjonny, 11 years ago)
  • src/add-ons/translators/icns/ConfigView.cpp

    From 5a6557756732706d36ff243aa3794546d2e058e2 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Dancs=C3=B3=20R=C3=B3bert?= <dancso.robert@d-rendszer.hu>
    Date: Sat, 29 Dec 2012 19:44:02 +0100
    Subject: [PATCH] Added localization support for Apple Icon translator.
    
    ---
     src/add-ons/translators/icns/ConfigView.cpp     |    8 ++++++--
     src/add-ons/translators/icns/ICNSTranslator.cpp |    9 +++++++--
     src/add-ons/translators/icns/Jamfile            |    1 +
     3 files changed, 14 insertions(+), 4 deletions(-)
    
    diff --git a/src/add-ons/translators/icns/ConfigView.cpp b/src/add-ons/translators/icns/ConfigView.cpp
    index 69c3f53..289d2d8 100644
    a b  
    66#include "ConfigView.h"
    77#include "ICNSTranslator.h"
    88
     9#include <Catalog.h>
    910#include <StringView.h>
    1011#include <SpaceLayoutItem.h>
    1112#include <ControlLook.h>
    1213
    1314#include <stdio.h>
    1415
     16#undef B_TRANSLATION_CONTEXT
     17#define B_TRANSLATION_CONTEXT "ICNSConfig"
     18
    1519extern "C" {
    1620#include <openjpeg.h>
    1721};
    ConfigView::ConfigView(TranslatorSettings *settings)  
    2327    fSettings = settings;
    2428    BAlignment leftAlignment(B_ALIGN_LEFT, B_ALIGN_VERTICAL_UNSET);
    2529
    26     BStringView *stringView = new BStringView("title", "Apple icon translator");
     30    BStringView *stringView = new BStringView("title", B_TRANSLATE("Apple icon translator"));
    2731    stringView->SetFont(be_bold_font);
    2832    stringView->SetExplicitAlignment(leftAlignment);
    2933    AddChild(stringView);
    ConfigView::ConfigView(TranslatorSettings *settings)  
    3236    AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing));
    3337
    3438    char version[256];
    35     sprintf(version, "Version %d.%d.%d, %s",
     39    sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
    3640        int(B_TRANSLATION_MAJOR_VERSION(ICNS_TRANSLATOR_VERSION)),
    3741        int(B_TRANSLATION_MINOR_VERSION(ICNS_TRANSLATOR_VERSION)),
    3842        int(B_TRANSLATION_REVISION_VERSION(ICNS_TRANSLATOR_VERSION)),
  • src/add-ons/translators/icns/ICNSTranslator.cpp

    diff --git a/src/add-ons/translators/icns/ICNSTranslator.cpp b/src/add-ons/translators/icns/ICNSTranslator.cpp
    index c4cf42d..c70b5bd 100644
    a b  
    1313#include "ConfigView.h"
    1414#include "ICNSLoader.h"
    1515
     16#include <Catalog.h>
     17
     18#undef B_TRANSLATION_CONTEXT
     19#define B_TRANSLATION_CONTEXT "ICNSTranslator"
     20
    1621extern "C" {
    1722#include "icns.h"
    1823}
    const uint32 kNumDefaultSettings = sizeof(sDefaultSettings)  
    7883
    7984
    8085ICNSTranslator::ICNSTranslator()
    81     : BaseTranslator("Apple icons",
    82         "Apple icon translator",
     86    : BaseTranslator(B_TRANSLATE("Apple icons"),
     87        B_TRANSLATE("Apple icon translator"),
    8388        ICNS_TRANSLATOR_VERSION,
    8489        sInputFormats, kNumInputFormats,
    8590        sOutputFormats, kNumOutputFormats,
  • src/add-ons/translators/icns/Jamfile

    diff --git a/src/add-ons/translators/icns/Jamfile b/src/add-ons/translators/icns/Jamfile
    index 23b3e44..58ea7b5 100644
    a b Translator ICNSTranslator :  
    8080DoCatalogs ICNSTranslator :
    8181    x-vnd.Haiku-ICNSTranslator
    8282    :
     83    ICNSConfigView.cpp
    8384    ICNSTranslator.h
    8485    ICNSTranslator.cpp
    8586;