[Asterisk-code-review] app_queue.c: Support for Nordic syntax in announcements (asterisk[19])

Joshua Colp asteriskteam at digium.com
Wed Jan 5 12:34:28 CST 2022


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/17825 )

Change subject: app_queue.c: Support for Nordic syntax in announcements
......................................................................

app_queue.c: Support for Nordic syntax in announcements

adding support for playing the correct en/et for nordic languages
by adding 'n' for neuter gender in the relevant ast_say_number

ASTERISK-29827

Change-Id: I03ebc827d2f0dc95132ab2f42799893c70edc5b1
---
M apps/app_queue.c
A doc/CHANGES-staging/app_queue_nordic_language.txt
2 files changed, 8 insertions(+), 5 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  George Joseph: Looks good to me, approved



diff --git a/apps/app_queue.c b/apps/app_queue.c
index 8b67ffb..95eb05b 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4178,7 +4178,7 @@
 			res = (
 				play_file(qe->chan, qe->parent->sound_thereare) ||
 				ast_say_number(qe->chan, qe->pos, AST_DIGIT_ANY,
-						ast_channel_language(qe->chan), NULL) || /* Needs gender */
+						ast_channel_language(qe->chan), "n") || /* Needs gender */
 				play_file(qe->chan, qe->parent->sound_calls));
 		}
 		if (res) {
@@ -4209,7 +4209,7 @@
 		}
 
 		if (avgholdmins >= 1) {
-			res = ast_say_number(qe->chan, avgholdmins, AST_DIGIT_ANY, ast_channel_language(qe->chan), NULL);
+			res = ast_say_number(qe->chan, avgholdmins, AST_DIGIT_ANY, ast_channel_language(qe->chan), "n");
 			if (res) {
 				goto playout;
 			}
@@ -4227,7 +4227,7 @@
 			}
 		}
 		if (avgholdsecs >= 1) {
-			res = ast_say_number(qe->chan, avgholdsecs, AST_DIGIT_ANY, ast_channel_language(qe->chan), NULL);
+			res = ast_say_number(qe->chan, avgholdsecs, AST_DIGIT_ANY, ast_channel_language(qe->chan), "n");
 			if (res) {
 				goto playout;
 			}
@@ -7105,13 +7105,13 @@
 						holdtime = labs((now - qe->start) / 60);
 						holdtimesecs = labs((now - qe->start) % 60);
 						if (holdtime > 0) {
-							ast_say_number(peer, holdtime, AST_DIGIT_ANY, ast_channel_language(peer), NULL);
+							ast_say_number(peer, holdtime, AST_DIGIT_ANY, ast_channel_language(peer), "n");
 							if (play_file(peer, qe->parent->sound_minutes) < 0) {
 								ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", qe->parent->sound_minutes, ast_channel_name(peer));
 							}
 						}
 						if (holdtimesecs > 1) {
-							ast_say_number(peer, holdtimesecs, AST_DIGIT_ANY, ast_channel_language(peer), NULL);
+							ast_say_number(peer, holdtimesecs, AST_DIGIT_ANY, ast_channel_language(peer), "n");
 							if (play_file(peer, qe->parent->sound_seconds) < 0) {
 								ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", qe->parent->sound_seconds, ast_channel_name(peer));
 							}
diff --git a/doc/CHANGES-staging/app_queue_nordic_language.txt b/doc/CHANGES-staging/app_queue_nordic_language.txt
new file mode 100644
index 0000000..72efd78
--- /dev/null
+++ b/doc/CHANGES-staging/app_queue_nordic_language.txt
@@ -0,0 +1,3 @@
+Subject: app_queues
+
+adding support for playing the correct en/et for nordic languages

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

Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: I03ebc827d2f0dc95132ab2f42799893c70edc5b1
Gerrit-Change-Number: 17825
Gerrit-PatchSet: 3
Gerrit-Owner: Mark Petersen <bugs.digium.com at zombie.dk>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220105/b4ae3e18/attachment.html>


More information about the asterisk-code-review mailing list