[Home]

Summary:ASTERISK-01469: [design] Internationalization of app_voicemail
Reporter:Olle Johansson (oej)Labels:
Date Opened:2004-04-26 16:37:34Date Closed:2009-08-17 18:44:38
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) voicemail_intl3.txt
Description:The voicemail application needs better handling of languages, so that the syntax of the messages can change depending on language setting in call or in channel peer/user.

This bug report is opened to get input on what is needed to change, to discuss a short term fix and a long term fix and to collect the patches that has been contributed in other reports and unify them into one patch

----------------------------------------------------
To monitor the progress of this bug report, press
the "Monitor bug" button below. We need many people
being part of this process.
-----------------------------------------------------

****** ADDITIONAL INFORMATION ******

*Related work:
For i18n patches to saynumber in say.c, see bug ASTERISK-1414

* Patches in bug 301
as well as in portuguese patch ASTERISK-297
Comments:By: Brian West (bkw918) 2004-04-27 15:32:34

The whole lang part of asterisk needs some work... We have talked about this in -dev I think....  not just voicemail but anything that plays a file or says a phrase.

bkw

By: Olle Johansson (oej) 2004-04-27 15:53:03

Yes bkw_, hence dividing the discussion into short term fixes and a long term architecture. There are a couple of patches in the bug tracker we need to look at, like we've done with the saynumber app.

By: flavour (flavour) 2004-04-29 10:07:34

Added language support to vm_execmain() & hence vm_intro() & vm_instructions()
Patched vm_intro & vm_instructions() for French
English: 'old messages'
French: 'messages entendu'
'diff -u' attached: voicemail_fr.diff
Disclaimer will be on it's way

edited on: 04-29-04 09:02

By: philipp2 (philipp2) 2004-04-30 17:11:31

I ain't a c coder, thus I can only add a rule here for German and hope that'll it'll be of use for someone doing the typing :-)

- "1st", "2nd" relects the gender: All months are masculine, but message ("Nachricht") is feminine, so we'll need to say "erste Nachricht" but "ersteR Mai"

- in general dates are spoken as "ersteR Mai, zweiteR Mai, dritteR Mai" meaning "1st May, 2nd May, 3rd May" (compared to "May 1st" as for English). To make it more complicated if you want to say "received on Mai 1st" you'll need to tune things to "empfangen am ersteN Mai". So we need to watch out for both gender and case (?; dt.: "Fall").

By: dant (dant) 2004-05-01 22:34:21

In spoken British English the month also comes last, e.g. "received on the 1st of May", abbreviated dates are also written DD/MM/YY, 24hr clock is used more than it used to be and is generally always used anywhere computers are involved.

By: flavour (flavour) 2004-05-02 06:18:10

Updated patch attached: voicemail_intl.txt.
This has support for French & some of the Portuguese.
I have re-written to follow a similar format to the Internationalization of say.c - this seems easier to read & maintain.
I have had to create one new function so far - breaking it out of vm_execmain().
I will have to do 2 more to finish merging the Portuguese patch, but am a little slow as I'm still very new to C.
Testing of this patch would be very welcome, as would Portuguese soundfiles.
Once I have finished merging the Portuguese, I will start on German & Dutch.

edited on: 05-02-04 05:19

By: flavour (flavour) 2004-05-02 07:43:33

Uploaded newer version which completes Portuguese & also adds Dutch support.
In the end I didn't break out the 2 remaining functions as they only have a small amount to if {} else {}.
Please can people test this? Especially the Portuguese...

By: Mark Spencer (markster) 2004-05-02 12:32:44

Surely this can be reduced from having three separate functions right?

