[rkward-cvs] [rkward] rkward/plugins/distributions/clt: Use <i18n> and <label> to achieve full translatability of CLT plugins,

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Sat Jan 31 12:03:47 UTC 2015


Git commit 7a428e45a0f8979fcc46de7dd51549ba46c26896 by Thomas Friedrichsmeier.
Committed on 31/01/2015 at 09:51.
Pushed by tfry into branch 'master'.

Use <i18n> and <label> to achieve full translatability of CLT plugins,

M  +0    -1    rkward/plugins/distributions/clt/plot_beta_clt.rkh
M  +1    -3    rkward/plugins/distributions/clt/plot_beta_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_binomial_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_chi_squared_clt.xml
M  +2    -2    rkward/plugins/distributions/clt/plot_clt_help_snippets.xml
M  +3    -1    rkward/plugins/distributions/clt/plot_clt_snippets.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_exponential_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_f_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_gamma_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_geometric_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_logistic_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_lognormal_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_negbinomial_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_normal_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_poisson_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_t_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_uniform_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_weibull_clt.xml
M  +1    -3    rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml

http://commits.kde.org/rkward/7a428e45a0f8979fcc46de7dd51549ba46c26896

diff --git a/rkward/plugins/distributions/clt/plot_beta_clt.rkh b/rkward/plugins/distributions/clt/plot_beta_clt.rkh
index d74707d..95ffa3b 100644
--- a/rkward/plugins/distributions/clt/plot_beta_clt.rkh
+++ b/rkward/plugins/distributions/clt/plot_beta_clt.rkh
@@ -1,7 +1,6 @@
 <!DOCTYPE rkhelp>
 <document>
 	<snippets>
-		<snippet id="dist_name"><span>Beta</span></snippet>
 		<snippet id="dist_related">
 			<li><link href="rkward://component/plot_beta_distribution"/></li>
 			<li><link href="rkward://rhelp/Beta"/></li>
diff --git a/rkward/plugins/distributions/clt/plot_beta_clt.xml b/rkward/plugins/distributions/clt/plot_beta_clt.xml
index 5f8f41e..4e5d6d3 100644
--- a/rkward/plugins/distributions/clt/plot_beta_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_beta_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Beta"));
-		]]></script>
+		<i18n id="dist_name" label="Beta" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Beta to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_binomial_clt.xml b/rkward/plugins/distributions/clt/plot_binomial_clt.xml
index 9ebff82..96dfd66 100644
--- a/rkward/plugins/distributions/clt/plot_binomial_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_binomial_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Binomial"));
-		]]></script>
+		<i18n id="dist_name" label="Binomial" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Binomial to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml b/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml
index e76f909..ceff2df 100644
--- a/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_chi_squared_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Chi-Squared"));
-		]]></script>
+		<i18n id="dist_name" label="Chi-Squared" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Chi squared to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml b/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml
index 7e4d2c2..3b0232c 100644
--- a/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml
+++ b/rkward/plugins/distributions/clt/plot_clt_help_snippets.xml
@@ -2,10 +2,10 @@
 <document>
 	<snippet id="clt_help_template">
 		<summary>
-			Normal approximation to <insert snippet="dist_name"/> Sample averages. Most of this help file is generic description of CLT plugins. Sample averages from a contending distribution (Binomial here) are compared to a target Normal distribution. The comparison is made based on either histograms or distribution functions. For brevity, D will denote the contending distribution (<insert snippet="dist_name"/> here).
+			Normal approximation to <label id="dist_name"/> Sample averages. Most of this help file is generic description of CLT plugins. Sample averages from a contending distribution (<label id="dist_name"/> here) are compared to a target Normal distribution. The comparison is made based on either histograms or distribution functions. For brevity, D will denote the contending distribution (<label id="dist_name"/> here).
 		</summary>
 		<usage>
-			Choose the <insert snippet="dist_name"/> parameters, the sample sizes needed for CLT and a choice of function. The function specific options are provided in different tabs.
+			Choose the <label id="dist_name"/> parameters, the sample sizes needed for CLT and a choice of function. The function specific options are provided in different tabs.
 		</usage>
 		<settings>
 			<caption id="tab_plot_distrib_clt"/>
diff --git a/rkward/plugins/distributions/clt/plot_clt_snippets.xml b/rkward/plugins/distributions/clt/plot_clt_snippets.xml
index 1b4305f..79bfb83 100644
--- a/rkward/plugins/distributions/clt/plot_clt_snippets.xml
+++ b/rkward/plugins/distributions/clt/plot_clt_snippets.xml
@@ -6,7 +6,9 @@
 		<set id="plotoptions.allow_type" to="false"/>
 		<set id="plotoptions.allow_grid" to="true"/>
 		<set id="plotoptions.allow_ylim" to="false"/>
-		<set id="plotoptions.default_xlab" to=""Sample Averages""/>
+		<i18n id="sample_avgs_label" label="Sample Averages"/>
+		<connect client="plotoptions.default_xlab" governor="sample_avgs_label.quoted"/>
+		<connect client="plotoptions.default_main" governor="dist_name.quoted"/>
 		
 		<set id="normlinecol.default_color" to="red" />
 		
