Asterisk
  1. Asterisk
  2. ASTERISK-7623

[patch] Chinese rendition of day-of-month in ast_say_date_with_format_tw is wrong

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Labels:
      None
    • Mantis ID:
      7827
    • Regression:
      No

      Description

      My contacts in China/Taiwan tell me that the way the day-of-month is done by asterisk in chinese is wrong. The proper way is to say an cardinal number followed by the chinese word for "day".

      The current implementation speaks an ordinal number for the day-of-month, and does so in a way which is grammatically incorrect.

                • ADDITIONAL INFORMATION ******

      The current implementation speaks the day-of-month as an ordinal number in an odd way. For example, 25th is done with the recordings "digits/h-20h", "digits/h-5"; 17th is "digits/h-10h", "digits/h-7" instead of using "digits/h-17"!

      Chinese uses a prefix for ordinal numbers, so a grammatically correct expression would be "h-20", "5". Using "h-5" as the second recording places the prefix in the middle of the number, which is wrong. What "h-20h" should contain is not explained any where, and the only readily available collection of sound files in chinese for asterisk (at iaxtalk.com) does not contain any of the "h-%d" files.

      The attached patch changes the day-of-month code to do (for example) "digits/20", "digits/5", "digits/day" for the 25th, or "digits/10", "digits/7", "digits/day" for the 17th.

        Activity

        Hide
        John Williams added a comment -

        The date rendition in the current trunk has been much improved, thanks to ljmid in issue ASTERISK-9667. I recommend this issue be marked duplicate of that and closed.

        A couple minor nits (which I will volunteer to fix if there is interest):

        1. Still using obsolete "h-1" thru "h-12" files for %m format. %m should be the same as %b IMO

        2. The file containing the units for days is called "ri". It should be called "digits/day" for consistency with the rest of the code.

        Show
        John Williams added a comment - The date rendition in the current trunk has been much improved, thanks to ljmid in issue ASTERISK-9667 . I recommend this issue be marked duplicate of that and closed. A couple minor nits (which I will volunteer to fix if there is interest): 1. Still using obsolete "h-1" thru "h-12" files for %m format. %m should be the same as %b IMO 2. The file containing the units for days is called "ri". It should be called "digits/day" for consistency with the rest of the code.
        Hide
        Tilghman Lesher added a comment -

        Given that that bug is closed, yes, please provide an updated patch, so this doesn't get lost.

        Show
        Tilghman Lesher added a comment - Given that that bug is closed, yes, please provide an updated patch, so this doesn't get lost.
        Hide
        John Williams added a comment -

        I have uploaded say.nits.patch, which fixes the nits I mentioned above.

        Also uploaded digits-new.zip, which is JimKou's sound files slightly reorganized.
        I clipped the best standalone syllable for "day" from one of the h-* files and put it into day.gsm, and the h-* files were removed.

        Show
        John Williams added a comment - I have uploaded say.nits.patch, which fixes the nits I mentioned above. Also uploaded digits-new.zip, which is JimKou's sound files slightly reorganized. I clipped the best standalone syllable for "day" from one of the h-* files and put it into day.gsm, and the h-* files were removed.
        Hide
        Digium Subversion added a comment -

        Repository: asterisk
        Revision: 85686

        U branches/1.4/main/say.c

        ------------------------------------------------------------------------
        r85686 | russell | 2007-10-15 15:00:44 -0500 (Mon, 15 Oct 2007) | 7 lines

        Add a small fix for the tw version of saying dates.

        (closes issue ASTERISK-7623)
        Reported by: sharkey
        Patches:
        say.nits.patch uploaded by sharkey (license 172)

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

        Show
        Digium Subversion added a comment - Repository: asterisk Revision: 85686 U branches/1.4/main/say.c ------------------------------------------------------------------------ r85686 | russell | 2007-10-15 15:00:44 -0500 (Mon, 15 Oct 2007) | 7 lines Add a small fix for the tw version of saying dates. (closes issue ASTERISK-7623 ) Reported by: sharkey Patches: say.nits.patch uploaded by sharkey (license 172) ------------------------------------------------------------------------
        Hide
        Digium Subversion added a comment -

        Repository: asterisk
        Revision: 85718

        _U trunk/
        U trunk/main/say.c

        ------------------------------------------------------------------------
        r85718 | russell | 2007-10-15 15:40:20 -0500 (Mon, 15 Oct 2007) | 15 lines

        Merged revisions 85686 via svnmerge from
        https://origsvn.digium.com/svn/asterisk/branches/1.4

        ........
        r85686 | russell | 2007-10-15 15:21:27 -0500 (Mon, 15 Oct 2007) | 7 lines

        Add a small fix for the tw version of saying dates.

        (closes issue ASTERISK-7623)
        Reported by: sharkey
        Patches:
        say.nits.patch uploaded by sharkey (license 172)

        ........

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

        Show
        Digium Subversion added a comment - Repository: asterisk Revision: 85718 _U trunk/ U trunk/main/say.c ------------------------------------------------------------------------ r85718 | russell | 2007-10-15 15:40:20 -0500 (Mon, 15 Oct 2007) | 15 lines Merged revisions 85686 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85686 | russell | 2007-10-15 15:21:27 -0500 (Mon, 15 Oct 2007) | 7 lines Add a small fix for the tw version of saying dates. (closes issue ASTERISK-7623 ) Reported by: sharkey Patches: say.nits.patch uploaded by sharkey (license 172) ........ ------------------------------------------------------------------------

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development