As found by @droplet in #1452188: New UI for string translation, long month names in locale.datepicker.js in Drupal 8 do not use context for long month names, and therefore the long month names get recorded for translation (and used translated) without their proper context. Drupal 8 did add context support for JS translation that was missing in Drupal 7 (in #488496: Implement missing msgctx context in JS translation for feature parity with t()), so it should not be possible to add the 'Long month name' context to the JS strings in locale.datepicker.js now and close this bug.

CommentFileSizeAuthor
#3 1634190-fix-long-month-context-js-3.patch1.51 KBLoMo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

I tagged this novice. http://drupal.org/node/1323152 should have code examples on how to add the Long month name context :)

LoMo’s picture

Assigned: Unassigned » LoMo

All right... I'll work on that. :-)

LoMo’s picture

Status: Active » Needs review
FileSize
1.51 KB

Hopefully this patch works. Needs review. :-)

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Yes, looks great. As said, not backportable to Drupal 7, this is new capability in Drupal 8 in JS (in Drupal 7 it is only in PHP).

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Cool, I will take your word for it on this that the weird empty array stuff is kosher. ;)

Committed and pushed to 8.x; thanks!

Gábor Hojtsy’s picture

Issue tags: -sprint

Thanks, removing sprint tag.

Automatically closed -- issue fixed for 2 weeks with no activity.