[haiku-commits] r40298 - in haiku/trunk/src/add-ons/translators: bmp ico jpeg

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 26 Jan 2011 23:58:48 +0100 (CET)

Author: korli
Date: 2011-01-26 23:58:47 +0100 (Wed, 26 Jan 2011)
New Revision: 40298
Changeset: http://dev.haiku-os.org/changeset/40298
Ticket: http://dev.haiku-os.org/ticket/7118
Ticket: http://dev.haiku-os.org/ticket/7128
Ticket: http://dev.haiku-os.org/ticket/7137

Modified:
   haiku/trunk/src/add-ons/translators/bmp/BMPMain.cpp
   haiku/trunk/src/add-ons/translators/bmp/BMPTranslator.cpp
   haiku/trunk/src/add-ons/translators/bmp/BMPTranslator.h
   haiku/trunk/src/add-ons/translators/bmp/BMPView.cpp
   haiku/trunk/src/add-ons/translators/bmp/Jamfile
   haiku/trunk/src/add-ons/translators/ico/ConfigView.cpp
   haiku/trunk/src/add-ons/translators/ico/ICOTranslator.cpp
   haiku/trunk/src/add-ons/translators/ico/Jamfile
   haiku/trunk/src/add-ons/translators/ico/main.cpp
   haiku/trunk/src/add-ons/translators/jpeg/JPEGTranslator.cpp
   haiku/trunk/src/add-ons/translators/jpeg/Jamfile
   haiku/trunk/src/add-ons/translators/jpeg/be_jerror.cpp
   haiku/trunk/src/add-ons/translators/jpeg/exif_parser.cpp
