Mailinglist Archive: yast-commit (183 mails)
| < Previous | Next > |
[yast-commit] r62586 - in /trunk/gtk/src/pkg: YGPackageSelector.cc ygtkpkgdetailview.cc ygtkpkgfilterview.cc ygtkpkgmenubar.cc ygtkpkgstatusbar.cc
- From: rpmcruz@xxxxxxxxxxxxxxxxx
- Date: Fri, 08 Oct 2010 20:25:32 -0000
- Message-id: <20101008202533.0691F32395@xxxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Fri Oct 8 22:25:32 2010
New Revision: 62586
URL: http://svn.opensuse.org/viewcvs/yast?rev=62586&view=rev
Log:
String review.
Modified:
trunk/gtk/src/pkg/YGPackageSelector.cc
trunk/gtk/src/pkg/ygtkpkgdetailview.cc
trunk/gtk/src/pkg/ygtkpkgfilterview.cc
trunk/gtk/src/pkg/ygtkpkgmenubar.cc
trunk/gtk/src/pkg/ygtkpkgstatusbar.cc
Modified: trunk/gtk/src/pkg/YGPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/YGPackageSelector.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/YGPackageSelector.cc (original)
+++ trunk/gtk/src/pkg/YGPackageSelector.cc Fri Oct 8 22:25:32 2010
@@ -273,7 +273,7 @@
}
virtual bool showMessage (Ypp::Selectable &sel, const std::string
&message)
- { return acceptText (sel, _("Warning Message"), _("Install anyway"),
message); }
+ { return acceptText (sel, _("Warning Message"), _("Install anyway?"),
message); }
virtual bool resolveProblems (const std::list <Ypp::Problem *>
&problems)
{
Modified: trunk/gtk/src/pkg/ygtkpkgdetailview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgdetailview.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgdetailview.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgdetailview.cc Fri Oct 8 22:25:32 2010
@@ -24,8 +24,12 @@
#define BROWSER_BIN "/usr/bin/firefox"
#define GNOME_OPEN_BIN "/usr/bin/gnome-open"
-static const char *onlyInstalledMsg =
- _("<i>Information only available for installed packages.</i>");
+static std::string onlyInstalledMsg() {
+ std::string s ("<i>");
+ s += _("Information only available for installed packages.");
+ s += "</i>";
+ return s;
+}
#if 0
static const char *keywordOpenTag = "<font color=\"#000000\"
bgcolor=\"#ffff00\">";
@@ -188,17 +192,14 @@
GtkWidget *item;
if (g_file_test (BROWSER_BIN,
G_FILE_TEST_IS_EXECUTABLE)) {
- std::string label;
+ std::string label ("_Open");
if (getuid() == 0) {
const char *username = getenv
("USERNAME");
if (!username || !(*username))
username = "root";
- label = _("_Open (as ");
- label += username;
- label += ")";
+ label += " ("; label += _("as");
+ label += " "; label += username; label
+= ")";
}
- else
- label = _("_Open");
item = gtk_image_menu_item_new_with_mnemonic
(label.c_str());
gtk_image_menu_item_set_image
(GTK_IMAGE_MENU_ITEM (item),
gtk_image_new_from_stock
(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU));
@@ -776,11 +777,8 @@
inst = VersionDependencies
(sel.installed()).getText (dep);
if (hasCandidate)
cand = VersionDependencies
(sel.candidate()).getText (dep);
- if (!inst.empty() || !cand.empty()) {
- if (inst == cand)
- cand = i + _("idem") + _i;
+ if (!inst.empty() || !cand.empty())
addLine (VersionDependencies::getLabel (dep),
inst, cand, dep);
- }
}
gtk_widget_show_all (vbox);
}
@@ -797,16 +795,17 @@
static const char *getLabel (int dep)
{
+
switch ((zypp::Dep::for_use_in_switch) dep) {
- case zypp::Dep::PROVIDES_e: return
_("Provides:");
- case zypp::Dep::PREREQUIRES_e: return
_("Pre-requires:");
- case zypp::Dep::REQUIRES_e: return
_("Requires:");
- case zypp::Dep::CONFLICTS_e: return
_("Conflicts:");
- case zypp::Dep::OBSOLETES_e: return
_("Obsoletes:");
- case zypp::Dep::RECOMMENDS_e: return
_("Recommends:");
- case zypp::Dep::SUGGESTS_e: return
_("Suggests:");
- case zypp::Dep::ENHANCES_e: return
_("Enhances:");
- case zypp::Dep::SUPPLEMENTS_e: return
_("Supplements:");
+ case zypp::Dep::PROVIDES_e: return "Provides:";
+ case zypp::Dep::PREREQUIRES_e: return
"Pre-requires:";
+ case zypp::Dep::REQUIRES_e: return "Requires:";
+ case zypp::Dep::CONFLICTS_e: return
"Conflicts:";
+ case zypp::Dep::OBSOLETES_e: return
"Obsoletes:";
+ case zypp::Dep::RECOMMENDS_e: return
"Recommends:";
+ case zypp::Dep::SUGGESTS_e: return "Suggests:";
+ case zypp::Dep::ENHANCES_e: return "Enhances:";
+ case zypp::Dep::SUPPLEMENTS_e: return
"Supplements:";
}
return 0;
}
@@ -894,7 +893,7 @@
if (sel.isInstalled())
ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
filelist (sel).c_str());
else
- ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
onlyInstalledMsg);
+ ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
onlyInstalledMsg().c_str());
}
virtual void showRefreshList (Ypp::List list) {}
@@ -1009,7 +1008,7 @@
if (sel.isInstalled())
ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
changelog (sel).c_str());
else
- ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
onlyInstalledMsg);
+ ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
onlyInstalledMsg().c_str());
}
virtual void showRefreshList (Ypp::List list) {}
@@ -1057,10 +1056,10 @@
{
Ypp::Selectable sel = list.get (0);
std::string str (authors (sel));
- if (str.empty())
- ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
_("<i>Not specified.</i>"));
- else
- ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
str.c_str());
+ if (str.empty()) {
+ str = "<i>"; str += _("Attribute not-specified."); str
+= "</i>";
+ }
+ ygtk_rich_text_set_text (YGTK_RICH_TEXT (text), str.c_str());
}
virtual void showRefreshList (Ypp::List list) {}
Modified: trunk/gtk/src/pkg/ygtkpkgfilterview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgfilterview.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgfilterview.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgfilterview.cc Fri Oct 8 22:25:32 2010
@@ -269,8 +269,8 @@
GtkWidget *hbox = gtk_hbox_new (FALSE, 6), *button, *icon;
- // Translators: if you prefer, translate this as "Apply Patches"
- button = gtk_button_new_with_label (_("Apply Patches"));
+ // Translators: this is shown next to the "Upgrade All" button
+ button = gtk_button_new_with_label (_("Only Upgrade Patches"));
gtk_widget_set_sensitive (button, hasPatches);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (upgrade_patches_clicked_cb),
this);
Modified: trunk/gtk/src/pkg/ygtkpkgmenubar.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgmenubar.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgmenubar.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgmenubar.cc Fri Oct 8 22:25:32 2010
@@ -366,8 +366,7 @@
// Post error popup
std::string str (_("Could not save to:"));
str += " "; str += filename;
- errorMsg (text);
- g_free (text);
+ errorMsg (str);
}
g_free (filename);
@@ -380,8 +379,8 @@
{
const char *dirname = "/var/log/YaST2/solverTestcase";
std::string msg (_("Use this to generate extensive logs to help
tracking "
- "down bugs in the dependencies resolver.");
- msg += "\n"; msg += _("The logs will be saved to the directory:"));
+ "down bugs in the dependencies resolver."));
+ msg += "\n"; msg += _("The logs will be saved to the directory:");
msg += " "; msg += dirname;
GtkWidget *dialog = gtk_message_dialog_new (YGDialog::currentWindow(),
Modified: trunk/gtk/src/pkg/ygtkpkgstatusbar.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgstatusbar.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgstatusbar.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgstatusbar.cc Fri Oct 8 22:25:32 2010
@@ -91,14 +91,17 @@
if (sel->toModifyAuto())
str = g_strdup_printf (_("<b>%s</b> %d
preselected packages"), action, auto_count);
else {
- const char *format;
- if (auto_count > 1)
- format = _("<b>%s</b> %s, plus %d
dependencies");
- else if (auto_count == 1)
- format = _("<b>%s</b> %s, plus 1
dependency");
- else
- format = "<b>%s</b> %s";
- str = g_strdup_printf (format, action,
sel->name().c_str(), auto_count);
+ if (auto_count == 0)
+ str = g_strdup_printf ("<b>%s</b> %s",
action, sel->name().c_str());
+ else {
+ char *deps;
+ if (auto_count == 1)
+ deps = g_strdup (_("plus 1
dependency"));
+ else
+ deps = g_strdup_printf (_("plus
%d dependencies"), auto_count);
+ str = g_strdup_printf ("<b>%s</b> %s,
%s", action, sel->name().c_str(), deps);
+ g_free (deps);
+ }
}
gtk_label_set_markup (GTK_LABEL (text), str);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Fri Oct 8 22:25:32 2010
New Revision: 62586
URL: http://svn.opensuse.org/viewcvs/yast?rev=62586&view=rev
Log:
String review.
Modified:
trunk/gtk/src/pkg/YGPackageSelector.cc
trunk/gtk/src/pkg/ygtkpkgdetailview.cc
trunk/gtk/src/pkg/ygtkpkgfilterview.cc
trunk/gtk/src/pkg/ygtkpkgmenubar.cc
trunk/gtk/src/pkg/ygtkpkgstatusbar.cc
Modified: trunk/gtk/src/pkg/YGPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/YGPackageSelector.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/YGPackageSelector.cc (original)
+++ trunk/gtk/src/pkg/YGPackageSelector.cc Fri Oct 8 22:25:32 2010
@@ -273,7 +273,7 @@
}
virtual bool showMessage (Ypp::Selectable &sel, const std::string
&message)
- { return acceptText (sel, _("Warning Message"), _("Install anyway"),
message); }
+ { return acceptText (sel, _("Warning Message"), _("Install anyway?"),
message); }
virtual bool resolveProblems (const std::list <Ypp::Problem *>
&problems)
{
Modified: trunk/gtk/src/pkg/ygtkpkgdetailview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgdetailview.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgdetailview.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgdetailview.cc Fri Oct 8 22:25:32 2010
@@ -24,8 +24,12 @@
#define BROWSER_BIN "/usr/bin/firefox"
#define GNOME_OPEN_BIN "/usr/bin/gnome-open"
-static const char *onlyInstalledMsg =
- _("<i>Information only available for installed packages.</i>");
+static std::string onlyInstalledMsg() {
+ std::string s ("<i>");
+ s += _("Information only available for installed packages.");
+ s += "</i>";
+ return s;
+}
#if 0
static const char *keywordOpenTag = "<font color=\"#000000\"
bgcolor=\"#ffff00\">";
@@ -188,17 +192,14 @@
GtkWidget *item;
if (g_file_test (BROWSER_BIN,
G_FILE_TEST_IS_EXECUTABLE)) {
- std::string label;
+ std::string label ("_Open");
if (getuid() == 0) {
const char *username = getenv
("USERNAME");
if (!username || !(*username))
username = "root";
- label = _("_Open (as ");
- label += username;
- label += ")";
+ label += " ("; label += _("as");
+ label += " "; label += username; label
+= ")";
}
- else
- label = _("_Open");
item = gtk_image_menu_item_new_with_mnemonic
(label.c_str());
gtk_image_menu_item_set_image
(GTK_IMAGE_MENU_ITEM (item),
gtk_image_new_from_stock
(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU));
@@ -776,11 +777,8 @@
inst = VersionDependencies
(sel.installed()).getText (dep);
if (hasCandidate)
cand = VersionDependencies
(sel.candidate()).getText (dep);
- if (!inst.empty() || !cand.empty()) {
- if (inst == cand)
- cand = i + _("idem") + _i;
+ if (!inst.empty() || !cand.empty())
addLine (VersionDependencies::getLabel (dep),
inst, cand, dep);
- }
}
gtk_widget_show_all (vbox);
}
@@ -797,16 +795,17 @@
static const char *getLabel (int dep)
{
+
switch ((zypp::Dep::for_use_in_switch) dep) {
- case zypp::Dep::PROVIDES_e: return
_("Provides:");
- case zypp::Dep::PREREQUIRES_e: return
_("Pre-requires:");
- case zypp::Dep::REQUIRES_e: return
_("Requires:");
- case zypp::Dep::CONFLICTS_e: return
_("Conflicts:");
- case zypp::Dep::OBSOLETES_e: return
_("Obsoletes:");
- case zypp::Dep::RECOMMENDS_e: return
_("Recommends:");
- case zypp::Dep::SUGGESTS_e: return
_("Suggests:");
- case zypp::Dep::ENHANCES_e: return
_("Enhances:");
- case zypp::Dep::SUPPLEMENTS_e: return
_("Supplements:");
+ case zypp::Dep::PROVIDES_e: return "Provides:";
+ case zypp::Dep::PREREQUIRES_e: return
"Pre-requires:";
+ case zypp::Dep::REQUIRES_e: return "Requires:";
+ case zypp::Dep::CONFLICTS_e: return
"Conflicts:";
+ case zypp::Dep::OBSOLETES_e: return
"Obsoletes:";
+ case zypp::Dep::RECOMMENDS_e: return
"Recommends:";
+ case zypp::Dep::SUGGESTS_e: return "Suggests:";
+ case zypp::Dep::ENHANCES_e: return "Enhances:";
+ case zypp::Dep::SUPPLEMENTS_e: return
"Supplements:";
}
return 0;
}
@@ -894,7 +893,7 @@
if (sel.isInstalled())
ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
filelist (sel).c_str());
else
- ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
onlyInstalledMsg);
+ ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
onlyInstalledMsg().c_str());
}
virtual void showRefreshList (Ypp::List list) {}
@@ -1009,7 +1008,7 @@
if (sel.isInstalled())
ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
changelog (sel).c_str());
else
- ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
onlyInstalledMsg);
+ ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
onlyInstalledMsg().c_str());
}
virtual void showRefreshList (Ypp::List list) {}
@@ -1057,10 +1056,10 @@
{
Ypp::Selectable sel = list.get (0);
std::string str (authors (sel));
- if (str.empty())
- ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
_("<i>Not specified.</i>"));
- else
- ygtk_rich_text_set_text (YGTK_RICH_TEXT (text),
str.c_str());
+ if (str.empty()) {
+ str = "<i>"; str += _("Attribute not-specified."); str
+= "</i>";
+ }
+ ygtk_rich_text_set_text (YGTK_RICH_TEXT (text), str.c_str());
}
virtual void showRefreshList (Ypp::List list) {}
Modified: trunk/gtk/src/pkg/ygtkpkgfilterview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgfilterview.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgfilterview.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgfilterview.cc Fri Oct 8 22:25:32 2010
@@ -269,8 +269,8 @@
GtkWidget *hbox = gtk_hbox_new (FALSE, 6), *button, *icon;
- // Translators: if you prefer, translate this as "Apply Patches"
- button = gtk_button_new_with_label (_("Apply Patches"));
+ // Translators: this is shown next to the "Upgrade All" button
+ button = gtk_button_new_with_label (_("Only Upgrade Patches"));
gtk_widget_set_sensitive (button, hasPatches);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (upgrade_patches_clicked_cb),
this);
Modified: trunk/gtk/src/pkg/ygtkpkgmenubar.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgmenubar.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgmenubar.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgmenubar.cc Fri Oct 8 22:25:32 2010
@@ -366,8 +366,7 @@
// Post error popup
std::string str (_("Could not save to:"));
str += " "; str += filename;
- errorMsg (text);
- g_free (text);
+ errorMsg (str);
}
g_free (filename);
@@ -380,8 +379,8 @@
{
const char *dirname = "/var/log/YaST2/solverTestcase";
std::string msg (_("Use this to generate extensive logs to help
tracking "
- "down bugs in the dependencies resolver.");
- msg += "\n"; msg += _("The logs will be saved to the directory:"));
+ "down bugs in the dependencies resolver."));
+ msg += "\n"; msg += _("The logs will be saved to the directory:");
msg += " "; msg += dirname;
GtkWidget *dialog = gtk_message_dialog_new (YGDialog::currentWindow(),
Modified: trunk/gtk/src/pkg/ygtkpkgstatusbar.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgstatusbar.cc?rev=62586&r1=62585&r2=62586&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgstatusbar.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgstatusbar.cc Fri Oct 8 22:25:32 2010
@@ -91,14 +91,17 @@
if (sel->toModifyAuto())
str = g_strdup_printf (_("<b>%s</b> %d
preselected packages"), action, auto_count);
else {
- const char *format;
- if (auto_count > 1)
- format = _("<b>%s</b> %s, plus %d
dependencies");
- else if (auto_count == 1)
- format = _("<b>%s</b> %s, plus 1
dependency");
- else
- format = "<b>%s</b> %s";
- str = g_strdup_printf (format, action,
sel->name().c_str(), auto_count);
+ if (auto_count == 0)
+ str = g_strdup_printf ("<b>%s</b> %s",
action, sel->name().c_str());
+ else {
+ char *deps;
+ if (auto_count == 1)
+ deps = g_strdup (_("plus 1
dependency"));
+ else
+ deps = g_strdup_printf (_("plus
%d dependencies"), auto_count);
+ str = g_strdup_printf ("<b>%s</b> %s,
%s", action, sel->name().c_str(), deps);
+ g_free (deps);
+ }
}
gtk_label_set_markup (GTK_LABEL (text), str);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |