Ticket #7128: icotranslator-localization.patch
File icotranslator-localization.patch, 5.3 KB (added by , 14 years ago) |
---|
-
src/add-ons/translators/ico/ConfigView.cpp
7 7 #include "ConfigView.h" 8 8 #include "ICOTranslator.h" 9 9 10 #include <Catalog.h> 10 11 #include <CheckBox.h> 11 12 #include <ControlLook.h> 12 13 #include <SpaceLayoutItem.h> … … 15 16 #include <stdio.h> 16 17 #include <string.h> 17 18 19 #undef B_TRANSLATE_CONTEXT 20 #define B_TRANSLATE_CONTEXT "ConfigView" 18 21 22 19 23 ConfigView::ConfigView() 20 24 : 21 BGroupView( "ICOTranslator Settings", B_VERTICAL, 0)25 BGroupView(B_TRANSLATE("ICOTranslator Settings"), B_VERTICAL, 0) 22 26 { 23 27 BAlignment leftAlignment(B_ALIGN_LEFT, B_ALIGN_VERTICAL_UNSET); 24 28 25 BStringView* stringView = new BStringView("title", "Windows icon images"); 29 BStringView* stringView = new BStringView("title", 30 B_TRANSLATE("Windows icon images")); 26 31 stringView->SetFont(be_bold_font); 27 32 stringView->SetExplicitAlignment(leftAlignment); 28 33 AddChild(stringView); … … 31 36 AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing)); 32 37 33 38 char version[256]; 34 sprintf(version, "Version %d.%d.%d, %s",39 sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"), 35 40 int(B_TRANSLATION_MAJOR_VERSION(ICO_TRANSLATOR_VERSION)), 36 41 int(B_TRANSLATION_MINOR_VERSION(ICO_TRANSLATOR_VERSION)), 37 42 int(B_TRANSLATION_REVISION_VERSION(ICO_TRANSLATOR_VERSION)), … … 47 52 48 53 AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing)); 49 54 50 BCheckBox *checkBox = new BCheckBox("color", "Write 32 bit images on"51 " true color input", NULL);55 BCheckBox *checkBox = new BCheckBox("color", 56 B_TRANSLATE("Write 32 bit images on true color input"), NULL); 52 57 checkBox->SetExplicitAlignment(leftAlignment); 53 58 AddChild(checkBox); 54 59 55 checkBox = new BCheckBox("size", "Enforce valid icon sizes", NULL); 60 checkBox = new BCheckBox("size", B_TRANSLATE("Enforce valid icon sizes"), 61 NULL); 56 62 checkBox->SetValue(1); 57 63 checkBox->SetExplicitAlignment(leftAlignment); 58 64 AddChild(checkBox); 59 65 60 66 AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing)); 61 67 62 stringView = new BStringView("valid1", "Valid icon sizes are"63 " 16, 32, or 48");68 stringView = new BStringView("valid1", 69 B_TRANSLATE("Valid icon sizes are 16, 32, or 48")); 64 70 stringView->SetExplicitAlignment(leftAlignment); 65 71 AddChild(stringView); 66 72 67 stringView = new BStringView("valid2", "pixel in either direction."); 73 stringView = new BStringView("valid2", 74 B_TRANSLATE("pixel in either direction.")); 68 75 stringView->SetExplicitAlignment(leftAlignment); 69 76 AddChild(stringView); 70 77 -
src/add-ons/translators/ico/ICOTranslator.cpp
8 8 #include "ConfigView.h" 9 9 #include "ICO.h" 10 10 11 #include <Catalog.h> 11 12 #include <stdlib.h> 12 13 #include <stdio.h> 13 14 #include <string.h> 14 15 16 #undef B_TRANSLATE_CONTEXT 17 #define B_TRANSLATE_CONTEXT "ICOTranslator" 15 18 19 16 20 const char *kDocumentCount = "/documentCount"; 17 21 const char *kDocumentIndex = "/documentIndex"; 18 22 … … 72 76 73 77 74 78 ICOTranslator::ICOTranslator() 75 : BaseTranslator("Windows icon images", "Windows icon translator", 79 : BaseTranslator(B_TRANSLATE("Windows icon images"), 80 B_TRANSLATE("Windows icon translator"), 76 81 ICO_TRANSLATOR_VERSION, 77 82 sInputFormats, kNumInputFormats, 78 83 sOutputFormats, kNumOutputFormats, … … 107 112 info->group = B_TRANSLATOR_BITMAP; 108 113 info->quality = ICO_IN_QUALITY; 109 114 info->capability = ICO_IN_CAPABILITY; 110 snprintf(info->name, sizeof(info->name), "Windows %s %ld bit image", 111 type == ICO::kTypeIcon ? "Icon" : "Cursor", bitsPerPixel); 115 snprintf(info->name, sizeof(info->name), 116 B_TRANSLATE("Windows %s %ld bit image"), 117 type == ICO::kTypeIcon ? B_TRANSLATE("Icon") : B_TRANSLATE("Cursor"), 118 bitsPerPixel); 112 119 strcpy(info->MIME, kICOMimeType); 113 120 114 121 return B_OK; -
src/add-ons/translators/ico/main.cpp
9 9 10 10 #include "TranslatorWindow.h" 11 11 #include <Application.h> 12 #include <Catalog.h> 12 13 14 #undef B_TRANSLATE_CONTEXT 15 #define B_TRANSLATE_CONTEXT "main" 13 16 17 14 18 int 15 19 main(int /*argc*/, char **/*argv*/) 16 20 { 17 21 BApplication app("application/x-vnd.Haiku-ICOTranslator"); 18 22 19 23 status_t result; 20 result = LaunchTranslatorWindow(new ICOTranslator, "ICO Settings", BRect(0, 0, 225, 175)); 24 result = LaunchTranslatorWindow(new ICOTranslator, 25 B_TRANSLATE("ICO Settings"), BRect(0, 0, 225, 175)); 21 26 if (result != B_OK) 22 27 return 1; 23 28 -
src/add-ons/translators/ico/Jamfile
10 10 ICOTranslator.cpp 11 11 ConfigView.cpp 12 12 ICO.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 ICOTranslator : 18 x-vnd.Haiku-ICOTranslator 19 : 20 ConfigView.cpp 21 ICOTranslator.cpp 22 ; 23 18 24 Package haiku-translationkit-cvs : 19 25 ICOTranslator 20 26 : boot home config add-ons Translators