[MAGNOLIA-6472] Support injection into i18n key generators Created: 23/Dec/15  Updated: 11/Mar/21  Resolved: 11/Mar/21

Status: Closed
Project: Magnolia
Component/s: i18n
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MAGNOLIA-8030 Improve i18n key generators to work w... Accepted
is depended upon by MAGNOLIA-6470 Offer possibility to override templat... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: Enhancement of i18n
Story Points: 1

 Description   

So we can create custom generator with injected components (like SiteManager).
The solution is simple:

info.magnolia.i18nsystem.I18nKeyGeneratorFactory#newKeyGenerator {
    return Components.newInstance(i18nable.keyGenerator());
}

Generated at Mon Feb 12 04:14:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.