Author: locilka
Date: Tue Oct 7 14:05:15 2008
New Revision: 51911
URL: http://svn.opensuse.org/viewcvs/yast?rev=51911&view=rev
Log:
Empty string is not an erroneous label
Modified:
trunk/yast2/library/control/src/ProductControl.ycp
Modified: trunk/yast2/library/control/src/ProductControl.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/control/src/ProductControl.ycp?rev=51911&r1=51910&r2=51911&view=diff
==============================================================================
--- trunk/yast2/library/control/src/ProductControl.ycp (original)
+++ trunk/yast2/library/control/src/ProductControl.ycp Tue Oct 7 14:05:15 2008
@@ -1061,18 +1061,21 @@
map controlfile_texts = ProductFeatures::GetSection ("texts");
map text = (map ) controlfile_texts[key]:$[];
- string label = text["label"]:"";
- if (label == "")
+ if (! haskey (text, "label"))
{
- y2error ("The requested label %1 does not exist", key);
+ y2error ("The requested label %1 does not exist in %2", key, text);
return "";
}
+
+ string label = text["label"]:"";
+
string domain = text["textdomain"]:productControl["textdomain"]:"control";
if (domain == "")
{
- y2error ("The text domain for label %1 not set", key);
+ y2warning ("The text domain for label %1 not set", key);
return label;
}
+
return dgettext (domain, label);
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org