[Asterisk-code-review] app_queue.c: Support for Nordic syntax in announcements (asterisk[18])
Mark Petersen
asteriskteam at digium.com
Wed Jan 5 07:00:00 CST 2022
Mark Petersen has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/17824 )
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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/24/17824/1
diff --git a/apps/app_queue.c b/apps/app_queue.c
index d03d9f0..2b64123 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4104,7 +4104,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) {
@@ -4135,7 +4135,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;
}
@@ -4153,7 +4153,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;
}
@@ -7031,13 +7031,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/+/17824
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I03ebc827d2f0dc95132ab2f42799893c70edc5b1
Gerrit-Change-Number: 17824
Gerrit-PatchSet: 1
Gerrit-Owner: Mark Petersen <bugs.digium.com at zombie.dk>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220105/febccd4e/attachment-0001.html>
More information about the asterisk-code-review
mailing list