{"action":"created","issue":{"url":"https://api.github.com/repos/CORE-POS/IS4C/issues/52","repository_url":"https://api.github.com/repos/CORE-POS/IS4C","labels_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/52/comments","events_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/52/events","html_url":"https://github.com/CORE-POS/IS4C/issues/52","id":5329769,"number":52,"title":"Managing message strings (i18n)","user":{"login":"gohanman","id":426966,"avatar_url":"https://avatars.githubusercontent.com/u/426966?v=3","gravatar_id":"","url":"https://api.github.com/users/gohanman","html_url":"https://github.com/gohanman","followers_url":"https://api.github.com/users/gohanman/followers","following_url":"https://api.github.com/users/gohanman/following{/other_user}","gists_url":"https://api.github.com/users/gohanman/gists{/gist_id}","starred_url":"https://api.github.com/users/gohanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gohanman/subscriptions","organizations_url":"https://api.github.com/users/gohanman/orgs","repos_url":"https://api.github.com/users/gohanman/repos","events_url":"https://api.github.com/users/gohanman/events{/privacy}","received_events_url":"https://api.github.com/users/gohanman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CORE-POS/IS4C/labels/Low%20Priority","name":"Low Priority","color":"ededed"},{"url":"https://api.github.com/repos/CORE-POS/IS4C/labels/Planning","name":"Planning","color":"ededed"},{"url":"https://api.github.com/repos/CORE-POS/IS4C/labels/Proposals%20For%20Change","name":"Proposals For Change","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"gohanman","id":426966,"avatar_url":"https://avatars.githubusercontent.com/u/426966?v=3","gravatar_id":"","url":"https://api.github.com/users/gohanman","html_url":"https://github.com/gohanman","followers_url":"https://api.github.com/users/gohanman/followers","following_url":"https://api.github.com/users/gohanman/following{/other_user}","gists_url":"https://api.github.com/users/gohanman/gists{/gist_id}","starred_url":"https://api.github.com/users/gohanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gohanman/subscriptions","organizations_url":"https://api.github.com/users/gohanman/orgs","repos_url":"https://api.github.com/users/gohanman/repos","events_url":"https://api.github.com/users/gohanman/events{/privacy}","received_events_url":"https://api.github.com/users/gohanman/received_events","type":"User","site_admin":false},"assignees":[{"login":"gohanman","id":426966,"avatar_url":"https://avatars.githubusercontent.com/u/426966?v=3","gravatar_id":"","url":"https://api.github.com/users/gohanman","html_url":"https://github.com/gohanman","followers_url":"https://api.github.com/users/gohanman/followers","following_url":"https://api.github.com/users/gohanman/following{/other_user}","gists_url":"https://api.github.com/users/gohanman/gists{/gist_id}","starred_url":"https://api.github.com/users/gohanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gohanman/subscriptions","organizations_url":"https://api.github.com/users/gohanman/orgs","repos_url":"https://api.github.com/users/gohanman/repos","events_url":"https://api.github.com/users/gohanman/events{/privacy}","received_events_url":"https://api.github.com/users/gohanman/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2012-06-28T19:16:00Z","updated_at":"2016-09-23T20:49:07Z","closed_at":null,"body":"@DonaldGonzalez mentioned something on another issue about fixing capitalization on user-facing messages. I think if we're going through and re-writing/fixing a bunch of strings, it's a good opportunity to do it *correctly* and use some built-in string management.\n\nI spent a little time getting familiar with PHP's gettext implementation and wrote up some simple documentation:\nhttp://is4c.gohanman.com/git/IS4C/documentation/IS4C/developer/i18n.html\n\nIt's pretty easy to use, from a developer standpoint. Basically, put _() around user-facing strings. I doubt we need alternate language versions any time soon, but moving the messages into one file makes some future changes easier. If we want to change in terminology or formatting, there's no need to go hunting through all the code files. Everything's in the en_US translation.\n\n(I marked this low priority because it will be somewhat time consuming; I'm not suggesting the original suggestion is unimportant)"},"comment":{"url":"https://api.github.com/repos/CORE-POS/IS4C/issues/comments/249298863","html_url":"https://github.com/CORE-POS/IS4C/issues/52#issuecomment-249298863","issue_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/52","id":249298863,"user":{"login":"gohanman","id":426966,"avatar_url":"https://avatars.githubusercontent.com/u/426966?v=3","gravatar_id":"","url":"https://api.github.com/users/gohanman","html_url":"https://github.com/gohanman","followers_url":"https://api.github.com/users/gohanman/followers","following_url":"https://api.github.com/users/gohanman/following{/other_user}","gists_url":"https://api.github.com/users/gohanman/gists{/gist_id}","starred_url":"https://api.github.com/users/gohanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gohanman/subscriptions","organizations_url":"https://api.github.com/users/gohanman/orgs","repos_url":"https://api.github.com/users/gohanman/repos","events_url":"https://api.github.com/users/gohanman/events{/privacy}","received_events_url":"https://api.github.com/users/gohanman/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T20:49:07Z","updated_at":"2016-09-23T20:49:07Z","body":"I don't think the task is daunting some much as tedious to make sure every user facing string gets wrapped in a `_()` function call.\r\n\r\nOne other piece that I think is worth noting in pursuing this is that it's not a good idea to wrap individual words but rather whole phrases. So the custom translation might have to replace \"member\" a bunch of times in different phrases. e.g.,\r\n```php\r\n        } elseif (!$this->submitted) {\r\n            echo _(\"member search\").\"<br />\"._(\"enter member number or name\");\r\n        } else {\r\n            echo _(\"no match found\").\"<br />\"._(\"next search or member number\");\r\n        }\r\n```\r\n\r\nIt's a moderate annoyance for the use case we're talking about, although find and replace can probably handle much of it. But if someone wanted to translate the UI to **not English**, then having translations at the level of individual words doesn't work at all. If we're going to put the effort into wrapping all these strings it might as well be in a way that maximizes translatability. "}}
{"actor":{"display_login":"gohanman"}}