[gnumeric] Docs: don't ask for translation of examples unless they contain non-English.



commit 2b374d18c3e45f3fc64a62719a8cfcc37fb62404
Author: Morten Welinder <terra gnome org>
Date:   Mon Jun 29 09:38:37 2009 -0400

    Docs: don't ask for translation of examples unless they contain non-English.

 plugins/fn-erlang/functions.c |    8 ++++----
 plugins/numtheory/numtheory.c |   25 ++++++++++++++-----------
 src/func-builtin.c            |    6 +++---
 3 files changed, 21 insertions(+), 18 deletions(-)
---
diff --git a/plugins/fn-erlang/functions.c b/plugins/fn-erlang/functions.c
index b9e350b..e105ab0 100644
--- a/plugins/fn-erlang/functions.c
+++ b/plugins/fn-erlang/functions.c
@@ -108,7 +108,7 @@ static GnmFuncHelp const help_probblock[] = {
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("PROBBLOCK returns probability of blocking when @{traffic}"
 					" calls load into @{ccicuits} circuits.")},
 	{ GNM_FUNC_HELP_NOTE, F_("@{traffic} cannot exceed @{circuits}.") },
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=PROBBLOCK(24,30)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=PROBBLOCK(24,30)" },
 	{ GNM_FUNC_HELP_SEEALSO, "OFFTRAF,DIMCIRC,OFFCAP"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -132,7 +132,7 @@ static GnmFuncHelp const help_offtraf[] = {
 	{ GNM_FUNC_HELP_ARG, F_("circuits:number of circuits")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("OFFTRAF returns the predicted number of offered calls given @{traffic} carried calls (taken from measurements) on @{circuits} circuits.")},
 	{ GNM_FUNC_HELP_NOTE, F_("@{traffic} cannot exceed @{circuits}.") },
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=OFFTRAF(24,30)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=OFFTRAF(24,30)" },
 	{ GNM_FUNC_HELP_SEEALSO, "PROBBLOCK,DIMCIRC,OFFCAP"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -191,7 +191,7 @@ static GnmFuncHelp const help_dimcirc[] = {
 	{ GNM_FUNC_HELP_ARG, F_("traffic:number of calls")},
 	{ GNM_FUNC_HELP_ARG, F_("gos:grade of service")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("DIMCIRC returns the number of circuits required given @{traffic} calls with grade of service @{gos}.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=DIMCIRC(24,0.01)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=DIMCIRC(24,0.01)" },
 	{ GNM_FUNC_HELP_SEEALSO, "OFFCAP,OFFTRAF,PROBBLOCK"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -229,7 +229,7 @@ static GnmFuncHelp const help_offcap[] = {
 	{ GNM_FUNC_HELP_ARG, F_("circuits:number of circuits")},
 	{ GNM_FUNC_HELP_ARG, F_("gos:grade of service")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("OFFCAP returns the traffic capacity given @{circuits} circuits with grade of service @{gos}.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=OFFCAP(30,0.01)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=OFFCAP(30,0.01)" },
 	{ GNM_FUNC_HELP_SEEALSO, "DIMCIRC,OFFTRAF,PROBBLOCK"},
 	{ GNM_FUNC_HELP_END }
 };
diff --git a/plugins/numtheory/numtheory.c b/plugins/numtheory/numtheory.c
index 6de13ca..c554393 100644
--- a/plugins/numtheory/numtheory.c
+++ b/plugins/numtheory/numtheory.c
@@ -218,7 +218,7 @@ static GnmFuncHelp const help_phi[] = {
  	{ GNM_FUNC_HELP_NAME, F_("NT_PHI:Euler's totient function")},
 	{ GNM_FUNC_HELP_ARG, F_("n:positive integer")},
 	{ GNM_FUNC_HELP_NOTE, F_("Euler's totient function gives the number of integers less than or equal to @{n} that are relatively prime (coprime) to @{n}.") },
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=NT_PHI(9)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=NT_PHI(9)" },
 	{ GNM_FUNC_HELP_SEEALSO, "NT_D,ITHPRIME,NT_SIGMA"},
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Euler's_totient_function") },
 	{ GNM_FUNC_HELP_END }
@@ -257,9 +257,10 @@ static GnmFuncHelp const help_nt_mu[] = {
 	     " an odd  number of different prime factors, NT_MU returns "
 	     "-1, and if @{n} has an even number of different prime factors,"
 	     " it returns 1. If @{n} = 1, NT_MU returns 1.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=NT_MU(45)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=NT_MU(45)" },
 	{ GNM_FUNC_HELP_SEEALSO, "ITHPRIME,NT_PHI,NT_SIGMA,NT_D"},
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Möbius_function") },
+	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:MoebiusFunction.html") },
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -324,7 +325,7 @@ static GnmFuncHelp const help_sigma[] = {
 	{ GNM_FUNC_HELP_NAME, F_("NT_SIGMA:sigma function")},
 	{ GNM_FUNC_HELP_ARG, F_("n:positive integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("NT_SIGMA calculates the sum of the divisors of @n.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=NT_SIGMA(4)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=NT_SIGMA(4)" },
 	{ GNM_FUNC_HELP_SEEALSO, "NT_D,ITHPRIME,NT_PHI"},
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Divisor_function") },
 	{ GNM_FUNC_HELP_END }
@@ -358,7 +359,7 @@ static GnmFuncHelp const help_ithprime[] = {
  	{ GNM_FUNC_HELP_NAME, F_("ITHPRIME:@{i}th prime")},
 	{ GNM_FUNC_HELP_ARG, F_("i:positive integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("ITHPRIME finds the @{i}th prime.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=ITHPRIME(7)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=ITHPRIME(7)" },
 	{ GNM_FUNC_HELP_SEEALSO, "NT_D,NT_SIGMA"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -384,8 +385,9 @@ static GnmFuncHelp const help_isprime[] = {
 	{ GNM_FUNC_HELP_NAME, F_("ISPRIME:whether @{n} is prime")},
 	{ GNM_FUNC_HELP_ARG, F_("n:positive integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("ISPRIME returns TRUE if @{n} is prime and FALSE otherwise.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=isprime(57)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=ISPRIME(57)" },
 	{ GNM_FUNC_HELP_SEEALSO, "NT_D, NT_SIGMA"},
+	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:PrimeNumber.html") },
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -470,8 +472,9 @@ static GnmFuncHelp const help_nt_pi[] = {
 	{ GNM_FUNC_HELP_NAME, F_("NT_PI:number of primes upto @{n}")},
 	{ GNM_FUNC_HELP_ARG, F_("n:positive integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("NT_PI returns the number of primes less than or equal to @{n}.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=NT_PI{11}") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=NT_PI{11}" },
 	{ GNM_FUNC_HELP_SEEALSO, "ITHPRIME,NT_PHI,NT_D,NT_SIGMA"},
+	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:PrimeCountingFunction.html") },
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -501,7 +504,7 @@ static GnmFuncHelp const help_bitor[] = {
 	{ GNM_FUNC_HELP_ARG, F_("a:non-negative integer")},
 	{ GNM_FUNC_HELP_ARG, F_("b:non-negative integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("BITOR returns the bitwise or of the binary representations of its arguments.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=BITOR(9,5)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=BITOR(9,5)" },
 	{ GNM_FUNC_HELP_SEEALSO, "BITXOR,BITAND"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -525,7 +528,7 @@ static GnmFuncHelp const help_bitxor[] = {
 	{ GNM_FUNC_HELP_ARG, F_("a:non-negative integer")},
 	{ GNM_FUNC_HELP_ARG, F_("b:non-negative integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("BITXOR returns the bitwise exclusive or of the binary representations of its arguments.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=BITXOR(9,5)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=BITXOR(9,5)" },
 	{ GNM_FUNC_HELP_SEEALSO, "BITOR,BITAND"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -549,7 +552,7 @@ static GnmFuncHelp const help_bitand[] = {
 	{ GNM_FUNC_HELP_ARG, F_("a:non-negative integer")},
 	{ GNM_FUNC_HELP_ARG, F_("b:non-negative integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("BITAND returns the bitwise and of the binary representations of its arguments.")},
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=BITAND(9,5)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=BITAND(9,5)" },
 	{ GNM_FUNC_HELP_SEEALSO, "BITOR,BITXOR"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -575,7 +578,7 @@ static GnmFuncHelp const help_bitlshift[] = {
 	{ GNM_FUNC_HELP_ARG, F_("n:integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("BITLSHIFT returns the binary representations of @{a} shifted @{n} positions to the left.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{n} is negative, BITLSHIFT shifts the bits to the right by ABS(@{n}) positions.") },
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=BITLSHIFT(9,5)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=BITLSHIFT(9,5)" },
 	{ GNM_FUNC_HELP_SEEALSO, "BITRSHIFT"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -605,7 +608,7 @@ static GnmFuncHelp const help_bitrshift[] = {
 	{ GNM_FUNC_HELP_ARG, F_("n:integer")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("BITRSHIFT returns the binary representations of @{a} shifted @{n} positions to the right.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{n} is negative, BITRSHIFT shifts the bits to the left by ABS(@{n}) positions.") },
-	{ GNM_FUNC_HELP_EXAMPLES, F_("=BITRSHIFT(137,5)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=BITRSHIFT(137,5)" },
 	{ GNM_FUNC_HELP_SEEALSO, "BITLSHIFT"},
 	{ GNM_FUNC_HELP_END }
 };
diff --git a/src/func-builtin.c b/src/func-builtin.c
index 7563f21..1c9d096 100644
--- a/src/func-builtin.c
+++ b/src/func-builtin.c
@@ -43,7 +43,7 @@ static GnmFuncHelp const help_sum[] = {
 	{ GNM_FUNC_HELP_DESCRIPTION, N_("SUM computes the sum of all the values and cells referenced in the argument list.")},
 	{ GNM_FUNC_HELP_EXCEL, N_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_ODF, N_("This function is OpenFormula compatible.") },
-	{ GNM_FUNC_HELP_EXAMPLES, N_("=SUM(11,15,17,21,43)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=SUM(11,15,17,21,43)" },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE,COUNT"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -68,7 +68,7 @@ static GnmFuncHelp const help_product[] = {
 	{ GNM_FUNC_HELP_NOTE, N_("If all cells are empty, the result will be 0.") },
 	{ GNM_FUNC_HELP_EXCEL, N_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_ODF, N_("This function is OpenFormula compatible.") },
-	{ GNM_FUNC_HELP_EXAMPLES, N_("=PRODUCT(2,5,9)") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=PRODUCT(2,5,9)" },
 	{ GNM_FUNC_HELP_SEEALSO, "SUM,COUNT,G_PRODUCT"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -99,7 +99,7 @@ gnumeric_product (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
 static GnmFuncHelp const help_gnumeric_version[] = {
  	{ GNM_FUNC_HELP_NAME, N_("GNUMERIC_VERSION:the current version of GNumeric")},
 	{ GNM_FUNC_HELP_DESCRIPTION, N_("GNUMERIC_VERSION returns the version of gnumeric as a string.")},
-	{ GNM_FUNC_HELP_EXAMPLES, N_("=GNUMERIC_VERSION()") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=GNUMERIC_VERSION()" },
 	{ GNM_FUNC_HELP_SEEALSO, ""},
 	{ GNM_FUNC_HELP_END }
 };



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