Ticket #7229: jpeg-translators-add-ons-localization.patch
File jpeg-translators-add-ons-localization.patch, 7.0 KB (added by , 14 years ago) |
---|
-
src/add-ons/translators/jpeg/JPEGTranslator.cpp
662 662 BView(name, 0, new BGroupLayout(B_VERTICAL)) 663 663 { 664 664 BAlignment labelAlignment = BAlignment(B_ALIGN_LEFT, B_ALIGN_TOP); 665 BStringView* title = new BStringView("Title", sTranslatorName); 665 BString str1(sTranslatorName); 666 str1.ReplaceFirst("JPEG images", B_TRANSLATE("JPEG images")); 667 BStringView* title = new BStringView("Title", str1.String()); 666 668 title->SetFont(be_bold_font); 667 669 title->SetExplicitAlignment(labelAlignment); 668 670 … … 674 676 version->SetExplicitAlignment(labelAlignment); 675 677 676 678 BTextView* infoView = new BTextView("info"); 677 infoView->SetText(sTranslatorInfo); 679 BString str2(sTranslatorInfo); 680 str2.ReplaceFirst("Based on IJG library © 1994-2009, Thomas G. Lane, " 681 "Guido Vollbeding.\n", B_TRANSLATE("Based on IJG library © 1994-2009, " 682 "Thomas G. Lane, Guido Vollbeding.\n")); 683 str2.ReplaceFirst("with \"lossless\" encoding support patch by Ken " 684 "Murchison\n", B_TRANSLATE("with \"lossless\" encoding support patch " 685 "by Ken Murchison\n")); 686 str2.ReplaceFirst("With some colorspace conversion routines by Magnus " 687 "Hellman\n", B_TRANSLATE("With some colorspace conversion routines by " 688 "Magnus Hellman\n")); 689 infoView->SetText(str2.String()); 678 690 infoView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 679 691 infoView->MakeEditable(false); 680 692 … … 695 707 : 696 708 BTabView(name) 697 709 { 698 AddTab(new TranslatorWriteView( "Write", settings->Acquire()));699 AddTab(new TranslatorReadView( "Read", settings->Acquire()));700 AddTab(new TranslatorAboutView( "About"));710 AddTab(new TranslatorWriteView(B_TRANSLATE("Write"), settings->Acquire())); 711 AddTab(new TranslatorReadView(B_TRANSLATE("Read"), settings->Acquire())); 712 AddTab(new TranslatorAboutView(B_TRANSLATE("About"))); 701 713 702 714 settings->Release(); 703 715 … … 788 800 &longJumpBuffer); 789 801 } 790 802 } catch (...) { 791 fprintf(stderr, B_TRANSLATE("libjpeg encountered a critical error"792 " (caught C++ exception).\n"));803 fprintf(stderr, "libjpeg encountered a critical error (caught C++ " 804 "exception).\n"); 793 805 return B_ERROR; 794 806 } 795 807 … … 943 955 944 956 default: 945 957 fprintf(stderr, 946 B_TRANSLATE("Wrong type: Color space not implemented.\n"));958 "Wrong type: Color space not implemented.\n"); 947 959 return B_ERROR; 948 960 } 949 961 out_row_bytes = jpg_input_components * width; … … 1098 1110 switch (cinfo.out_color_space) { 1099 1111 case JCS_UNKNOWN: /* error/unspecified */ 1100 1112 fprintf(stderr, 1101 B_TRANSLATE("From Type: Jpeg uses unknown color type\n"));1113 "From Type: Jpeg uses unknown color type\n"); 1102 1114 break; 1103 1115 case JCS_GRAYSCALE: /* monochrome */ 1104 1116 // Check if user wants to read only as RGB32 or not … … 1131 1143 break; 1132 1144 default: 1133 1145 fprintf(stderr, 1134 B_TRANSLATE("From Type: Jpeg uses hmm... i don't know " 1135 "really :(\n")); 1146 "From Type: Jpeg uses hmm... i don't know really :(\n"); 1136 1147 break; 1137 1148 } 1138 1149 } … … 1279 1290 info->group = formats[i].group; 1280 1291 info->quality = formats[i].quality; 1281 1292 info->capability = formats[i].capability; 1282 strcpy(info->name, formats[i].name); 1293 BString str1(formats[i].name); 1294 str1.ReplaceFirst("Be Bitmap Format (JPEGTranslator)", 1295 B_TRANSLATE("Be Bitmap Format (JPEGTranslator)")); 1296 strncpy(info->name, str1.String(), sizeof(info->name)); 1283 1297 strcpy(info->MIME, formats[i].MIME); 1284 1298 return B_OK; 1285 1299 } -
src/add-ons/translators/jpeg/JPEGTranslator.h
34 34 35 35 #include <Alert.h> 36 36 #include <Application.h> 37 #include <Catalog.h> 37 38 #include <CheckBox.h> 38 39 #include <FindDirectory.h> 39 40 #include <Path.h> … … 52 53 53 54 #include "BaseTranslator.h" 54 55 56 #undef B_TRANSLATE_CONTEXT 57 #define B_TRANSLATE_CONTEXT "JPEGTranslator" 58 55 59 // Settings 56 60 #define SETTINGS_FILE "JPEGTranslator" 57 61 … … 67 71 #define VIEW_MSG_SET_SHOWREADERRORBOX 'JSEB' 68 72 69 73 // View labels 70 #define VIEW_LABEL_QUALITY "Output quality"71 #define VIEW_LABEL_SMOOTHING "Output smoothing strength"72 #define VIEW_LABEL_PROGRESSIVE "Use progressive compression"73 #define VIEW_LABEL_OPTIMIZECOLORS "Prevent colors 'washing out'"74 #define VIEW_LABEL_SMALLERFILE "Make file smaller (sligthtly worse quality)"75 #define VIEW_LABEL_GRAY1ASRGB24 "Write black-and-white images as RGB24"76 #define VIEW_LABEL_ALWAYSRGB32 "Read greyscale images as RGB32"77 #define VIEW_LABEL_PHOTOSHOPCMYK "Use CMYK code with 0 for 100% ink coverage"78 #define VIEW_LABEL_SHOWREADERRORBOX "Show warning messages"74 #define VIEW_LABEL_QUALITY B_TRANSLATE_MARK("Output quality") 75 #define VIEW_LABEL_SMOOTHING B_TRANSLATE_MARK("Output smoothing strength") 76 #define VIEW_LABEL_PROGRESSIVE B_TRANSLATE_MARK("Use progressive compression") 77 #define VIEW_LABEL_OPTIMIZECOLORS B_TRANSLATE_MARK("Prevent colors 'washing out'") 78 #define VIEW_LABEL_SMALLERFILE B_TRANSLATE_MARK("Make file smaller (sligthtly worse quality)") 79 #define VIEW_LABEL_GRAY1ASRGB24 B_TRANSLATE_MARK("Write black-and-white images as RGB24") 80 #define VIEW_LABEL_ALWAYSRGB32 B_TRANSLATE_MARK("Read greyscale images as RGB32") 81 #define VIEW_LABEL_PHOTOSHOPCMYK B_TRANSLATE_MARK("Use CMYK code with 0 for 100% ink coverage") 82 #define VIEW_LABEL_SHOWREADERRORBOX B_TRANSLATE_MARK("Show warning messages") 79 83 80 84 // strings for use in TranslatorSettings 81 85 #define JPEG_SET_SMOOTHING "smoothing" -
src/add-ons/translators/jpeg/Jamfile
10 10 11 11 UseLibraryHeaders jpeg ; 12 12 13 AddResources JPEGTranslator : JPEGTranslator.rdef ; 14 13 15 Translator JPEGTranslator : 14 16 be_jdatadst.cpp 15 17 be_jdatasrc.cpp … … 24 26 DoCatalogs JPEGTranslator : 25 27 x-vnd.Haiku-JPEGTranslator 26 28 : 29 JPEGTranslator.h 27 30 JPEGTranslator.cpp 28 31 exif_parser.cpp 29 32 be_jerror.cpp -
src/add-ons/translators/jpeg/exif_parser.cpp
6 6 7 7 #include "exif_parser.h" 8 8 9 #include <Catalog.h> 9 10 #include <ctype.h> 10 11 #include <set> 11 12 #include <stdio.h> -
src/add-ons/translators/jpeg/JPEGTranslator.rdef
1 /* 2 * JPEGTranslator.rdef 3 */ 4 5 resource app_signature "application/x-vnd.Haiku-JPEGTranslator"; 6 7 resource app_version { 8 major = 1, 9 middle = 2, 10 minor = 0, 11 variety = 0, 12 internal = 0, 13 short_info = "1.2.0", 14 long_info = "Haiku JPEGTranslator Add-Ons." 15 };