[MGNLUI-5904] I18n for EnumDatasourceDefinition Created: 28/May/20  Updated: 06/Nov/20  Resolved: 30/Jul/20

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

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Lam Nguyen Bao
Resolution: Obsolete Votes: 0
Labels: ui-ux-impr
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLUI-5902 Status column filter: replace terms '... 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)
Date of First Response:
Epic Link: UI framework implementation
Story Points: 2

 Description   

Steps to reproduce

Look at the publishing status column filter in a JCR app.

Expected results

Filter values are translatable.

Actual results

Values can actually be too technical since those are plain java enumeration names, no spaces allowed (NotActivated).

Workaround

Name java enumerations as UI users friendly as possible

Development notes

info.magnolia.ui.datasource.enumeration.EnumSelectFieldSupport#getItemCaptionGenerator could do something like
item -> translationService.translate(contextLocaleProvider.get(), new String[]("key.prefix." + item.name().toLowerCase), item.name());

Make it more consistent with i18n key by replace (_) to (.), eg: A_B => a.b



 Comments   
Comment by Lam Nguyen Bao [ 30/Jul/20 ]

This ticket become obsolete since the problem is fixed in MGNLUI-5902

cc: slutz

Generated at Mon Feb 12 09:31:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.