Ticket #7126: hviftranslator-localization.patch
File hviftranslator-localization.patch, 4.6 KB (added by , 14 years ago) |
---|
-
src/add-ons/translators/hvif/HVIFMain.cpp
7 7 */ 8 8 9 9 #include <Application.h> 10 #include <Catalog.h> 10 11 #include "HVIFTranslator.h" 11 12 #include "TranslatorWindow.h" 12 13 14 #undef B_TRANSLATE_CONTEXT 15 #define B_TRANSLATE_CONTEXT "HVIFMain" 16 13 17 int 14 18 main(int argc, char *argv[]) 15 19 { 16 20 BApplication application("application/x-vnd.Haiku.HVIFTranslator"); 17 if (LaunchTranslatorWindow(new HVIFTranslator, "HVIF Settings",18 21 if (LaunchTranslatorWindow(new HVIFTranslator, 22 B_TRANSLATE("HVIF Settings"), BRect(0, 0, 250, 150)) != B_OK) 19 23 return 1; 20 24 21 25 application.Run(); -
src/add-ons/translators/hvif/HVIFTranslator.cpp
11 11 12 12 #include <Bitmap.h> 13 13 #include <BitmapStream.h> 14 #include <Catalog.h> 14 15 #include <IconUtils.h> 15 16 16 17 #include <stdio.h> … … 21 22 #define HVIF_TRANSLATION_QUALITY 1.0 22 23 #define HVIF_TRANSLATION_CAPABILITY 1.0 23 24 25 #undef B_TRANSLATE_CONTEXT 26 #define B_TRANSLATE_CONTEXT "HVIFTranslator" 27 28 24 29 static const translation_format sInputFormats[] = { 25 30 { 26 31 HVIF_FORMAT_CODE, … … 65 70 66 71 67 72 HVIFTranslator::HVIFTranslator() 68 : BaseTranslator("HVIF icons", "Native Haiku vector icon translator", 73 : BaseTranslator(B_TRANSLATE("HVIF icons"), 74 B_TRANSLATE("Native Haiku vector icon translator"), 69 75 HVIF_TRANSLATOR_VERSION, 70 76 sInputFormats, kNumInputFormats, 71 77 sOutputFormats, kNumOutputFormats, … … 174 180 BView * 175 181 HVIFTranslator::NewConfigView(TranslatorSettings *settings) 176 182 { 177 return new HVIFView("HVIFTranslator Settings", B_WILL_DRAW, settings); 183 return new HVIFView(B_TRANSLATE("HVIFTranslator Settings"), 184 B_WILL_DRAW, settings); 178 185 } -
src/add-ons/translators/hvif/Jamfile
8 8 HVIFMain.cpp 9 9 HVIFTranslator.cpp 10 10 HVIFView.cpp 11 : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) 11 : be translation libtranslatorsutils.a $(TARGET_LIBSUPC++) 12 $(HAIKU_LOCALE_LIBS) 12 13 $(HAIKU_LOCALE_LIBS) 13 14 : true 14 15 ; 16 17 DoCatalogs HVIFTranslator : 18 x-vnd.Haiku-HVIFTranslator 19 : 20 HVIFMain.cpp 21 HVIFTranslator.cpp 22 HVIFView.cpp 23 ; -
src/add-ons/translators/hvif/HVIFView.cpp
9 9 #include "HVIFView.h" 10 10 #include "HVIFTranslator.h" 11 11 12 #include <Catalog.h> 12 13 #include <GroupLayoutBuilder.h> 13 14 #include <String.h> 14 15 #include <StringView.h> … … 17 18 18 19 #define HVIF_SETTING_RENDER_SIZE_CHANGED 'rsch' 19 20 21 #undef B_TRANSLATE_CONTEXT 22 #define B_TRANSLATE_CONTEXT "HVIFView" 20 23 24 21 25 HVIFView::HVIFView(const char* name, uint32 flags, TranslatorSettings *settings) 22 26 : 23 27 BView(name, flags, new BGroupLayout(B_VERTICAL)), … … 26 30 BAlignment labelAlignment(B_ALIGN_LEFT, B_ALIGN_NO_VERTICAL); 27 31 28 32 BStringView* title= new BStringView("title", 29 "Native Haiku icon format translator");33 B_TRANSLATE("Native Haiku icon format translator")); 30 34 title->SetFont(be_bold_font); 31 35 title->SetExplicitAlignment(labelAlignment); 32 36 33 37 char versionString[256]; 34 snprintf(versionString, sizeof(versionString), "Version %d.%d.%d, %s", 38 snprintf(versionString, sizeof(versionString), 39 B_TRANSLATE("Version %d.%d.%d, %s"), 35 40 int(B_TRANSLATION_MAJOR_VERSION(HVIF_TRANSLATOR_VERSION)), 36 41 int(B_TRANSLATION_MINOR_VERSION(HVIF_TRANSLATOR_VERSION)), 37 42 int(B_TRANSLATION_REVISION_VERSION(HVIF_TRANSLATOR_VERSION)), … … 45 50 46 51 47 52 int32 renderSize = fSettings->SetGetInt32(HVIF_SETTING_RENDER_SIZE); 48 BString label = "Render size: ";49 label << renderSize;53 BString label = B_TRANSLATE("Render size:"); 54 label << " " << renderSize; 50 55 51 56 fRenderSize = new BSlider("renderSize", label.String(), 52 57 NULL, 1, 32, B_HORIZONTAL); … … 101 106 fSettings->SetGetInt32(HVIF_SETTING_RENDER_SIZE, &value); 102 107 fSettings->SaveSettings(); 103 108 104 BString newLabel = "Render size: ";105 newLabel << value;109 BString newLabel = B_TRANSLATE("Render size:"); 110 newLabel << " " << value; 106 111 fRenderSize->SetLabel(newLabel.String()); 107 112 return; 108 113 }