keiffster / program-y

Python 3.x based AIML 2.0 Chatbot interpreter, framework, related programs and knowledge files
https://keiffster.github.io/program-y/
Other
348 stars 138 forks source link

locale="fr_FR" for date format #200

Closed ohoachuck closed 5 years ago

ohoachuck commented 5 years ago

I'm trying to set locale for displaying date and time in French format. I couldn't find much info on the doc nor on the web but by setting "locale" key in date tag. I'm not really sure if this is suppose to work ? So I'm trying it like that:

<category>
        <pattern>TESTDATE</pattern>
        <template>Nous sommes le
            <sentence><date locale="fr_FR" format="%d %B %Y" jformat="dd MMMMMMMMM yyyy"/></sentence>
        </template>
</category>

Expected Behavior

I would have expected to say : "Nous somme le 17 Avril 2019"

Current Behavior

It says "Nous somme le 17 April 2019"

Possible Solution

is "locale" key expected to work ?

Steps to Reproduce

Try with this ?

<category>
        <pattern>TESTDATE</pattern>
        <template>Nous sommes le
            <sentence><date locale="fr_FR" format="%d %B %Y" jformat="dd MMMMMMMMM yyyy"/></sentence>
        </template>
</category>

Context (Environment)

Detailed Description

Possible Implementation

keiffster commented 5 years ago

locale is an extension that pandorabot added ( along with timezone ), these are something I missed when I was writing Program-y

I have added local and its working as per your requirements. I'll add timezone later and then release a patch with these additions

ohoachuck commented 5 years ago

Hello Keith, many thanx !

O.

Envoyé de mon iPhone

Le 17 avr. 2019 à 19:02, Keith Sterling notifications@github.com a écrit :

locale is an extension that pandorabot added ( along with timezone ), these are something I missed when I was writing Program-y

I have added local and its working as per your requirements. I'll add timezone later and then release a patch with these additions

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

keiffster commented 5 years ago

This fix is now scheduled for release in 3.8 shortly

ohoachuck commented 5 years ago

Cool 👍 O.

On 30 Apr 2019, at 14:01:54, Keith Sterling notifications@github.com wrote:

This fix is now scheduled for release in 3.8 shortly

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/keiffster/program-y/issues/200#issuecomment-487924948, or mute the thread https://github.com/notifications/unsubscribe-auth/AAL454LNZ3XNECLFQQ426KDPTAYLFANCNFSM4HGTPYDQ.

keiffster commented 5 years ago

3.8 released to master, pypi updated in next 24 hours