[solang] Added comments and context information to aid translation



commit 6709144f34cea29de3fd1a3118daa59debe515df
Author: Debarshi Ray <rishi gnu org>
Date:   Tue Feb 2 22:29:09 2010 +0200

    Added comments and context information to aid translation
    
    https://bugzilla.gnome.org/608826

 src/application/main-window.cpp     |    8 +++++---
 src/common/exif-data.cpp            |   21 +++++++++++----------
 src/common/histogram-viewer.cpp     |    5 +++--
 src/exporter/exporter-dialog.cpp    |    6 +++---
 src/importer/importer-dialog.cpp    |    4 ++--
 src/renderer/browser-renderer.cpp   |    6 ++++--
 src/renderer/enlarged-renderer.cpp  |   17 ++++++++++-------
 src/renderer/slideshow-renderer.cpp |   16 ++++++++--------
 src/renderer/slideshow-window.cpp   |   18 +++++++++---------
 9 files changed, 55 insertions(+), 46 deletions(-)
---
diff --git a/src/application/main-window.cpp b/src/application/main-window.cpp
index 53dede5..afeab81 100644
--- a/src/application/main-window.cpp
+++ b/src/application/main-window.cpp
@@ -665,12 +665,14 @@ MainWindow::on_action_help_about() throw()
         about_dialog.set_logo(logo);
     }
 
+    // Translators: Put your names here.
     about_dialog.set_translator_credits(_("translator-credits"));
+
     about_dialog.set_version(_(PACKAGE_VERSION));
     about_dialog.set_website(websiteURL);
