Ticket #7119: exrtranslator-localization.patch
File exrtranslator-localization.patch, 4.2 KB (added by , 13 years ago) |
---|
-
src/add-ons/translators/exr/ConfigView.cpp
9 9 #include "ConfigView.h" 10 10 #include "EXRTranslator.h" 11 11 12 #include < StringView.h>12 #include <Catalog.h> 13 13 #include <CheckBox.h> 14 14 #include <GroupLayout.h> 15 15 #include <GroupLayoutBuilder.h> 16 16 #include <SpaceLayoutItem.h> 17 #include <StringView.h> 17 18 18 19 #include <stdio.h> 19 20 #include <string.h> 20 21 22 #undef B_TRANSLATE_CONTEXT 23 #define B_TRANSLATE_CONTEXT "ConfigView" 21 24 25 22 26 ConfigView::ConfigView(uint32 flags) 23 27 : BView("EXRTranslator Settings", flags) 24 28 { 25 29 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 26 30 27 BStringView *fTitle = new BStringView("title", "EXR Images");31 BStringView *fTitle = new BStringView("title", B_TRANSLATE("EXR Images")); 28 32 fTitle->SetFont(be_bold_font); 29 33 30 34 char version[256]; 31 sprintf(version, "Version %d.%d.%d, %s",35 sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"), 32 36 int(B_TRANSLATION_MAJOR_VERSION(EXR_TRANSLATOR_VERSION)), 33 37 int(B_TRANSLATION_MINOR_VERSION(EXR_TRANSLATOR_VERSION)), 34 38 int(B_TRANSLATION_REVISION_VERSION(EXR_TRANSLATOR_VERSION)), … … 39 43 B_UTF8_COPYRIGHT "2008 Haiku Inc."); 40 44 41 45 BStringView *fCopyright2 = new BStringView("copyright2", 42 "Based on OpenEXR (http://www.openexr.com)");46 B_TRANSLATE("Based on OpenEXR (http://www.openexr.com)")); 43 47 44 48 BStringView *fCopyright3 = new BStringView("copyright3", 45 49 B_UTF8_COPYRIGHT "2006, Industrial Light & Magic,"); 46 50 47 51 BStringView *fCopyright4 = new BStringView("copyright4", 48 "a division of Lucasfilm Entertainment Company Ltd");52 B_TRANSLATE("a division of Lucasfilm Entertainment Company Ltd")); 49 53 50 54 // Build the layout 51 55 SetLayout(new BGroupLayout(B_HORIZONTAL)); -
src/add-ons/translators/exr/main.cpp
8 8 9 9 #include "TranslatorWindow.h" 10 10 #include <Application.h> 11 #include <Catalog.h> 11 12 13 #undef B_TRANSLATE_CONTEXT 14 #define B_TRANSLATE_CONTEXT "main" 12 15 13 16 int 14 17 main(int /*argc*/, char **/*argv*/) … … 16 19 BApplication app("application/x-vnd.Haiku-EXRTranslator"); 17 20 18 21 status_t result; 19 result = LaunchTranslatorWindow(new EXRTranslator, "EXR Settings"); 22 result = LaunchTranslatorWindow(new EXRTranslator, 23 B_TRANSLATE("EXR Settings")); 20 24 if (result != B_OK) 21 25 return 1; 22 26 -
src/add-ons/translators/exr/Jamfile
18 18 : true 19 19 ; 20 20 21 DoCatalogs EXRTranslator : 22 x-vnd.Haiku-EXRTranslator 23 : 24 ConfigView.cpp 25 EXRTranslator.cpp 26 main.cpp 27 ; 28 21 29 Package haiku-translationkit-cvs : 22 30 EXRTranslator : 23 31 boot home config add-ons Translators ; -
src/add-ons/translators/exr/EXRTranslator.cpp
5 5 * Distributed under the terms of the MIT License. 6 6 */ 7 7 8 #include <Catalog.h> 9 8 10 #include "ConfigView.h" 9 11 #include "EXRGamma.h" 10 12 #include "EXRTranslator.h" … … 14 16 #include "ImfRgbaFile.h" 15 17 #include "IStreamWrapper.h" 16 18 19 #undef B_TRANSLATE_CONTEXT 20 #define B_TRANSLATE_CONTEXT "EXRTranslator" 17 21 22 18 23 // The input formats that this translator supports. 19 24 translation_format sInputFormats[] = { 20 25 { … … 56 61 57 62 58 63 EXRTranslator::EXRTranslator() 59 : BaseTranslator("EXR Images", "EXR image translator", 64 : BaseTranslator(B_TRANSLATE("EXR Images"), 65 B_TRANSLATE("EXR image translator"), 60 66 EXR_TRANSLATOR_VERSION, 61 67 sInputFormats, kNumInputFormats, 62 68 sOutputFormats, kNumOutputFormats, … … 92 98 outInfo->quality = EXR_IN_QUALITY; 93 99 outInfo->capability = EXR_IN_CAPABILITY; 94 100 strcpy(outInfo->MIME, "image/exr"); 95 strcpy(outInfo->name, "EXR image");101 strcpy(outInfo->name, B_TRANSLATE("EXR image")); 96 102 } 97 103 } catch (const std::exception &e) { 98 104 return B_NO_TRANSLATOR;