diff --git a/rkward/plugins/distributions/clt/plot_exponential_clt.xml b/rkward/plugins/distributions/clt/plot_exponential_clt.xml
index e632a6f..fb216b5 100644
--- a/rkward/plugins/distributions/clt/plot_exponential_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_exponential_clt.xml
@@ -13,9 +13,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Exponential"));
-		]]></script>
+		<i18n id="dist_name" label="Exponential" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Exponential to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_f_clt.xml b/rkward/plugins/distributions/clt/plot_f_clt.xml
index 0439392..1a20149 100644
--- a/rkward/plugins/distributions/clt/plot_f_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_f_clt.xml
@@ -15,9 +15,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("F"));
-		]]></script>
+		<i18n id="dist_name" label="F" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: F to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_gamma_clt.xml b/rkward/plugins/distributions/clt/plot_gamma_clt.xml
index 959a5a1..0d7b91c 100644
--- a/rkward/plugins/distributions/clt/plot_gamma_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_gamma_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Gamma"));
-		]]></script>
+		<i18n id="dist_name" label="Gamma" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Gamma to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_geometric_clt.xml b/rkward/plugins/distributions/clt/plot_geometric_clt.xml
index 28320ad..ab54c96 100644
--- a/rkward/plugins/distributions/clt/plot_geometric_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_geometric_clt.xml
@@ -13,9 +13,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Geometric"));
-		]]></script>
+		<i18n id="dist_name" label="Geometric" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Geometric to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml b/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml
index 87fc1e2..b88ec40 100644
--- a/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_hypergeometric_clt.xml
@@ -15,9 +15,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Hypergeometric"));
-		]]></script>
+		<i18n id="dist_name" label="Hypergeometric" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Hypergeometric to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_logistic_clt.xml b/rkward/plugins/distributions/clt/plot_logistic_clt.xml
index c1fd95e..a8fa73a 100644
--- a/rkward/plugins/distributions/clt/plot_logistic_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_logistic_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Logistic"));
-		]]></script>
+		<i18n id="dist_name" label="Logistic" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Logistic to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_lognormal_clt.xml b/rkward/plugins/distributions/clt/plot_lognormal_clt.xml
index d1e90df..1d20b86 100644
--- a/rkward/plugins/distributions/clt/plot_lognormal_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_lognormal_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Lognormal"));
-		]]></script>
+		<i18n id="dist_name" label="Lognormal" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Lognormal to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml b/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml
index f395fdb..ae87e6d 100644
--- a/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_negbinomial_clt.xml
@@ -26,9 +26,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Negative Binomial"));
-		]]></script>
+		<i18n id="dist_name" label="Negative Binomial" i18n_context="Distribution name"/>
 
 		<convert id="useprob" mode="equals" sources="param.string" standard="pprob" />
 		<connect client="prob.enabled" governor="useprob" />
diff --git a/rkward/plugins/distributions/clt/plot_normal_clt.xml b/rkward/plugins/distributions/clt/plot_normal_clt.xml
index 3c25a2c..06f00cc 100644
--- a/rkward/plugins/distributions/clt/plot_normal_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_normal_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Normal"));
-		]]></script>
+		<i18n id="dist_name" label="Normal" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Normal to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_poisson_clt.xml b/rkward/plugins/distributions/clt/plot_poisson_clt.xml
index 9b56c6a..0c6f53a 100644
--- a/rkward/plugins/distributions/clt/plot_poisson_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_poisson_clt.xml
@@ -13,9 +13,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Poisson"));
-		]]></script>
+		<i18n id="dist_name" label="Poisson" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Poisson to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_t_clt.xml b/rkward/plugins/distributions/clt/plot_t_clt.xml
index f2224be..6f450cb 100644
--- a/rkward/plugins/distributions/clt/plot_t_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_t_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("t"));
-		]]></script>
+		<i18n id="dist_name" label="t" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: t to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_uniform_clt.xml b/rkward/plugins/distributions/clt/plot_uniform_clt.xml
index fc4f98f..019c131 100644
--- a/rkward/plugins/distributions/clt/plot_uniform_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_uniform_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Uniform"));
-		]]></script>
+		<i18n id="dist_name" label="Uniform" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Uniform to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_weibull_clt.xml b/rkward/plugins/distributions/clt/plot_weibull_clt.xml
index 1c9ab77..6350a1a 100644
--- a/rkward/plugins/distributions/clt/plot_weibull_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_weibull_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_dopoints" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Weibull"));
-		]]></script>
+		<i18n id="dist_name" label="Weibull" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Weibull to Normal" >
 		<insert snippet="clt_layout"/>
diff --git a/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml b/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml
index a3715f4..b903577 100644
--- a/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml
+++ b/rkward/plugins/distributions/clt/plot_wilcoxon_clt.xml
@@ -14,9 +14,7 @@
 	<logic>
 		<insert snippet="clt_logic"/>
 		<set id="dist_stepfun.default_verticals" to="false" />
-		<script><![CDATA[
-			gui.setValue ("plotoptions.default_main", i18n ("Wilcoxon"));
-		]]></script>
+		<i18n id="dist_name" label="Wilcoxon" i18n_context="Distribution name"/>
 	</logic>
 	<dialog label="Central Limit Theorem: Wilcoxon to Normal" >
 		<insert snippet="clt_layout"/>


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
rkward-cvs mailing list
rkward-cvs at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-cvs


More information about the rkward-tracker mailing list