{"action":"opened","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3903","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3903/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3903/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3903/events","html_url":"https://github.com/silverstripe/silverstripe-framework/issues/3903","id":57760309,"number":3903,"title":"BUG: field_labels translation inherits incorrectly","user":{"login":"tractorcow","id":936064,"avatar_url":"https://avatars.githubusercontent.com/u/936064?v=3","gravatar_id":"","url":"https://api.github.com/users/tractorcow","html_url":"https://github.com/tractorcow","followers_url":"https://api.github.com/users/tractorcow/followers","following_url":"https://api.github.com/users/tractorcow/following{/other_user}","gists_url":"https://api.github.com/users/tractorcow/gists{/gist_id}","starred_url":"https://api.github.com/users/tractorcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tractorcow/subscriptions","organizations_url":"https://api.github.com/users/tractorcow/orgs","repos_url":"https://api.github.com/users/tractorcow/repos","events_url":"https://api.github.com/users/tractorcow/events{/privacy}","received_events_url":"https://api.github.com/users/tractorcow/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/labels/3.1","name":"3.1","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-16T03:01:05Z","updated_at":"2015-02-16T03:01:05Z","closed_at":null,"body":"At the moment, if a field_label is defined as \r\n\r\n```php\r\nprivate static $field_labels = array(\r\n    'FirstName' => 'Given Name'\r\n);\r\n```\r\n\r\nThen that field is no longer able to be translated via i18n.\r\n\r\nThe offending bit of code is at https://github.com/silverstripe/silverstripe-framework/blob/49c462710dfc2718219b7a4c63748251ba0d6240/model/DataObject.php#L3297, and seems to be due to array_merge merging the static value over the top of the i18n values.\r\n\r\nIdeally, PHP should allow a default value to be assigned, where i18n yaml should define the translation in specific locales."}}