Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
other
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Sep 2014 at 10:32 UTC
Updated:
24 Sep 2014 at 09:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gábor hojtsyYeah I *think* there is/was an issue to add context support to config schemas, so when you provide a schema you can not only specify "translatable: true" but also "translation_context: ..." or something along those lines. I cannot find that issue right now. It would need support on both built-in Drupal and localize.drupal.org though. Not sure it is feasible / possible to implement this just for date formats, they are just translated as config entities like anything else.
Comment #2
herom commentedOne word: "Awesome". Meaning, config schema already supports context; It just wasn't used till now.
Comment #4
herom commentedAdded a one-line test fix.
Comment #5
gábor hojtsyOh, gosh :D Little known features are interesting, eh? :) I would *love* to rename this to something where we don't say "locale" since we so successfully eradicated "locale" from everywhere. Something like "translation context" or "string context". Since this is the first use of it ever, we could likely do it here if you agree.
Otherwise the patch itself looks good.
Since this is the first use of context in relation to config translation, it would also be great to add an integration test for this, but looks like the existing test may be covering it already, since it is going to add a translation, etc. So looking at that test, it seems to prove this integration works. So only renaming to a more sensible name is left.
Comment #6
herom commentedOk. Replaced with "translation context". That fits better with "translatable".
Comment #7
gábor hojtsyLooks great.
Comment #8
alexpottNice!
Committed ea561c1 and pushed to 8.0.x. Thanks!
Comment #10
gábor hojtsyDocumented this at https://www.drupal.org/node/1905070/revisions/view/7470481/7614325 yay :) Boo for not having docs for this before. Thanks!