symfony/symfony — Issue #3148: [Translation] Override translation in child Bundle
Author: rdohms
Created: 2012-01-18 14:27:16+00:00
State: open

When using bundle inheritance (ParentBundle -> ChildBundle), placing a messages.en.xliff file in the child bundle does not override the parent bundle, it actually does the opposite, where the parent bundle overrides everything set in the child bundle.

Example:

**Case 1**
ParentBundle has:
home.name = "Home"
home.member = "Member"

ChildBundle has:
home.name = "Home Sweet Home"

Prints: Home

**Case 2**
ParentBundle has:
home.member = "Member"

ChildBundle has:
home.name = "Home Sweet Home"

Prints: Home Sweet Home

**Expected**
ParentBundle has:
home.name = "Home"
home.member = "Member"

ChildBundle has:
home.name = "Home Sweet Home"

Prints: Home Sweet Home

This is based on Bundle inheritance, where the docs describe you should add the `getParent` method and then just place the files in the same place. Is this a valid issue? Or am I doing it wrong?