{"action":"created","issue":{"url":"https://api.github.com/repos/sulu-io/sulu/issues/2124","repository_url":"https://api.github.com/repos/sulu-io/sulu","labels_url":"https://api.github.com/repos/sulu-io/sulu/issues/2124/labels{/name}","comments_url":"https://api.github.com/repos/sulu-io/sulu/issues/2124/comments","events_url":"https://api.github.com/repos/sulu-io/sulu/issues/2124/events","html_url":"https://github.com/sulu-io/sulu/issues/2124","id":140714659,"number":2124,"title":"ShadoeCopyPropertiesSubscriber: Should use property encoder.","user":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T15:53:02Z","updated_at":"2016-03-15T07:19:54Z","closed_at":null,"body":"| Q | A\r\n| --- | ---\r\n| Bug? | yes\r\n| New Feature? | no\r\n| Sulu Version | a326675d\r\n\r\n#### Actual Behavior\r\n\r\nClass uses a regular expression to determine the locale of a property:\r\n\r\n```\r\npreg_match('/i18n:(?P<locale>.+)-shadow-base/', $propertyName, $match);\r\n```\r\n\r\nIt also has a dependency on the `PropertyEncoder` and does not use it.\r\n\r\n#### Expected Behavior\r\n\r\nIt should not do that. This is a storage detail and should not be exposed beyond specific classes in the DocumentManager layer.\r\n\r\nThere is a better way to do it (I don't know what without looking closer).\r\n\r\n/cc @wachterjohannes "},"comment":{"url":"https://api.github.com/repos/sulu-io/sulu/issues/comments/196697365","html_url":"https://github.com/sulu-io/sulu/issues/2124#issuecomment-196697365","issue_url":"https://api.github.com/repos/sulu-io/sulu/issues/2124","id":196697365,"user":{"login":"wachterjohannes","id":1464615,"avatar_url":"https://avatars.githubusercontent.com/u/1464615?v=3","gravatar_id":"","url":"https://api.github.com/users/wachterjohannes","html_url":"https://github.com/wachterjohannes","followers_url":"https://api.github.com/users/wachterjohannes/followers","following_url":"https://api.github.com/users/wachterjohannes/following{/other_user}","gists_url":"https://api.github.com/users/wachterjohannes/gists{/gist_id}","starred_url":"https://api.github.com/users/wachterjohannes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wachterjohannes/subscriptions","organizations_url":"https://api.github.com/users/wachterjohannes/orgs","repos_url":"https://api.github.com/users/wachterjohannes/repos","events_url":"https://api.github.com/users/wachterjohannes/events{/privacy}","received_events_url":"https://api.github.com/users/wachterjohannes/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T07:19:54Z","updated_at":"2016-03-15T07:19:54Z","body":"we could add a function - to the property-encoder - to determine the locale from the property name. also the \"sprintf\" statements should be replaced with function calls to the encoder."}}