phpbb icon indicating copy to clipboard operation
phpbb copied to clipboard

[ticket/15556] Translate AM/PM in time format

Open hubaishan opened this issue 7 years ago • 11 comments

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

hubaishan avatar Feb 12 '18 08:02 hubaishan

I also posted lightweight alternative PR in https://github.com/phpbb/phpbb/pull/5124

hubaishan avatar Feb 12 '18 08:02 hubaishan

I would prefer this one over the other solution you posted. @phpbb/development-team thoughts?

CHItA avatar Feb 13 '18 19:02 CHItA

@CHItA https://www.phpbb.com/community/viewtopic.php?p=14938071#p14938071

hanakin avatar Feb 13 '18 21:02 hanakin

@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?

CHItA avatar Feb 14 '18 16:02 CHItA

Either way it’s not really a full fix just a minor fix for this specific language. Some languages do there own thing

hanakin avatar Feb 14 '18 17:02 hanakin

Not a specific language, Most of non Latin Languages will by fixed with this.

hubaishan avatar Feb 15 '18 07:02 hubaishan

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.

hanakin avatar Feb 15 '18 12:02 hanakin

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).

hubaishan avatar Feb 15 '18 16:02 hubaishan

We don't use that here. 3 AM = 3 hours 3 PM = 15 hours

SpIdErPiGgY1984 avatar Dec 30 '18 13:12 SpIdErPiGgY1984

Is it possible to global $language and use $language->lang() instead of $user->lang[]?

ghost avatar Dec 30 '18 13:12 ghost

@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

hanakin avatar Feb 28 '19 19:02 hanakin