phpbb
phpbb copied to clipboard
[ticket/15556] Translate AM/PM in time format
Taking care in case that am
may be apart of word
PHPBB3-15556
Checklist:
- [ ] Correct branch: master for new features; 3.2.x for fixes
- [x] Tests pass
- [ ] Code follows coding guidelines: master and 3.2.x
- [x] Commit follows commit message format
Tracker ticket :
https://tracker.phpbb.com/browse/PHPBB3-15556
I also posted lightweight alternative PR in https://github.com/phpbb/phpbb/pull/5124
I would prefer this one over the other solution you posted. @phpbb/development-team thoughts?
@CHItA https://www.phpbb.com/community/viewtopic.php?p=14938071#p14938071
@hanakin that would be better in general I think, however, it is unlikely that we would fix it before 3.3.
Anyhow, what I don't get is whether or not there is a difference between the lower and uppercase versions in any language. If not, couldn't just we use the unicode to uppercase function, and be done with it?
Either way it’s not really a full fix just a minor fix for this specific language. Some languages do there own thing
Not a specific language, Most of non Latin Languages will by fixed with this.
not what I mean by most languages do not only require a translation but also require reorganizing the entire DTG go here: https://momentjs.com/ and play with the language toggles at the bottom. The real question you have to ask is it worth changing this now? or can it wait until 3.3 where we can handle things properly? I just do not think we would want to introduce more code to the backend in a bug release that will be deprecated and removed later in 3.3. especially when it's actually not that hard to implement a better change at that time.
After a look to http://momentjs.com it used more then two word for AM/PM
for some languages but these languages use 24 hours system not 12 hours system so it is not expected they use AM/PM
in time format. And also momentjs used long AM/PM
words for these languages (more than 4 characters).
We don't use that here. 3 AM = 3 hours 3 PM = 15 hours
Is it possible to global $language
and use $language->lang()
instead of $user->lang[]
?
@mrgoldy the best way to handle this is in 3.3 by using something like momentjs possibly as a passthrough twig filter. it also would sole some other issues in that it would allow for custom formats for dates by the style author in every instance