[Asterisk-code-review] say: Remove unused "plural" option from main/say (asterisk[13])

Walter Doekes asteriskteam at digium.com
Tue Feb 25 10:09:25 CST 2020


Walter Doekes has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/13845 )


Change subject: say: Remove unused "plural" option from main/say
......................................................................

say: Remove unused "plural" option from main/say

There are exceptions for plural objects, but they are detected using the
supplied NUMBER, not using an extra option.

Change-Id: I95d1d1b2796b1aba92048a2dbae8a3856ed8a113
---
M include/asterisk/say.h
M main/say.c
2 files changed, 8 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/45/13845/1

diff --git a/include/asterisk/say.h b/include/asterisk/say.h
index 93c525d..a4aa90c 100644
--- a/include/asterisk/say.h
+++ b/include/asterisk/say.h
@@ -72,7 +72,7 @@
  * \param num number to say on the channel
  * \param ints which dtmf to interrupt on
  * \param lang language to speak the number
- * \param options set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter, 'p' for plural
+ * \param options set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter
  * \details
  * Vocally says a number on a given channel
  * \retval 0 on success
@@ -91,7 +91,7 @@
  * \param num number to say on the channel
  * \param ints which dtmf to interrupt on
  * \param lang language to speak the enumeration
- * \param options set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter, 'p' for plural
+ * \param options set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter
  * \details
  * Vocally says an enumeration on a given channel (first, sencond, third, forth, thirtyfirst, hundredth, ....)
  * Especially useful for dates and messages. Says 'last' if num equals to INT_MAX
diff --git a/main/say.c b/main/say.c
index c3f546c..eae1769 100644
--- a/main/say.c
+++ b/main/say.c
@@ -330,10 +330,12 @@
       \arg \b hu    - Hungarian
 
  \par Gender:
- For Some languages the numbers differ for gender and plural.
+ For some languages the numbers differ for gender of the countable object.
+ Commonly for "one", like "un"/"une" in French. Note that the interface
+ is somewhat peculiar, as differing languages can have conflicting
+ genders.
  \arg Use the option argument 'f' for female, 'm' for male and 'n' for neuter in languages like Portuguese, French, Spanish and German.
  \arg use the option argument 'c' is for commune and 'n' for neuter gender in nordic languages like Danish, Swedish and Norwegian.
- use the option argument 'p' for plural enumerations like in German
 
  Date/Time functions currently have less languages supported than saynumber().
 
@@ -2918,7 +2920,7 @@
 /*! \brief  ast_say_enumeration_full_da: Danish syntax */
 static int ast_say_enumeration_full_da(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
 {
-	/* options can be: '' or 'm' male gender; 'f' female gender; 'n' neuter gender; 'p' plural */
+	/* options can be: '' or 'm' male gender; 'f' female gender; 'n' neuter gender */
 	int res = 0, t = 0;
 	char fn[256] = "", fna[256] = "";
 	char *gender;
@@ -3081,7 +3083,7 @@
 /*! \brief  ast_say_enumeration_full_de: German syntax */
 static int ast_say_enumeration_full_de(struct ast_channel *chan, int num, const char *ints, const char *language, const char *options, int audiofd, int ctrlfd)
 {
-	/* options can be: '' or 'm' male gender; 'f' female gender; 'n' neuter gender; 'p' plural */
+	/* options can be: '' or 'm' male gender; 'f' female gender; 'n' neuter gender */
 	int res = 0, t = 0;
 	char fn[256] = "", fna[256] = "";
 	char *gender;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13845
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I95d1d1b2796b1aba92048a2dbae8a3856ed8a113
Gerrit-Change-Number: 13845
Gerrit-PatchSet: 1
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200225/caf11a0d/attachment-0001.html>


More information about the asterisk-code-review mailing list