Ticket #12045: 0001-Unify-version-output-v-vs-Version-sentence-casing.patch

File 0001-Unify-version-output-v-vs-Version-sentence-casing.patch, 5.0 KB (added by humdinger, 10 years ago)

patch

  • src/add-ons/translators/gif/GIFView.cpp

    From 3292b90274c44e1485bdb127e31bbbcf80938a6a Mon Sep 17 00:00:00 2001
    From: Humdinger <humdingerb@gmail.com>
    Date: Sat, 2 May 2015 10:48:08 +0200
    Subject: [PATCH] Unify version output ("v" vs "Version", sentence casing.
    
    ---
     src/add-ons/translators/gif/GIFView.cpp                 | 2 +-
     src/add-ons/translators/jpeg/JPEGTranslator.cpp         | 9 ++++++---
     src/add-ons/translators/jpeg2000/JPEG2000Translator.cpp | 5 +++--
     src/add-ons/translators/ppm/PPMTranslator.cpp           | 2 +-
     src/add-ons/translators/psd/ConfigView.cpp              | 4 ++--
     src/add-ons/translators/tga/TGAView.cpp                 | 2 +-
     6 files changed, 14 insertions(+), 10 deletions(-)
    
    diff --git a/src/add-ons/translators/gif/GIFView.cpp b/src/add-ons/translators/gif/GIFView.cpp
    index 4167771..e26bc2d 100644
    a b GIFView::GIFView(TranslatorSettings* settings)  
    5656
    5757    char version_string[100];
    5858    snprintf(version_string, sizeof(version_string),
    59         B_TRANSLATE("v%d.%d.%d, %s"),
     59        B_TRANSLATE("Version %d.%d.%d, %s"),
    6060        int(B_TRANSLATION_MAJOR_VERSION(GIF_TRANSLATOR_VERSION)),
    6161        int(B_TRANSLATION_MINOR_VERSION(GIF_TRANSLATOR_VERSION)),
    6262        int(B_TRANSLATION_REVISION_VERSION(GIF_TRANSLATOR_VERSION)),
  • src/add-ons/translators/jpeg/JPEGTranslator.cpp

    diff --git a/src/add-ons/translators/jpeg/JPEGTranslator.cpp b/src/add-ons/translators/jpeg/JPEGTranslator.cpp
    index a951c29..21ec873 100644
    a b TranslatorAboutView::TranslatorAboutView(const char* name)  
    671671    title->SetFont(be_bold_font);
    672672    title->SetExplicitAlignment(labelAlignment);
    673673
    674     char versionString[16];
    675     sprintf(versionString, "v%d.%d.%d", (int)(sTranslatorVersion >> 8),
    676         (int)((sTranslatorVersion >> 4) & 0xf), (int)(sTranslatorVersion & 0xf));
     674    char versionString[100];
     675    snprintf(versionString, sizeof(versionString),
     676        B_TRANSLATE("Version %d.%d.%d"),
     677        (int)(sTranslatorVersion >> 8),
     678        (int)((sTranslatorVersion >> 4) & 0xf),
     679        (int)(sTranslatorVersion & 0xf));
    677680
    678681    BStringView* version = new BStringView("Version", versionString);
    679682    version->SetExplicitAlignment(labelAlignment);
  • src/add-ons/translators/jpeg2000/JPEG2000Translator.cpp

    diff --git a/src/add-ons/translators/jpeg2000/JPEG2000Translator.cpp b/src/add-ons/translators/jpeg2000/JPEG2000Translator.cpp
    index cf3ec78..9d3f3d0 100644
    a b TranslatorAboutView::TranslatorAboutView(const char* name)  
    713713    title->SetFont(be_bold_font);
    714714    title->SetExplicitAlignment(labelAlignment);
    715715
    716     char versionString[16];
    717     sprintf(versionString, "v%d.%d.%d",
     716    char versionString[100];
     717    snprintf(versionString, sizeof(versionString),
     718        B_TRANSLATE("Version %d.%d.%d"),
    718719        static_cast<int>(sTranslatorVersion >> 8),
    719720        static_cast<int>((sTranslatorVersion >> 4) & 0xf),
    720721        static_cast<int>(sTranslatorVersion & 0xf));
  • src/add-ons/translators/ppm/PPMTranslator.cpp

    diff --git a/src/add-ons/translators/ppm/PPMTranslator.cpp b/src/add-ons/translators/ppm/PPMTranslator.cpp
    index bdb546c..b81f384 100644
    a b public:  
    507507                    "bits big-endian"), CSMessage(B_RGBA15_BIG)));
    508508                fMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 5:6:5 16 bits "
    509509                    "big-endian"), CSMessage(B_RGB16)));
    510                 fField = new BMenuField(B_TRANSLATE("Input Color Space:"),
     510                fField = new BMenuField(B_TRANSLATE("Input color space:"),
    511511                    fMenu);
    512512                fField->SetViewColor(ViewColor());
    513513                SelectColorSpace(g_settings.out_space);
  • src/add-ons/translators/psd/ConfigView.cpp

    diff --git a/src/add-ons/translators/psd/ConfigView.cpp b/src/add-ons/translators/psd/ConfigView.cpp
    index ff28ad0..e380d46 100644
    a b ConfigView::ConfigView(TranslatorSettings *settings)  
    4545        fSettings->SetGetInt32(PSD_SETTING_VERSION);
    4646
    4747    _AddItemToMenu(versionPopupMenu,
    48         B_TRANSLATE("Photoshop Document (PSD File)"), MSG_VERSION_CHANGED,
     48        B_TRANSLATE("Photoshop Document (PSD file)"), MSG_VERSION_CHANGED,
    4949        PSD_FILE, currentVersion);
    5050    _AddItemToMenu(versionPopupMenu,
    51         B_TRANSLATE("Photoshop Big Document (PSB File)"), MSG_VERSION_CHANGED,
     51        B_TRANSLATE("Photoshop Big Document (PSB file)"), MSG_VERSION_CHANGED,
    5252        PSB_FILE, currentVersion);
    5353
    5454    fVersionField = new BMenuField("version",
  • src/add-ons/translators/tga/TGAView.cpp

    diff --git a/src/add-ons/translators/tga/TGAView.cpp b/src/add-ons/translators/tga/TGAView.cpp
    index 0f2ea19..6caf8be 100644
    a b TGAView::TGAView(const char *name, uint32 flags, TranslatorSettings *settings)  
    6868    fpchkIgnoreAlpha->SetValue(val);
    6969    fpchkIgnoreAlpha->SetViewColor(ViewColor());
    7070
    71     fpchkRLE = new BCheckBox(B_TRANSLATE("Save with RLE Compression"),
     71    fpchkRLE = new BCheckBox(B_TRANSLATE("Save with RLE compression"),
    7272        new BMessage(CHANGE_RLE));
    7373    val = (fSettings->SetGetBool(TGA_SETTING_RLE)) ? 1 : 0;
    7474    fpchkRLE->SetValue(val);