Apply patch by dsjonny from ticket #9339: Localization for ICNS Translator

This commit is contained in:
threedeyes 2012-12-30 04:32:44 +00:00
parent 989668eab9
commit a52b9419e7
3 changed files with 14 additions and 4 deletions

View File

@ -6,12 +6,16 @@
#include "ConfigView.h"
#include "ICNSTranslator.h"
#include <Catalog.h>
#include <StringView.h>
#include <SpaceLayoutItem.h>
#include <ControlLook.h>
#include <stdio.h>
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "ICNSConfig"
extern "C" {
#include <openjpeg.h>
};
@ -23,7 +27,7 @@ ConfigView::ConfigView(TranslatorSettings *settings)
fSettings = settings;
BAlignment leftAlignment(B_ALIGN_LEFT, B_ALIGN_VERTICAL_UNSET);
BStringView *stringView = new BStringView("title", "Apple icon translator");
BStringView *stringView = new BStringView("title", B_TRANSLATE("Apple icon translator"));
stringView->SetFont(be_bold_font);
stringView->SetExplicitAlignment(leftAlignment);
AddChild(stringView);
@ -32,7 +36,7 @@ ConfigView::ConfigView(TranslatorSettings *settings)
AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing));
char version[256];
sprintf(version, "Version %d.%d.%d, %s",
sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
int(B_TRANSLATION_MAJOR_VERSION(ICNS_TRANSLATOR_VERSION)),
int(B_TRANSLATION_MINOR_VERSION(ICNS_TRANSLATOR_VERSION)),
int(B_TRANSLATION_REVISION_VERSION(ICNS_TRANSLATOR_VERSION)),

View File

@ -13,6 +13,11 @@
#include "ConfigView.h"
#include "ICNSLoader.h"
#include <Catalog.h>
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "ICNSTranslator"
extern "C" {
#include "icns.h"
}
@ -78,8 +83,8 @@ const uint32 kNumDefaultSettings = sizeof(sDefaultSettings)
ICNSTranslator::ICNSTranslator()
: BaseTranslator("Apple icons",
"Apple icon translator",
: BaseTranslator(B_TRANSLATE("Apple icons"),
B_TRANSLATE("Apple icon translator"),
ICNS_TRANSLATOR_VERSION,
sInputFormats, kNumInputFormats,
sOutputFormats, kNumOutputFormats,

View File

@ -80,6 +80,7 @@ Translator ICNSTranslator :
DoCatalogs ICNSTranslator :
x-vnd.Haiku-ICNSTranslator
:
ConfigView.cpp
ICNSTranslator.h
ICNSTranslator.cpp
;