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
|
|
6 | 6 | #include "ConfigView.h" |
7 | 7 | #include "ICNSTranslator.h" |
8 | 8 | |
| 9 | #include <Catalog.h> |
9 | 10 | #include <StringView.h> |
10 | 11 | #include <SpaceLayoutItem.h> |
11 | 12 | #include <ControlLook.h> |
12 | 13 | |
13 | 14 | #include <stdio.h> |
14 | 15 | |
| 16 | #undef B_TRANSLATION_CONTEXT |
| 17 | #define B_TRANSLATION_CONTEXT "ICNSConfig" |
| 18 | |
15 | 19 | extern "C" { |
16 | 20 | #include <openjpeg.h> |
17 | 21 | }; |
… |
… |
ConfigView::ConfigView(TranslatorSettings *settings)
|
23 | 27 | fSettings = settings; |
24 | 28 | BAlignment leftAlignment(B_ALIGN_LEFT, B_ALIGN_VERTICAL_UNSET); |
25 | 29 | |
26 | | BStringView *stringView = new BStringView("title", "Apple icon translator"); |
| 30 | BStringView *stringView = new BStringView("title", B_TRANSLATE("Apple icon translator")); |
27 | 31 | stringView->SetFont(be_bold_font); |
28 | 32 | stringView->SetExplicitAlignment(leftAlignment); |
29 | 33 | AddChild(stringView); |
… |
… |
ConfigView::ConfigView(TranslatorSettings *settings)
|
32 | 36 | AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing)); |
33 | 37 | |
34 | 38 | char version[256]; |
35 | | sprintf(version, "Version %d.%d.%d, %s", |
| 39 | sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"), |
36 | 40 | int(B_TRANSLATION_MAJOR_VERSION(ICNS_TRANSLATOR_VERSION)), |
37 | 41 | int(B_TRANSLATION_MINOR_VERSION(ICNS_TRANSLATOR_VERSION)), |
38 | 42 | int(B_TRANSLATION_REVISION_VERSION(ICNS_TRANSLATOR_VERSION)), |
diff --git a/src/add-ons/translators/icns/ICNSTranslator.cpp b/src/add-ons/translators/icns/ICNSTranslator.cpp
index c4cf42d..c70b5bd 100644
a
|
b
|
|
13 | 13 | #include "ConfigView.h" |
14 | 14 | #include "ICNSLoader.h" |
15 | 15 | |
| 16 | #include <Catalog.h> |
| 17 | |
| 18 | #undef B_TRANSLATION_CONTEXT |
| 19 | #define B_TRANSLATION_CONTEXT "ICNSTranslator" |
| 20 | |
16 | 21 | extern "C" { |
17 | 22 | #include "icns.h" |
18 | 23 | } |
… |
… |
const uint32 kNumDefaultSettings = sizeof(sDefaultSettings)
|
78 | 83 | |
79 | 84 | |
80 | 85 | ICNSTranslator::ICNSTranslator() |
81 | | : BaseTranslator("Apple icons", |
82 | | "Apple icon translator", |
| 86 | : BaseTranslator(B_TRANSLATE("Apple icons"), |
| 87 | B_TRANSLATE("Apple icon translator"), |
83 | 88 | ICNS_TRANSLATOR_VERSION, |
84 | 89 | sInputFormats, kNumInputFormats, |
85 | 90 | sOutputFormats, kNumOutputFormats, |
diff --git a/src/add-ons/translators/icns/Jamfile b/src/add-ons/translators/icns/Jamfile
index 23b3e44..58ea7b5 100644
a
|
b
|
Translator ICNSTranslator :
|
80 | 80 | DoCatalogs ICNSTranslator : |
81 | 81 | x-vnd.Haiku-ICNSTranslator |
82 | 82 | : |
| 83 | ICNSConfigView.cpp |
83 | 84 | ICNSTranslator.h |
84 | 85 | ICNSTranslator.cpp |
85 | 86 | ; |