For example, could you use something like:
<pre>
int announce_mailbox(struct ast_channel *chan, char *folder, int count)
{

if (!strcasecmp(chan->language, "fr") || ...) {
  /* Play count, the word message, then the adjective */
} else {
  /* Play the count, the adjective, and the word message */
}

</pre>

then both instructions and intro can call this function, and updating the intro and instructions doesn't require redoing the work for every language.

By: flavour (flavour) 2004-05-02 15:08:11

vm_instructions could indeed be easily condensed down to 2 options.
I have done this in the updated Patch.

However vm_intro is more complex than this.
Dutch & Portuguese also have (in common with each other) a difference for New/Old depending on whether Singular/Plural message(s).
Portuguese also has gender, which Dutch doesn't.
So the 4 examples we have so far are unique else if {} options.
Basically all vm_intro is, is what you've written above, so there's nothing left inside it if we take that out.

By: flavour (flavour) 2004-05-02 15:53:01

Updated patch as per newly-released CODING-GUIDELINES

By: twisted (twisted) 2004-05-04 21:58:50

Please clarify which of these patches is necessary, and which can be deleted...  It's quite a mess in here..

By: flavour (flavour) 2004-05-05 04:59:57

Very last patch is the only one still needed - rest can go

By: philipp2 (philipp2) 2004-05-09 14:29:18

For your info: I finished recording the German sound files, see Wiki ("asterisk sound files international") for the link. The different versions of "1.gsm" are also available in those files as "de-erstX.gsm" (that's just a working filename until something smarter specifying gender & case has been standardized).

By: flavour (flavour) 2004-05-11 12:18:30

Updated patch - added some support for German syntax & applies cleanly to current version of CVS.

By: flavour (flavour) 2004-05-12 17:35:42

Updated again to apply cleanly to current CVS
(old version deleted)

By: Olle Johansson (oej) 2004-05-13 17:14:31

Updated a patch for flavour to check...
Added a language config option, needs to be checked.
This changes language of voicemail prompts for a voicemail user. For a person leaving voicemail, the chan->language is still used.

This setting will also be used when we have voicemail mail message templates in various langauges.

By: flavour (flavour) 2004-05-14 03:15:40

New combined version of patch which includes Spanish support courtesy of Nicolas Gudino (whose disclaimer is in). He's also fixed a bug with sizeof() in vm_browse_messages.
Note that oej also made several ast_strlen_zero optimisations.

By: Matteo Brancaleoni (mbrancaleoni) 2004-05-14 05:20:51

Hi.

as I have added .it support for say.c, I'm going to add
support also for voicemail. (I've already something working).
I'm just a bit busy, but give me some days (no more than a week)
and I'll upload it.

of course if someone can do that before, is welcome :) !

By: flavour (flavour) 2004-05-20 05:51:55

I have updated patch to apply cleanly to current CVS
I am told that more Spanish contributions are on the way.
Any progress with the Italian?

By: flavour (flavour) 2004-05-20 17:21:04

More Spanish contributions merged (courtesy of Nicolas Gudino - many thanks!)

By: flavour (flavour) 2004-05-23 12:21:23

Patch updated to apply cleanly to current CVS

By: Olle Johansson (oej) 2004-05-27 05:13:42

Do we all agree with Flavour that this patch is ready for CVS? Please add your comments. We want to know if this is tested.

By: philipp2 (philipp2) 2004-05-27 06:23:02

For the German part I can confirm that it works nicely - apart from that I cannot really comment. I guess it's time to move on towards fixing dates ... :-)

By: nicolasg (nicolasg) 2004-05-27 08:47:44

It works fine for spanish, including dates. Maybe we should wait for the italian contributions? I think that italian syntax is very similar (if not the same) to spanish.. if this is the case it should be easy to add italian support.

By: flavour (flavour) 2004-05-27 09:07:20

I'd vote to put this in now as-is.
Then Italian can easily be added to this framework as a separate patch.

Philipp2: yes I know we need to work on German dates in say.c - a different patch to this one, though ;)

By: Olle Johansson (oej) 2004-05-27 12:01:54

Ready to go into cvs

By: maciejka (maciejka) 2004-05-28 04:57:04

There is a disscusion of more general internalization approach in bugnote from 05-27-04 15:02 added to bug 1731. See: http://bugs.digium.com/bug_view_page.php?bug_id=0001731.

You might find it usefull.

By: flavour (flavour) 2004-05-28 14:56:39

Updated for current CVS HEAD
(A couple of ast_strlen_zero optimisations needed updating)

By: flavour (flavour) 2004-06-01 17:35:48

Updated for current CVS HEAD

By: flavour (flavour) 2004-06-09 07:53:14

Added info on an extra file needed for Spanish patch.
Also updated to current CVS.

By: Mark Spencer (markster) 2004-06-24 09:55:49

It this patch ready for merger?  Do I need to merge anything else with it?

By: flavour (flavour) 2004-06-25 04:48:14

Updated to current CVS

I believe this is ready for merging - have received only psoitive feedback.
Nothing else needs merging with it.

By: Mark Spencer (markster) 2004-06-25 18:32:51

Added to CVS, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:00:40.000-0600

Repository: asterisk
Revision: 3309

U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r3309 | markster | 2008-01-15 15:00:40 -0600 (Tue, 15 Jan 2008) | 2 lines

Merge voicemail internationalization (bug ASTERISK-1469)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3309