Log:
Applied patchs from Karvjorm (tickets #7118, #7128, #7137) with fixes by 
myself: Localizations for JPEG, BMP, ICO translators.


Modified: haiku/trunk/src/add-ons/translators/bmp/BMPMain.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/bmp/BMPMain.cpp 2011-01-26 22:06:02 UTC 
(rev 40297)
+++ haiku/trunk/src/add-ons/translators/bmp/BMPMain.cpp 2011-01-26 22:58:47 UTC 
(rev 40298)
@@ -32,9 +32,15 @@
 /*****************************************************************************/
 
 #include <Application.h>
+#include <Catalog.h>
+
 #include "BMPTranslator.h"
 #include "TranslatorWindow.h"
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "BMPMain"
+
+
 // ---------------------------------------------------------------
 // main
 //
@@ -53,8 +59,9 @@
 {
        BApplication app("application/x-vnd.Haiku-BMPTranslator");
        status_t result;
+
        result = LaunchTranslatorWindow(new BMPTranslator,
-               "BMP Settings", BRect(0, 0, 225, 175));
+               B_TRANSLATE("BMP Settings"), BRect(0, 0, 225, 175));
        if (result == B_OK) {
                app.Run();
                return 0;

Modified: haiku/trunk/src/add-ons/translators/bmp/BMPTranslator.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/bmp/BMPTranslator.cpp   2011-01-26 
22:06:02 UTC (rev 40297)
+++ haiku/trunk/src/add-ons/translators/bmp/BMPTranslator.cpp   2011-01-26 
22:58:47 UTC (rev 40298)
@@ -7,7 +7,6 @@
  */
 
 #include "BMPTranslator.h"
-#include "BMPView.h"
 
 #include <algorithm>
 #include <new>
@@ -15,15 +14,24 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <Catalog.h>
 
+#include "BMPView.h"
+
+
 using std::nothrow;
 using std::min;
 
+
 //#define INFO(x) printf(x);
 #define INFO(x)
 //#define ERROR(x) printf(x);
 #define ERROR(x)
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "BMPTranslator"
+
+
 // The input formats that this translator supports.
 static const translation_format sInputFormats[] = {
        {
@@ -121,7 +129,8 @@
 // Returns:
 // ---------------------------------------------------------------
 BMPTranslator::BMPTranslator()
-       : BaseTranslator("BMP images", "BMP image translator",
+       : BaseTranslator(B_TRANSLATE("BMP images"),
+               B_TRANSLATE("BMP image translator"),
                BMP_TRANSLATOR_VERSION,
                sInputFormats, kNumInputFormats,
                sOutputFormats, kNumOutputFormats,
@@ -362,7 +371,9 @@
                        outInfo->group = B_TRANSLATOR_BITMAP;
                        outInfo->quality = BMP_IN_QUALITY;
                        outInfo->capability = BMP_IN_CAPABILITY;
-                       sprintf(outInfo->name, "BMP image (MS format, %d bits",
+                       sprintf(outInfo->name, 
+                               B_TRANSLATE_COMMENT("BMP image (MS format, %d 
bits", 
+                               "Ignore missing closing round bracket"), 
                                msheader.bitsperpixel);
                        if (msheader.compression)
                                strcat(outInfo->name, ", RLE)");
@@ -431,8 +442,8 @@
                        outInfo->group = B_TRANSLATOR_BITMAP;
                        outInfo->quality = BMP_IN_QUALITY;
                        outInfo->capability = BMP_IN_CAPABILITY;
-                       sprintf(outInfo->name, "BMP image (OS/2 format, %d 
bits)",
-                               os2header.bitsperpixel);
+                       sprintf(outInfo->name, B_TRANSLATE("BMP image (OS/2 
format, "
+                               "%d bits)"), os2header.bitsperpixel);
                        strcpy(outInfo->MIME, "image/x-bmp");
                }
                if (pfileheader && pmsheader) {
@@ -1889,6 +1900,7 @@
 BView *
 BMPTranslator::NewConfigView(TranslatorSettings *settings)
 {
-       return new BMPView(BRect(0, 0, 225, 175), "BMPTranslator Settings",
-               B_FOLLOW_ALL, B_WILL_DRAW, settings);
+       return new BMPView(BRect(0, 0, 225, 175), 
+               B_TRANSLATE("BMPTranslator Settings"), B_FOLLOW_ALL, 
B_WILL_DRAW, 
+               settings);
 }

Modified: haiku/trunk/src/add-ons/translators/bmp/BMPTranslator.h
===================================================================
--- haiku/trunk/src/add-ons/translators/bmp/BMPTranslator.h     2011-01-26 
22:06:02 UTC (rev 40297)
+++ haiku/trunk/src/add-ons/translators/bmp/BMPTranslator.h     2011-01-26 
22:58:47 UTC (rev 40298)
@@ -29,13 +29,16 @@
 #ifndef BMP_TRANSLATOR_H
 #define BMP_TRANSLATOR_H
 
+#include <ByteOrder.h>
+#include <Catalog.h>
+#include <DataIO.h>
+#include <GraphicsDefs.h>
+#include <InterfaceDefs.h>
+#include <Locale.h>
 #include <Translator.h>
 #include <TranslatorFormats.h>
 #include <TranslationDefs.h>
-#include <GraphicsDefs.h>
-#include <InterfaceDefs.h>
-#include <DataIO.h>
-#include <ByteOrder.h>
+
 #include "BaseTranslator.h"
 
 #define BMP_NO_COMPRESS 0

Modified: haiku/trunk/src/add-ons/translators/bmp/BMPView.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/bmp/BMPView.cpp 2011-01-26 22:06:02 UTC 
(rev 40297)
+++ haiku/trunk/src/add-ons/translators/bmp/BMPView.cpp 2011-01-26 22:58:47 UTC 
(rev 40298)
@@ -13,11 +13,15 @@
 #include "BMPView.h"
 #include "BMPTranslator.h"
 
+#include <Catalog.h>
 #include <StringView.h>
 
 #include <stdio.h>
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "BMPView"
 
+
 BMPView::BMPView(const BRect &frame, const char *name, uint32 resizeMode,
                uint32 flags, TranslatorSettings *settings)
        : BView(frame, name, resizeMode, flags)
@@ -30,7 +34,8 @@
        float height = fontHeight.descent + fontHeight.ascent + 
fontHeight.leading;
 
        BRect rect(10, 10, 200, 10 + height);
-       BStringView *stringView = new BStringView(rect, "title", "BMP image 
translator");
+       BStringView *stringView = new BStringView(rect, "title", 
+               B_TRANSLATE("BMP image translator"));
        stringView->SetFont(be_bold_font);
        stringView->ResizeToPreferred();
        AddChild(stringView);
@@ -39,7 +44,7 @@
 
        rect.OffsetBy(0, height + 10);
        char version[256];
-       snprintf(version, sizeof(version), "Version %d.%d.%d, %s",
+       snprintf(version, sizeof(version), B_TRANSLATE("Version %d.%d.%d, %s"),
                int(B_TRANSLATION_MAJOR_VERSION(BMP_TRANSLATOR_VERSION)),
                int(B_TRANSLATION_MINOR_VERSION(BMP_TRANSLATOR_VERSION)),
                int(B_TRANSLATION_REVISION_VERSION(BMP_TRANSLATOR_VERSION)),
@@ -55,7 +60,7 @@
        height = fontHeight.descent + fontHeight.ascent + fontHeight.leading;
 
        rect.OffsetBy(0, height + 5);
-       stringView = new BStringView(rect, "Copyright", B_UTF8_COPYRIGHT 
"2002-2006 Haiku Inc.");
+       stringView = new BStringView(rect, "Copyright", B_UTF8_COPYRIGHT 
"2002-2010 Haiku Inc.");
        stringView->ResizeToPreferred();
        AddChild(stringView);
 

Modified: haiku/trunk/src/add-ons/translators/bmp/Jamfile
===================================================================
--- haiku/trunk/src/add-ons/translators/bmp/Jamfile     2011-01-26 22:06:02 UTC 
(rev 40297)
+++ haiku/trunk/src/add-ons/translators/bmp/Jamfile     2011-01-26 22:58:47 UTC 
(rev 40298)
@@ -14,8 +14,15 @@
        : true
 ;
 
+DoCatalogs BMPTranslator :
+       x-vnd.Haiku-BMPTranslator
+       :
+       BMPMain.cpp
+       BMPTranslator.cpp
+       BMPView.cpp
+;
+
 Package haiku-translationkit-cvs :
        BMPTranslator :
        boot home config add-ons Translators ;
 
-

Modified: haiku/trunk/src/add-ons/translators/ico/ConfigView.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/ico/ConfigView.cpp      2011-01-26 
22:06:02 UTC (rev 40297)
+++ haiku/trunk/src/add-ons/translators/ico/ConfigView.cpp      2011-01-26 
22:58:47 UTC (rev 40298)
@@ -7,6 +7,7 @@
 #include "ConfigView.h"
 #include "ICOTranslator.h"
 
+#include <Catalog.h>
 #include <CheckBox.h>
 #include <ControlLook.h>
 #include <SpaceLayoutItem.h>
@@ -15,14 +16,18 @@
 #include <stdio.h>
 #include <string.h>
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "ConfigView"
 
+
 ConfigView::ConfigView()
        :
-       BGroupView("ICOTranslator Settings", B_VERTICAL, 0)
+       BGroupView(B_TRANSLATE("ICOTranslator Settings"), B_VERTICAL, 0)
 {
        BAlignment leftAlignment(B_ALIGN_LEFT, B_ALIGN_VERTICAL_UNSET); 
 
-       BStringView* stringView = new BStringView("title", "Windows icon 
images");
+       BStringView* stringView = new BStringView("title", 
+               B_TRANSLATE("Windows icon images"));
        stringView->SetFont(be_bold_font);
        stringView->SetExplicitAlignment(leftAlignment);
        AddChild(stringView);
@@ -31,7 +36,7 @@
        AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing));
 
        char version[256];
-       sprintf(version, "Version %d.%d.%d, %s",
+       sprintf(version, B_TRANSLATE("Version %d.%d.%d, %s"),
                int(B_TRANSLATION_MAJOR_VERSION(ICO_TRANSLATOR_VERSION)),
                int(B_TRANSLATION_MINOR_VERSION(ICO_TRANSLATOR_VERSION)),
                int(B_TRANSLATION_REVISION_VERSION(ICO_TRANSLATOR_VERSION)),
@@ -47,24 +52,26 @@
 
        AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing));
 
-       BCheckBox *checkBox = new BCheckBox("color", "Write 32 bit images on"
-               " true color input", NULL);
+       BCheckBox *checkBox = new BCheckBox("color", 
+               B_TRANSLATE("Write 32 bit images on true color input"), NULL);
        checkBox->SetExplicitAlignment(leftAlignment);
        AddChild(checkBox);
 
-       checkBox = new BCheckBox("size", "Enforce valid icon sizes", NULL);
+       checkBox = new BCheckBox("size", B_TRANSLATE("Enforce valid icon 
sizes"), 
+               NULL);
        checkBox->SetValue(1);
        checkBox->SetExplicitAlignment(leftAlignment);
        AddChild(checkBox);
 
        AddChild(BSpaceLayoutItem::CreateVerticalStrut(spacing));
 
-       stringView = new BStringView("valid1", "Valid icon sizes are"
-               " 16, 32, or 48");
+       stringView = new BStringView("valid1", 
+               B_TRANSLATE("Valid icon sizes are 16, 32, or 48"));
        stringView->SetExplicitAlignment(leftAlignment);
        AddChild(stringView);
 
-       stringView = new BStringView("valid2", "pixel in either direction.");
+       stringView = new BStringView("valid2", 
+               B_TRANSLATE("pixel in either direction."));
        stringView->SetExplicitAlignment(leftAlignment);
        AddChild(stringView);
 

Modified: haiku/trunk/src/add-ons/translators/ico/ICOTranslator.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/ico/ICOTranslator.cpp   2011-01-26 
22:06:02 UTC (rev 40297)
+++ haiku/trunk/src/add-ons/translators/ico/ICOTranslator.cpp   2011-01-26 
22:58:47 UTC (rev 40298)
@@ -5,14 +5,21 @@
 
 
 #include "ICOTranslator.h"
-#include "ConfigView.h"
-#include "ICO.h"
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
+#include <Catalog.h>
 
+#include "ConfigView.h"
+#include "ICO.h"
+
+
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "ICOTranslator"
+
+
 const char *kDocumentCount = "/documentCount";
 const char *kDocumentIndex = "/documentIndex";
 
@@ -72,7 +79,8 @@
 
 
 ICOTranslator::ICOTranslator()
-       : BaseTranslator("Windows icon images", "Windows icon translator",
+       : BaseTranslator(B_TRANSLATE("Windows icon images"), 
+               B_TRANSLATE("Windows icon translator"),
                ICO_TRANSLATOR_VERSION,
                sInputFormats, kNumInputFormats,
                sOutputFormats, kNumOutputFormats,
@@ -107,8 +115,10 @@
        info->group = B_TRANSLATOR_BITMAP;
        info->quality = ICO_IN_QUALITY;
        info->capability = ICO_IN_CAPABILITY;
-       snprintf(info->name, sizeof(info->name), "Windows %s %ld bit image",
-               type == ICO::kTypeIcon ? "Icon" : "Cursor", bitsPerPixel);
+       snprintf(info->name, sizeof(info->name), 
+               B_TRANSLATE("Windows %s %ld bit image"),
+               type == ICO::kTypeIcon ? B_TRANSLATE("Icon") : 
B_TRANSLATE("Cursor"), 
+               bitsPerPixel);
        strcpy(info->MIME, kICOMimeType);
 
        return B_OK;

Modified: haiku/trunk/src/add-ons/translators/ico/Jamfile
===================================================================
--- haiku/trunk/src/add-ons/translators/ico/Jamfile     2011-01-26 22:06:02 UTC 
(rev 40297)
+++ haiku/trunk/src/add-ons/translators/ico/Jamfile     2011-01-26 22:58:47 UTC 
(rev 40298)
@@ -15,6 +15,13 @@
        : true
 ;
 
+DoCatalogs ICOTranslator :
+       x-vnd.Haiku-ICOTranslator
+       :
+       ConfigView.cpp
+       ICOTranslator.cpp
+;
+
 Package haiku-translationkit-cvs :
        ICOTranslator
        : boot home config add-ons Translators

Modified: haiku/trunk/src/add-ons/translators/ico/main.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/ico/main.cpp    2011-01-26 22:06:02 UTC 
(rev 40297)
+++ haiku/trunk/src/add-ons/translators/ico/main.cpp    2011-01-26 22:58:47 UTC 
(rev 40298)
@@ -4,20 +4,26 @@
  */
 
 
+#include <Application.h>
+#include <Catalog.h>
+
 #include "ICOTranslator.h"
 #include "ICO.h"
-
 #include "TranslatorWindow.h"
-#include <Application.h>
 
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "main"
+
+
 int
 main(int /*argc*/, char **/*argv*/)
 {
        BApplication app("application/x-vnd.Haiku-ICOTranslator");
 
        status_t result;
-       result = LaunchTranslatorWindow(new ICOTranslator, "ICO Settings", 
BRect(0, 0, 225, 175));
+       result = LaunchTranslatorWindow(new ICOTranslator, 
+               B_TRANSLATE("ICO Settings"), BRect(0, 0, 225, 175));
        if (result != B_OK)
                return 1;
 

Modified: haiku/trunk/src/add-ons/translators/jpeg/JPEGTranslator.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/jpeg/JPEGTranslator.cpp 2011-01-26 
22:06:02 UTC (rev 40297)
+++ haiku/trunk/src/add-ons/translators/jpeg/JPEGTranslator.cpp 2011-01-26 
22:58:47 UTC (rev 40298)
@@ -35,11 +35,14 @@
 #include "exif_parser.h"
 
 #include <Alignment.h>
+#include <Catalog.h>
 #include <GridLayoutBuilder.h>
 #include <GroupLayoutBuilder.h>
 #include <TabView.h>
 #include <TextView.h>
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "JPEGTranslator"
 
 #define MARKER_EXIF    0xe1
 
@@ -514,14 +517,14 @@
                new BMessage(VIEW_MSG_SET_QUALITY), 0, 100);
        fQualitySlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
        fQualitySlider->SetHashMarkCount(10);
-       fQualitySlider->SetLimitLabels("Low", "High");
+       fQualitySlider->SetLimitLabels(B_TRANSLATE("Low"), B_TRANSLATE("High"));
        fQualitySlider->SetValue(fSettings->SetGetInt32(JPEG_SET_QUALITY, 
NULL));
 
        fSmoothingSlider = new SSlider("smoothing", VIEW_LABEL_SMOOTHING,
                new BMessage(VIEW_MSG_SET_SMOOTHING), 0, 100);
        fSmoothingSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
        fSmoothingSlider->SetHashMarkCount(10);
-       fSmoothingSlider->SetLimitLabels("None", "High");
+       fSmoothingSlider->SetLimitLabels(B_TRANSLATE("None"), 
B_TRANSLATE("High"));
        fSmoothingSlider->SetValue(
                fSettings->SetGetInt32(JPEG_SET_SMOOTHING, NULL));
 
@@ -785,8 +788,8 @@
                                &longJumpBuffer);
                }
        } catch (...) {
-               fprintf(stderr, "libjpeg encoutered a critical error "
-                       "(caught C++ exception).\n");
+               fprintf(stderr, B_TRANSLATE("libjpeg encountered a critical 
error "
+                       "(caught C++ exception).\n"));
                return B_ERROR;
        }
 
@@ -939,7 +942,8 @@
                        break;
 
                default:
-                       fprintf(stderr, "Wrong type: Color space not 
implemented.\n");
+                       fprintf(stderr, 
+                               B_TRANSLATE("Wrong type: Color space not 
implemented.\n"));
                        return B_ERROR;
        }
        out_row_bytes = jpg_input_components * width;
@@ -1093,7 +1097,8 @@
        if (cinfo.out_color_space != JCS_RGB) {
                switch (cinfo.out_color_space) {
                        case JCS_UNKNOWN:               /* error/unspecified */
-                               fprintf(stderr, "From Type: Jpeg uses unknown 
color type\n");
+                               fprintf(stderr, 
+                                       B_TRANSLATE("From Type: Jpeg uses 
unknown color type\n"));
                                break;
                        case JCS_GRAYSCALE:             /* monochrome */
                                // Check if user wants to read only as RGB32 or 
not
@@ -1125,7 +1130,9 @@
                                        converter = convert_from_CMYK_to_32;
                                break;
                        default:
-                               fprintf(stderr, "From Type: Jpeg uses hmm... i 
don't know really :(\n");
+                               fprintf(stderr, 
+                                       B_TRANSLATE("From Type: Jpeg uses 
hmm... i don't know "
+                                       "really :(\n"));
                                break;
                }
        }

Modified: haiku/trunk/src/add-ons/translators/jpeg/Jamfile
===================================================================
--- haiku/trunk/src/add-ons/translators/jpeg/Jamfile    2011-01-26 22:06:02 UTC 
(rev 40297)
+++ haiku/trunk/src/add-ons/translators/jpeg/Jamfile    2011-01-26 22:58:47 UTC 
(rev 40298)
@@ -21,6 +21,14 @@
        : true
 ;
 
+DoCatalogs JPEGTranslator :
+       x-vnd.Haiku-JPEGTranslator
+       :
+       JPEGTranslator.cpp
+       exif_parser.cpp
+       be_jerror.cpp
+;
+
 Package haiku-translationkit-cvs :
        JPEGTranslator :
        boot home config add-ons Translators ;

Modified: haiku/trunk/src/add-ons/translators/jpeg/be_jerror.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/jpeg/be_jerror.cpp      2011-01-26 
22:06:02 UTC (rev 40297)
+++ haiku/trunk/src/add-ons/translators/jpeg/be_jerror.cpp      2011-01-26 
22:58:47 UTC (rev 40298)
@@ -39,6 +39,7 @@
 
 // Be headers
 #include <Alert.h>
+#include <Catalog.h>
 #include <stdio.h>
 
 // JPEG headers
@@ -50,6 +51,8 @@
 #include "JPEGTranslator.h"
 #include "TranslatorSettings.h"
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "be_jerror"
 
 // Since Translator doesn't use it's own error table, we can use error_mgr's
 // variables to store some usefull data.
@@ -68,7 +71,7 @@
        /* Create the message */
        (*cinfo->err->format_message) (cinfo, buffer);
 
-       fprintf(stderr, "JPEG Library Error: %s\n", buffer);
+       fprintf(stderr, B_TRANSLATE("JPEG Library Error: %s\n"), buffer);
 
        jmp_buf longJumpBuffer;
        memcpy(&longJumpBuffer, &(cinfo->err->long_jump_buffer), 
sizeof(jmp_buf));
@@ -97,7 +100,7 @@
        /* If it's compressing or decompressing and user turned messages on */
        if (!cinfo->is_decompressor || cinfo->err->ShowReadWarnings) {
                /* show warning message */
-               fprintf(stderr, "JPEG Library Warning: %s\n", buffer);
+               fprintf(stderr, B_TRANSLATE("JPEG Library Warning: %s\n"), 
buffer);
        }
 }
 

Modified: haiku/trunk/src/add-ons/translators/jpeg/exif_parser.cpp
===================================================================
--- haiku/trunk/src/add-ons/translators/jpeg/exif_parser.cpp    2011-01-26 
22:06:02 UTC (rev 40297)
+++ haiku/trunk/src/add-ons/translators/jpeg/exif_parser.cpp    2011-01-26 
22:58:47 UTC (rev 40298)
@@ -11,10 +11,15 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <Catalog.h>
 #include <Message.h>
 
 #include <ReadHelper.h>
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "exit_parser"
+
+
 using std::set;
 
 enum {
@@ -29,11 +34,11 @@
 };
 
 static const convert_tag kDefaultTags[] = {
-       {TAG_MAKER,                     B_ANY_TYPE,             "Maker"},
-       {TAG_MODEL,                     B_ANY_TYPE,             "Model"},
-       {TAG_ORIENTATION,       B_INT32_TYPE,   "Orientation"},
-       {TAG_EXPOSURE_TIME,     B_DOUBLE_TYPE,  "ExposureTime"},
-       {TAG_ISO,                       B_INT32_TYPE,   "ISO"},
+       {TAG_MAKER,                     B_ANY_TYPE,             
B_TRANSLATE_MARK("Maker")},
+       {TAG_MODEL,                     B_ANY_TYPE,             
B_TRANSLATE_MARK("Model")},
+       {TAG_ORIENTATION,       B_INT32_TYPE,   
B_TRANSLATE_MARK("Orientation")},
+       {TAG_EXPOSURE_TIME,     B_DOUBLE_TYPE,  
B_TRANSLATE_MARK("ExposureTime")},
+       {TAG_ISO,                       B_INT32_TYPE,   
B_TRANSLATE_MARK("ISO")},
 };
 static const size_t kNumDefaultTags = sizeof(kDefaultTags)
        / sizeof(kDefaultTags[0]);


Other related posts: