{"action":"created","issue":{"url":"https://api.github.com/repos/vanilla/vanilla/issues/3106","labels_url":"https://api.github.com/repos/vanilla/vanilla/issues/3106/labels{/name}","comments_url":"https://api.github.com/repos/vanilla/vanilla/issues/3106/comments","events_url":"https://api.github.com/repos/vanilla/vanilla/issues/3106/events","html_url":"https://github.com/vanilla/vanilla/pull/3106","id":107154950,"number":3106,"title":"Make title(), description(), error- and informMessage() translatable by default.","user":{"login":"R-J","id":3996187,"avatar_url":"https://avatars.githubusercontent.com/u/3996187?v=3","gravatar_id":"","url":"https://api.github.com/users/R-J","html_url":"https://github.com/R-J","followers_url":"https://api.github.com/users/R-J/followers","following_url":"https://api.github.com/users/R-J/following{/other_user}","gists_url":"https://api.github.com/users/R-J/gists{/gist_id}","starred_url":"https://api.github.com/users/R-J/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R-J/subscriptions","organizations_url":"https://api.github.com/users/R-J/orgs","repos_url":"https://api.github.com/users/R-J/repos","events_url":"https://api.github.com/users/R-J/events{/privacy}","received_events_url":"https://api.github.com/users/R-J/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-18T08:21:04Z","updated_at":"2015-09-30T16:07:22Z","closed_at":"2015-09-30T13:49:07Z","pull_request":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/3106","html_url":"https://github.com/vanilla/vanilla/pull/3106","diff_url":"https://github.com/vanilla/vanilla/pull/3106.diff","patch_url":"https://github.com/vanilla/vanilla/pull/3106.patch"},"body":"Add the t() function inside the controller methods so that the methods texts are translatable by default. Changing this will lead to some double translations throughout the code. I do not think that this will effect performance too badly, since the methods are used sparsely and not in loops or anything like that.\r\n\r\nAlso fixed casening (completely?) in class.controller.php - *even in doc blocks!*"},"comment":{"url":"https://api.github.com/repos/vanilla/vanilla/issues/comments/144462355","html_url":"https://github.com/vanilla/vanilla/pull/3106#issuecomment-144462355","issue_url":"https://api.github.com/repos/vanilla/vanilla/issues/3106","id":144462355,"user":{"login":"R-J","id":3996187,"avatar_url":"https://avatars.githubusercontent.com/u/3996187?v=3","gravatar_id":"","url":"https://api.github.com/users/R-J","html_url":"https://github.com/R-J","followers_url":"https://api.github.com/users/R-J/followers","following_url":"https://api.github.com/users/R-J/following{/other_user}","gists_url":"https://api.github.com/users/R-J/gists{/gist_id}","starred_url":"https://api.github.com/users/R-J/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R-J/subscriptions","organizations_url":"https://api.github.com/users/R-J/orgs","repos_url":"https://api.github.com/users/R-J/repos","events_url":"https://api.github.com/users/R-J/events{/privacy}","received_events_url":"https://api.github.com/users/R-J/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T16:07:22Z","updated_at":"2015-09-30T16:07:22Z","body":"While I see your point (especially for the description), I think there are some inconsistencies. In this class (class.controller.php) there already is the addBreadcrumb function which always translates a breadcrumbs name. In the class form everything is passed through the t() function.\r\n\r\nI think there should be one consistent way of handling that. Either you have a framework that is built for being translatable from the ground on up and that would mean that translation functions must be implemented in the most basic functions.\r\nOr you use the translation function only when text is returned to the user (like the form class which generates markup). \r\n\r\nBut mixing both options forces a developer to always look up how strings are handled in one special case.\r\nSince I'm lazy, **I** would tend to always use the t() function. It's typed down fast, but the downside is, that sometimes strings are translated twice."}}