-    about_dialog.set_website_label(Glib::ustring::compose(
-                                       _("%1 Website"),
-                                       PACKAGE_NAME));
+    about_dialog.set_website_label(
+        Glib::ustring::compose(C_("Project website", "%1 Website"),
+                               PACKAGE_NAME));
     about_dialog.set_wrap_license(false);
     about_dialog.set_url_hook(
         sigc::mem_fun(*this,
diff --git a/src/common/exif-data.cpp b/src/common/exif-data.cpp
index 7471999..3dc2d37 100644
--- a/src/common/exif-data.cpp
+++ b/src/common/exif-data.cpp
@@ -158,11 +158,11 @@ ExifData::set_flash(const Glib::ustring & flash) throw()
 {
     if (flashOff_ == flash)
     {
-        flash_ = _("Off");
+        flash_ = C_("Flash", "Off");
     }
     else if (flashOn_ == flash)
     {
-        flash_ = _("On");
+        flash_ = C_("Flash", "On");
     }
     else
     {
@@ -196,27 +196,28 @@ ExifData::set_metering_mode(const Glib::ustring & metering_mode)
 {
     if (meteringModeAverage_ == metering_mode)
     {
-        meteringMode_ = _("Average");
+        meteringMode_ = C_("Metering mode", "Average");
     }
     else if (meteringModeCenterWeightedAverage_ == metering_mode)
     {
-        meteringMode_ = _("Center Weighted Average");
+        meteringMode_ = C_("Metering mode",
+                           "Center Weighted Average");
     }
     else if (meteringModeSpot_ == metering_mode)
     {
-        meteringMode_ = _("Spot");
+        meteringMode_ = C_("Metering mode", "Spot");
     }
     else if (meteringModeMultiSpot_ == metering_mode)
     {
-        meteringMode_ = _("Multi-spot");
+        meteringMode_ = C_("Metering mode", "Multi-spot");
     }
     else if (meteringModePattern_ == metering_mode)
     {
-        meteringMode_ = _("Pattern");
+        meteringMode_ = C_("Metering mode", "Pattern");
     }
     else if (meteringModePartial_ == metering_mode)
     {
-        meteringMode_ = _("Partial");
+        meteringMode_ = C_("Metering mode", "Partial");
     }
     else
     {
@@ -232,11 +233,11 @@ ExifData::set_white_balance(const Glib::ustring & white_balance)
 {
     if (whiteBalanceAuto_ == white_balance)
     {
-        whiteBalance_ = _("Automatic");
+        whiteBalance_ = C_("White balance", "Automatic");
     }
     else if (whiteBalanceManual_ == white_balance)
     {
-        whiteBalance_ = _("Manual");
+        whiteBalance_ = C_("White balance", "Manual");
     }
     else
     {
diff --git a/src/common/histogram-viewer.cpp b/src/common/histogram-viewer.cpp
index b92d05a..811d6f1 100644
--- a/src/common/histogram-viewer.cpp
+++ b/src/common/histogram-viewer.cpp
@@ -1,5 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
+ * Copyright (C) 2010 Debarshi Ray <rishi gnu org>
  * Copyright (C) 2009 Santanu Sinha <santanu sinha gmail com>
  *
  * Solang is free software: you can redistribute it and/or modify it
@@ -64,12 +65,12 @@ HistogramViewer::HistogramViewer( bool autoupdate )
     {
         Gtk::TreeModel::Row row = *(typeStore_->append());
         row[ typeCols_.type_ ] = Histogram::LINEAR;
-        row[ typeCols_.name_ ] =  _("Linear") ;
+        row[ typeCols_.name_ ] =  C_("Scale", "Linear") ;
     }
     {
         Gtk::TreeModel::Row row = *(typeStore_->append());
         row[ typeCols_.type_ ] = Histogram::LOGARITHMIC;
-        row[ typeCols_.name_ ] =  _("Logarithmic") ;
+        row[ typeCols_.name_ ] =  C_("Scale", "Logarithmic") ;
     }
     cmbType_.set_active( 0 );
 
diff --git a/src/exporter/exporter-dialog.cpp b/src/exporter/exporter-dialog.cpp
index 43f5d54..74657a4 100644
--- a/src/exporter/exporter-dialog.cpp
+++ b/src/exporter/exporter-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
- * Copyright (C) 2009 Debarshi Ray <rishi gnu org>
+ * Copyright (C) 2009, 2010 Debarshi Ray <rishi gnu org>
  *
  * Solang is free software: you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -63,7 +63,7 @@ ExporterDialog::ExporterDialog(Gtk::Widget & browser,
     generalLabel_.set_use_markup(true);
     {
         Glib::ustring markup = "<b>";
-        markup += _("General");
+        markup += C_("A group of UI controls", "General");
         markup += "</b>";
         generalLabel_.set_markup(markup);
     }
@@ -75,7 +75,7 @@ ExporterDialog::ExporterDialog(Gtk::Widget & browser,
     optionsLabel_.set_use_markup(true);
     {
         Glib::ustring markup = "<b>";
-        markup += _("Options");
+        markup += C_("A group of UI controls", "Options");
         markup += "</b>";
         optionsLabel_.set_markup(markup);
     }
diff --git a/src/importer/importer-dialog.cpp b/src/importer/importer-dialog.cpp
index 052ad43..27b67fd 100644
--- a/src/importer/importer-dialog.cpp
+++ b/src/importer/importer-dialog.cpp
@@ -76,7 +76,7 @@ ImporterDialog::ImporterDialog(Gtk::Widget & browser,
     generalLabel_.set_use_markup(true);
     {
         Glib::ustring markup = "<b>";
-        markup += _("General");
+        markup += C_("A group of UI controls", "General");
         markup += "</b>";
         generalLabel_.set_markup(markup);
     }
@@ -100,7 +100,7 @@ ImporterDialog::ImporterDialog(Gtk::Widget & browser,
     optionsLabel_.set_use_markup(true);
     {
         Glib::ustring markup = "<b>";
-        markup += _("Options");
+        markup += C_("A group of UI controls", "Options");
         markup += "</b>";
         optionsLabel_.set_markup(markup);
     }
diff --git a/src/renderer/browser-renderer.cpp b/src/renderer/browser-renderer.cpp
index 8380555..8c7df48 100644
--- a/src/renderer/browser-renderer.cpp
+++ b/src/renderer/browser-renderer.cpp
@@ -204,7 +204,8 @@ BrowserRenderer::BrowserRenderer() throw() :
             _("_Previous Page"),
             _("Go to the previous page in the collection"));
 
-        action->property_short_label().set_value(_("Previous"));
+        action->property_short_label().set_value(
+            C_("Navigation", "Previous"));
         action->property_is_important().set_value(true);
         action->set_sensitive(false);
         actionGroup_->add(
@@ -219,7 +220,8 @@ BrowserRenderer::BrowserRenderer() throw() :
             _("_Next Page"),
             _("Go to the next page in the collection"));
 
-        action->property_short_label().set_value(_("Next"));
+        action->property_short_label().set_value(
+            C_("Navigation", "Next"));
         action->property_is_important().set_value(true);
         actionGroup_->add(
             action, Gtk::AccelKey("<alt>Page_Down"),
diff --git a/src/renderer/enlarged-renderer.cpp b/src/renderer/enlarged-renderer.cpp
index 71e5c30..2eef5c8 100644
--- a/src/renderer/enlarged-renderer.cpp
+++ b/src/renderer/enlarged-renderer.cpp
@@ -69,7 +69,7 @@ EnlargedRenderer::EnlargedRenderer() throw() :
     actionGroup_(0),
     uiID_(0),
     dockItemName_("enlarged-dock-item"),
-    dockItemTitle_(_("Enlarged")),
+    dockItemTitle_(C_("Mode or view", "Enlarged")),
     dockItemBehaviour_(GDL_DOCK_ITEM_BEH_NO_GRIP),
     dockItem_(NULL),
     imageView_(0),
@@ -290,7 +290,7 @@ EnlargedRenderer::create_action_group() throw()
             _("_Zoom In"),
             _("Enlarge the photo"));
 
-        action->property_short_label().set_value(_("In"));
+        action->property_short_label().set_value(C_("Zoom", "In"));
         action->property_is_important().set_value(true);
         actionGroup_->add(
             action, Gtk::AccelKey("<control>plus"),
@@ -304,7 +304,7 @@ EnlargedRenderer::create_action_group() throw()
             _("Zoom _Out"),
             _("Shrink the photo"));
 
-        action->property_short_label().set_value(_("Out"));
+        action->property_short_label().set_value(C_("Zoom", "Out"));
         action->property_is_important().set_value(true);
         actionGroup_->add(
             action, Gtk::AccelKey("<control>minus"),
@@ -318,7 +318,8 @@ EnlargedRenderer::create_action_group() throw()
             _("_Normal Size"),
             _("Show the photo at its normal size"));
 
-        action->property_short_label().set_value(_("Normal"));
+        action->property_short_label().set_value(
+                                           C_("Zoom", "Normal"));
         action->property_is_important().set_value(true);
         actionGroup_->add(
             action, Gtk::AccelKey("<control>0"),
@@ -332,7 +333,7 @@ EnlargedRenderer::create_action_group() throw()
             _("Best _Fit"),
             _("Fit the photo to the window"));
 
-        action->property_short_label().set_value(_("Fit"));
+        action->property_short_label().set_value(C_("Zoom", "Fit"));
         action->property_is_important().set_value(true);
         actionGroup_->add(
             action,
@@ -346,7 +347,8 @@ EnlargedRenderer::create_action_group() throw()
             _("_Previous Photo"),
             _("Go to the previous photo in the collection"));
 
-        action->property_short_label().set_value(_("Previous"));
+        action->property_short_label().set_value(
+            C_("Navigation", "Previous"));
         action->property_is_important().set_value(true);
         actionGroup_->add(
             action, Gtk::AccelKey("<alt>Left"),
@@ -360,7 +362,8 @@ EnlargedRenderer::create_action_group() throw()
             _("_Next Photo"),
             _("Go to the next photo in the collection"));
 
-        action->property_short_label().set_value(_("Next"));
+        action->property_short_label().set_value(
+            C_("Navigation", "Next"));
         action->property_is_important().set_value(true);
         actionGroup_->add(
             action, Gtk::AccelKey("<alt>Right"),
diff --git a/src/renderer/slideshow-renderer.cpp b/src/renderer/slideshow-renderer.cpp
index 5ee0190..bd3c11a 100644
--- a/src/renderer/slideshow-renderer.cpp
+++ b/src/renderer/slideshow-renderer.cpp
@@ -132,7 +132,7 @@ SlideshowRenderer::create_action_group() throw()
     actionGroup_->add(
         Gtk::Action::create(
             "ActionGoSlideshowFirstPhoto", Gtk::Stock::GOTO_FIRST,
-            _("First"),
+            C_("Navigation", "First"),
             _("Go to the first photo in the collection")),
         Gtk::AccelKey("<alt>Home"),
         sigc::mem_fun(*this, &SlideshowRenderer::on_action_go_first));
@@ -140,7 +140,7 @@ SlideshowRenderer::create_action_group() throw()
     actionGroup_->add(
         Gtk::Action::create(
             "ActionGoSlideshowPreviousPhoto", Gtk::Stock::GO_BACK,
-            _("Previous"),
+            C_("Navigation", "Previous"),
             _("Go to the previous photo in the collection")),
         Gtk::AccelKey("<alt>Left"),
         sigc::mem_fun(*this,
@@ -149,7 +149,7 @@ SlideshowRenderer::create_action_group() throw()
     actionGroup_->add(
         Gtk::Action::create(
             "ActionGoSlideshowNextPhoto", Gtk::Stock::GO_FORWARD,
-            _("Next"),
+            C_("Navigation", "Next"),
             _("Go to the next photo in the collection")),
         Gtk::AccelKey("<alt>Right"),
         sigc::mem_fun(*this, &SlideshowRenderer::on_action_go_next));
@@ -157,7 +157,7 @@ SlideshowRenderer::create_action_group() throw()
     actionGroup_->add(
         Gtk::Action::create(
             "ActionGoSlideshowLastPhoto", Gtk::Stock::GOTO_LAST,
-            _("Last"),
+            C_("Navigation", "Last"),
             _("Go to the last photo in the collection")),
         Gtk::AccelKey("<alt>End"),
         sigc::mem_fun(*this, &SlideshowRenderer::on_action_go_last));
@@ -176,7 +176,7 @@ SlideshowRenderer::create_action_group() throw()
     actionGroup_->add(
         Gtk::Action::create(
             "AccelGoSlideshowFirstPhoto", Gtk::StockID(),
-            _("First"),
+            C_("Navigation", "First"),
             _("Go to the first photo in the collection")),
         Gtk::AccelKey("Home"),
         sigc::mem_fun(*this, &SlideshowRenderer::on_action_go_first));
@@ -184,7 +184,7 @@ SlideshowRenderer::create_action_group() throw()
     actionGroup_->add(
         Gtk::Action::create(
             "AccelGoSlideshowPreviousPhoto", Gtk::StockID(),
-            _("Previous"),
+            C_("Navigation", "Previous"),
             _("Go to the previous photo in the collection")),
         Gtk::AccelKey("Left"),
         sigc::mem_fun(*this,
@@ -193,7 +193,7 @@ SlideshowRenderer::create_action_group() throw()
     actionGroup_->add(
         Gtk::Action::create(
             "AccelGoSlideshowNextPhoto", Gtk::StockID(),
-            _("Next"),
+            C_("Navigation", "Next"),
             _("Go to the next photo in the collection")),
         Gtk::AccelKey("Right"),
         sigc::mem_fun(*this, &SlideshowRenderer::on_action_go_next));
@@ -201,7 +201,7 @@ SlideshowRenderer::create_action_group() throw()
     actionGroup_->add(
         Gtk::Action::create(
             "AccelGoSlideshowLastPhoto", Gtk::StockID(),
-            _("Last"),
+            C_("Navigation", "Last"),
             _("Go to the last photo in the collection")),
         Gtk::AccelKey("End"),
         sigc::mem_fun(*this, &SlideshowRenderer::on_action_go_last));
diff --git a/src/renderer/slideshow-window.cpp b/src/renderer/slideshow-window.cpp
index 5273090..f2ea915 100644
--- a/src/renderer/slideshow-window.cpp
+++ b/src/renderer/slideshow-window.cpp
@@ -71,7 +71,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "ActionViewSlideshowZoomIn", Gtk::Stock::ZOOM_IN,
-            _("In"),
+            C_("Zoom", "In"),
             _("Enlarge the photo")),
         Gtk::AccelKey("<control>plus"),
         sigc::mem_fun(*this,
@@ -80,7 +80,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "ActionViewSlideshowZoomOut", Gtk::Stock::ZOOM_OUT,
-            _("Out"),
+            C_("Zoom", "Out"),
             _("Shrink the photo")),
         Gtk::AccelKey("<control>minus"),
         sigc::mem_fun(*this,
@@ -89,7 +89,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "ActionViewSlideshowNormalSize", Gtk::Stock::ZOOM_100,
-            _("Normal"),
+            C_("Zoom", "Normal"),
             _("Show the photo at its normal size")),
         Gtk::AccelKey("<control>0"),
         sigc::mem_fun(*this,
@@ -98,7 +98,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "ActionViewSlideshowBestFit", Gtk::Stock::ZOOM_FIT,
-            _("Fit"),
+            C_("Zoom", "Fit"),
             _("Fit the photo to the window")),
         sigc::mem_fun(*this,
                       &SlideshowWindow::on_action_view_best_fit));
@@ -106,7 +106,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "AccelViewSlideshowZoomIn", Gtk::StockID(),
-            _("In"),
+            C_("Zoom", "In"),
             _("Enlarge the photo")),
         Gtk::AccelKey("plus"),
         sigc::mem_fun(*this,
@@ -115,7 +115,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "AccelViewSlideshowZoomIn1", Gtk::StockID(),
-            _("In"),
+            C_("Zoom", "In"),
             _("Enlarge the photo")),
         Gtk::AccelKey("KP_Add"),
         sigc::mem_fun(*this,
@@ -124,7 +124,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "AccelViewSlideshowZoomIn2", Gtk::StockID(),
-            _("In"),
+            C_("Zoom", "In"),
             _("Enlarge the photo")),
         Gtk::AccelKey("equal"),
         sigc::mem_fun(*this,
@@ -133,7 +133,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "AccelViewSlideshowZoomOut", Gtk::StockID(),
-            _("Out"),
+            C_("Zoom", "Out"),
             _("Shrink the photo")),
         Gtk::AccelKey("minus"),
         sigc::mem_fun(*this,
@@ -142,7 +142,7 @@ SlideshowWindow::SlideshowWindow() throw() :
     actionGroup_->add(
         Gtk::Action::create(
             "AccelViewSlideshowZoomOut1", Gtk::StockID(),
-            _("Out"),
+            C_("Zoom", "Out"),
             _("Shrink the photo")),
         Gtk::AccelKey("KP_Subtract"),
         sigc::mem_fun(*this,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]