As a developer I can annotate objects to be internationalized and let a framework do the rest (MAGNOLIA-5268)

[MAGNOLIA-5306] Implement a default Translation Service Created: 06/Sep/13  Updated: 17/Sep/13  Resolved: 16/Sep/13

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

Type: Sub-task Priority: Major
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-5314 ensure UTF-encoding when loading the ... Closed
Template:
Date of First Response:
Sprint: 5.1 Beta1- Frontend, 5.1 - Final

 Description   
  • current dummy impl goes away
  • load everything /mgnl-i18n/**_XX.properties
  • fallbacks language_country_variant
    • with chains
  • also falls back to configured default language
  • if no i18n basename is configured, we fall back to "global" bundle
  • TBD duplicate keys
    • warn ? blow up ? use which one ?
    • need to be able to override texts
    • use module order as suggested by Christopher
      • /mgnl-i18n/<module-name>/**_<locale>.properties
      • info.magnolia.module.ModuleRegistry#getModuleDefinitions
        but then no way to discourage duplicates


 Comments   
Comment by Magnolia International [ 12/Sep/13 ]

Needs at the very least answers to the questions opened in the description of the issue (i.e description/concept should be updated)

Comment by Federico Grilli [ 16/Sep/13 ]

Ticket description has been updated. Will update the concept soon.

Comment by Eric Hechinger [ 17/Sep/13 ]

TranslationServiceImpl, DefaultMessageBundlesLoader : Fix the TODO or link it with a follow up ticket.

ContextLocaleProvider, Empty constructor with @Inject ?
@Inject
public ContextLocaleProvider()

{ // nothing }

Less important :
LocaleUtilsTest Split the test class (to many // GIVEN, WHEN THEN in test method)

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