Ticket #7129: pcxtranslator-localization.patch
File pcxtranslator-localization.patch, 4.0 KB (added by , 13 years ago) |
---|
-
src/add-ons/translators/pcx/ConfigView.cpp
8 8 #include "ConfigView.h" 9 9 #include "PCXTranslator.h" 10 10 11 #include <Catalog.h> 11 12 #include <StringView.h> 12 13 #include <CheckBox.h> 13 14 … … 15 16 #include <string.h> 16 17 17 18 19 #undef B_TRANSLATE_CONTEXT 20 #define B_TRANSLATE_CONTEXT "ConfigView" 21 22 18 23 ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags) 19 : BView(frame, "PCXTranslator Settings", resize, flags)24 : BView(frame, B_TRANSLATE("PCXTranslator Settings"), resize, flags) 20 25 { 21 26 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 22 27 … … 25 30 float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; 26 31 27 32 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")); 29 35 stringView->SetFont(be_bold_font); 30 36 stringView->ResizeToPreferred(); 31 37 AddChild(stringView); 32 38 33 39 rect.OffsetBy(0, height + 10); 34 40 char version[256]; 35 sprintf(version, "Version %d.%d.%d, %s",41 sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"), 36 42 int(B_TRANSLATION_MAJOR_VERSION(PCX_TRANSLATOR_VERSION)), 37 43 int(B_TRANSLATION_MINOR_VERSION(PCX_TRANSLATOR_VERSION)), 38 44 int(B_TRANSLATION_REVISION_VERSION(PCX_TRANSLATOR_VERSION)), -
src/add-ons/translators/pcx/PCXTranslator.cpp
9 9 #include "ConfigView.h" 10 10 #include "PCX.h" 11 11 12 #include <Catalog.h> 12 13 #include <stdlib.h> 13 14 #include <stdio.h> 14 15 #include <string.h> 15 16 17 #undef B_TRANSLATE_CONTEXT 18 #define B_TRANSLATE_CONTEXT "PCXTranslator" 16 19 17 20 #define kPCXMimeType "image/x-pcx" 18 21 … … 69 72 70 73 71 74 PCXTranslator::PCXTranslator() 72 : BaseTranslator( "PCX images", "PCX translator",75 : BaseTranslator(B_TRANSLATE("PCX images"), B_TRANSLATE("PCX translator"), 73 76 PCX_TRANSLATOR_VERSION, 74 77 sInputFormats, kNumInputFormats, 75 78 sOutputFormats, kNumOutputFormats, … … 104 107 info->group = B_TRANSLATOR_BITMAP; 105 108 info->quality = PCX_IN_QUALITY; 106 109 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"), 108 111 bitsPerPixel); 109 112 strcpy(info->MIME, kPCXMimeType); 110 113 -
src/add-ons/translators/pcx/main.cpp
10 10 11 11 #include "TranslatorWindow.h" 12 12 #include <Application.h> 13 #include <Catalog.h> 13 14 14 15 16 #undef B_TRANSLATE_CONTEXT 17 #define B_TRANSLATE_CONTEXT "main" 18 19 15 20 int 16 21 main(int /*argc*/, char **/*argv*/) 17 22 { 18 23 BApplication app("application/x-vnd.Haiku-PCXTranslator"); 19 24 20 25 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)); 22 28 if (result != B_OK) 23 29 return 1; 24 30 -
src/add-ons/translators/pcx/Jamfile
10 10 PCXTranslator.cpp 11 11 ConfigView.cpp 12 12 PCX.cpp 13 : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) 14 $(HAIKU_LOCALE_LIBS) 13 : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) 15 14 : true 16 15 ; 17 16 17 DoCatalogs PCXTranslator : 18 x-vnd.Haiku-PCXTranslator 19 : 20 main.cpp 21 ConfigView.cpp 22 PCXTranslator.cpp 23 ; 24 18 25 Package haiku-translationkit-cvs : 19 26 PCXTranslator 20 27 : boot home config add-ons Translators