Add function twig *_name for intl#3742
Conversation
|
issue #3741 |
|
Can you add the related docs? |
I just added them. |
|
maybe some utest (coverage) could be added for the new code? |
I don't know how to do it. |
You can add test files in |
I just added them. |
|
It looks like tests are broken. |
You are right but I did not touch this part of the code. public function formatDateTime(Environment $env, $date, ?string $dateFormat = 'medium', ?string $timeFormat = 'medium', string $pattern = '', $timezone = null, string $calendar = 'gregorian', string $locale = null): string
{
- $date = \twig_date_converter($env, $date, $timezone);
+ $date = twig_date_converter($env, $date, $timezone);
$formatter = $this->createDateFormatter($locale, $dateFormat, $timeFormat, $pattern, $date->getTimezone(), $calendar);
if (false === $ret = $formatter->format($date)) Otherwise, this is the link: https://fabbot.io/patch/twigphp/Twig/3742/cf584f042bf16324db8b8a7a74e067d2e41f03e8/cs.diff |
Tests fail due to line break (\r, \r\n) |
fabpot
left a comment
There was a problem hiding this comment.
Looks good to me.
I made some minor comments.
There was a problem hiding this comment.
These tests are going to break every time there is an update in the underlying dataset. I would suggest only listing some "stable" entries instead.
|
@seb-jean Thank you fo all the changes. I'm going to take over the tests changes before merging the PR (I'd like to have it for the next versions that I'm going to release soon). |
|
Thank you @seb-jean. |
|
Thanks to the people who helped me build this PR. |
Hi,
I add
language_names,script_names,country_names,locale_names,currency_names,timezone_names.It allows us to have a list but on the Twig side and to use them in filters for example.