[gnumeric] Docs: ignore initial whitespace in function argument documentation.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Docs: ignore initial whitespace in function argument documentation.
- Date: Mon, 30 Apr 2012 18:07:42 +0000 (UTC)
commit 5f4d7c3353d1bc0798693b69797cdd1af79aa89c
Author: Morten Welinder <terra gnome org>
Date: Mon Apr 30 14:05:58 2012 -0400
Docs: ignore initial whitespace in function argument documentation.
We expect "arg:desc", but translators sometimes assume that the
two parts are shown together and translate to "arg: desc". With this
change, we don't care.
ChangeLog | 5 +++++
NEWS | 3 +++
src/func.c | 8 +++++++-
3 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 60d9fa5..a23de75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-30 Morten Welinder <terra gnome org>
+
+ * src/func.c (gnm_func_get_arg_description): Ignore initial
+ whitespace is description. (See bug 675000, comment 10.)
+
2012-04-21 Morten Welinder <terra gnome org>
* configure.in: Post-release bump.
diff --git a/NEWS b/NEWS
index 943e7cf..1d533ee 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ Andreas:
* Improve import of page headers from ODF.
* Export/Import validation error message to/from ODF.
+Morten:
+ * Minor doc improvement for non-C locales. [Part of #675000]
+
--------------------------------------------------------------------------
Gnumeric 1.11.3
diff --git a/src/func.c b/src/func.c
index 98ebff8..ddc591b 100644
--- a/src/func.c
+++ b/src/func.c
@@ -1448,7 +1448,13 @@ gnm_func_get_arg_description (GnmFunc const *fn_def, guint arg_idx)
continue;
desc = strchr (F2 (fn_def, fn_def->help[i].text), ':');
- return desc ? (desc + 1) : "";
+ if (!desc)
+ return "";
+
+ desc++;
+ while (g_unichar_isspace (g_utf8_get_char (desc)))
+ desc = g_utf8_next_char (desc);
+ return desc;
}
return "";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]