[Home]

Summary:ASTERISK-25760: SayUnixTime aborts when it tries to give the time in French
Reporter:Nicolas Riendeau (Marbled)Labels:
Date Opened:2016-02-09 12:02:41.000-0600Date Closed:2016-02-24 18:05:01.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Applications/app_sayunixtime
Versions:13.7.2 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-25810 say.c calls for sounds in the subdir "digits" that don't exist (in Core). SayUnixTime or other Say... apps will fail out when they call these sounds.
Environment:Attachments:
Description:Hi!

I have a problem getting SayUnixTime to say the time in French.

Each time it wants to say the number of seconds it aborts with a missing file.

The code in say.c (more specifically I believe the one in ast_say_date_with_format_fr) tries to get the sound file from "digits/second" but both "second" and "seconds" are not in that directory but the one just above that.

Removing "digits/" would not be enough though because when "second" was translated into French they did not translate it into the unit of time but actually in "2nd" (ie as in first, second, third, etc...) and unfortunately in French this is not pronounced the same as the unit of time ("deuxième" vs "seconde").

Please note that It is also possible to say  "second" but this is not how it was translated and it is not pronounced the same way as the unit of time either ("seconde").

Fortunately in French both "second" ("seconde") and "seconds" ("secondes") are pronounced exactly the same (the "s" is not pronounced) so the "seconds" file could be used...

I have, as far as I know, the latest (and greatest! (-; ) sound files for French...

Thank you and have a nice day!

Nicolas
Comments:By: Asterisk Team (asteriskteam) 2016-02-09 12:02:43.593-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2016-02-12 09:44:18.425-0600

I looked into this as far as the sound files are concerned. This doesn't appear related to any change or issue with the sound files.

Observations:

* I grabbed the latest English sound files (v1.5) and some going way way back (v1.4.10). In both cases the "seconds" and "minutes" files have been historically and still are stored in the root of the Core directory.
* I did the same for the French sounds and they match the English sounds.
* In the core French and English sounds a "second" file does not exist (only a "seconds" file).
* It appears that both the second and minute sounds are included in the Extra sounds sets and not the Core.
* say.c calls for digits/second, digits/seconds, digits/minute and digits/minutes. Which is funny since none of those are in that directory in Core sounds or have ever been and the second and minute files only exist in Extra sounds (for some sets)

In the future we should probably get "second" and "minute" sounds in Core for all the Core sounds. I wonder if any other parts of Asterisk try to use them other than SayUnixTime?

I've got to step away but you might take a look to see. Otherwise I'll look into it further when I get a chance.

By: Nicolas Riendeau (Marbled) 2016-02-13 12:50:54.831-0600

Hi!

I hadn't thought of checking which package each sound file came from (I had installed everything) and I confirm what you saw about some of those sounds being in "core" for English and in "extra" for French.

As for "second" it looks like it was properly translated. Apparently it's the "2nd" (ie as in first, second, third, etc...) meaning it is supposed to be used for and not the unit of time because it comes in "extra" which also contains sounds for "first", "third", etc...

As far as French is concerned, "second" cannot be used for a unit of time but "seconds" can definitely be used in its place as the "s" at the end is silent.

You are right about the problem being present for "minute(s)" as well, I had forgotten about it (I had researched this problem months ago but didn't have time to pursue it back then) and was only focusing on one use case.

I don't know if it would be possible to do that, my guess is it might not be for legacy reasons, but I would be tempted to suggest to either do:

1) two "second" file, one named "second-order" and "second-time" for the two possible ways this file could be used.

In the case of French the existing "second" file would be renamed "second-order" and the "seconds" file would be copied to "second-time".

2) Keep the existing names but put them in different folders. The "second" file for the unit of time could be placed in a folder named "time" for example (and o'clock and other similar files moved there) and the "second" meaning "2nd" could be moved to the existing "digits" folder.

Can this be done?

(Would symbolic links between the old and new name/directory work?)

As for your question, it looks to me like these files are only called from "say.c", is say.c used for anything else beside SayUnixTime?

By the way it looks like all these languages look for these files in the digits folder: Danish, German, Portuguese, Taiwanese/Chinese and Hungarian. Who provides the files for these languages, who would have to be contacted if whatever fix you apply for French is applied to these other languages?

(The file for those languages are not downloadable at the same place as the other ones...)

I could have submitted a patch (still could and I did fill in the required document) but I am not sure what is the acceptable/preferable solution to fix this...

Could we maybe create another Jira (which would refer to this one) to address the location issue of those files but for now modify the source code so it uses the "seconds" file instead of "second" and look for the other files in the root folder and not the "digits" folder?

Thank you very much for your help!

Nicolas

By: Rusty Newton (rnewton) 2016-02-24 18:04:08.328-0600

I created ASTERISK-25810 for clarity. We'll address the issue there when resources are available to do so.

We shouldn't make any short-term changes to Asterisk since we've only had this single report over the past decade and it appears to have been this way forever. We'll make the appropriate changes when we figure it out on ASTERISK-25810.

If we add additional files we need to contact the sounds contributor for each language. We currently do not have contributors for the languages you mentioned, other than French.

I'm going to close this out and assign you as the reporter on ASTERISK-25810 which I've opened up.

Thanks,