Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The argument locale is ignored when merging a date #15

Open
guiyo1 opened this issue Jun 7, 2021 · 3 comments
Open

The argument locale is ignored when merging a date #15

guiyo1 opened this issue Jun 7, 2021 · 3 comments

Comments

@guiyo1
Copy link

guiyo1 commented Jun 7, 2021

Hello,

We noticed a bug in the merging of dates in the latest version of opentbs.

We are using the following to merge a date :

[datetime.date;frm=dddd dd mmmm yyyy;locale]

Which is replaced with opentbs 1.9.11 by :
lundi 07 juin 2021

(We also have set the locale with a call to setlocale(LC_TIME, "fr_FR.utf8");)

But in the latest version of opentbs (1.10.2), we have the following :

Monday 07 June 2021

The locale seems to be ignored.
We had to rollback to the version 1.9.11

@roxblnfk
Copy link
Contributor

roxblnfk commented Jun 7, 2021

I think this behavior depends on Skrol29/tinybutstrong package

@Skrol29
Copy link
Owner

Skrol29 commented Jun 9, 2021

It depends of the TinyButStrong version running the OpenTBS plug-in.

Try this:

Template :

[datetime.date;frm=dddd dd mmmm yyyy(locale)]

See the keyword (locale) that replaces the parameter locale.

PHP :
setlocale(LC_TIME, "fra"); // "fr_FR.utf8" did not work on my computer

@guiyo1
Copy link
Author

guiyo1 commented Jun 10, 2021

Sorry if I used the wrong repo, I didn't know which one would fit best.

We were using tinybutstrong 3.11 with opentbs 1.9.11, and we upgraded to tinybutstrong 3.12.2 with opentbs 1.10.2

I can confirm that it does indeed work with the keyword (locale).

Is there any documentation on the change of this behavior ? I didn't find any mention in the changelog of both tinybutsrong and opentbs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants