Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41563 - in /branches/SuSE-SLE-10-SP2-Branch/installation: package/yast2-installation.changes src/modules/AddOnProduct.ycp
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Thu, 25 Oct 2007 11:07:10 -0000
  • Message-id: <20071025110711.096B72D21B@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Thu Oct 25 13:07:10 2007
New Revision: 41563

URL: http://svn.opensuse.org/viewcvs/yast?rev=41563&view=rev
Log:
- Added fonctionality for merging texts from different control
files (including different textdomains) (#271608).


Modified:

branches/SuSE-SLE-10-SP2-Branch/installation/package/yast2-installation.changes
branches/SuSE-SLE-10-SP2-Branch/installation/src/modules/AddOnProduct.ycp

Modified:
branches/SuSE-SLE-10-SP2-Branch/installation/package/yast2-installation.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/installation/package/yast2-installation.changes?rev=41563&r1=41562&r2=41563&view=diff
==============================================================================
---
branches/SuSE-SLE-10-SP2-Branch/installation/package/yast2-installation.changes
(original)
+++
branches/SuSE-SLE-10-SP2-Branch/installation/package/yast2-installation.changes
Thu Oct 25 13:07:10 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Oct 25 12:53:59 CEST 2007 - locilka@xxxxxxx
+
+- Added fonctionality for merging texts from different control
+ files (including different textdomains) (#271608).
+
+-------------------------------------------------------------------
Mon Oct 22 09:30:30 CEST 2007 - locilka@xxxxxxx

- Calling inst_suse_register instead of suse_register client in

Modified:
branches/SuSE-SLE-10-SP2-Branch/installation/src/modules/AddOnProduct.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/installation/src/modules/AddOnProduct.ycp?rev=41563&r1=41562&r2=41563&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/installation/src/modules/AddOnProduct.ycp
(original)
+++ branches/SuSE-SLE-10-SP2-Branch/installation/src/modules/AddOnProduct.ycp
Thu Oct 25 13:07:10 2007
@@ -851,6 +851,7 @@
sm[w["stage"]:"", w["mode"]:""] = true;
return [w["stage"]:"", w["mode"]:""];
});
+
y2milestone ("Existing replace workflows: %1", sm);
y2milestone ("Workflows before filtering: %1", size
(ProductControl::workflows));
ProductControl::workflows = filter (map w, ProductControl::workflows, {
@@ -858,6 +859,7 @@
});
y2milestone ("Workflows after filtering: %1", size
(ProductControl::workflows));
ProductControl::workflows = (list<map>)merge (ProductControl::workflows,
workflows);
+
return true;
}

@@ -867,16 +869,49 @@
* @return boolean true on success
*/
boolean UpdateProductInfo(map update_file) {
- foreach (string section, ["globals", "software", "partitioning",
"network"],
+ foreach (string section, ["globals", "software", "partitioning",
"network", "texts"],
{
map<string,any> sect = ProductFeatures::GetSection(section);
map<string,any> addon = update_file[section]:$[];
sect = (map<string,any>)union (sect, addon);
ProductFeatures::SetSection(section, sect);
});
+
+ // merging 'clone_modules'
list<string> addon_clone = update_file["clone_modules"]:[];
ProductControl::clone_modules
= (list<string>)merge (ProductControl::clone_modules, addon_clone);
+
+ // merging texts
+
+ /**
+ * @struct $[
+ * "congratulate" : $[
+ * "label" : "some text",
+ * ],
+ * "congratulate2" : $[
+ * "label" : "some other text",
+ * "textdomain" : "control-2", // (optionally)
+ * ],
+ * ];
+ */
+ map <string, any> controlfile_texts = ProductFeatures::GetSection
("texts");
+ map <string, map <string, string> > update_file_texts =
update_file["texts"]:$[];
+ string update_file_textdomain = update_file["textdomain"]:"";
+
+ // if textdomain is different to the base one
+ // we have to put it into the map
+ if (update_file_textdomain != nil && update_file_textdomain != "") {
+ update_file_texts = mapmap (string text_ident, map <string, string>
text_def, update_file_texts, {
+ text_def["textdomain"] = update_file_textdomain;
+
+ return $[ text_ident : text_def ];
+ });
+ }
+
+ controlfile_texts = (map <string, any>) union (controlfile_texts,
update_file_texts);
+ ProductFeatures::SetSection ("texts", controlfile_texts);
+
return true;
}


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages