{"action":"created","issue":{"url":"https://api.github.com/repos/ocadotechnology/hexagonjs/issues/200","repository_url":"https://api.github.com/repos/ocadotechnology/hexagonjs","labels_url":"https://api.github.com/repos/ocadotechnology/hexagonjs/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/ocadotechnology/hexagonjs/issues/200/comments","events_url":"https://api.github.com/repos/ocadotechnology/hexagonjs/issues/200/events","html_url":"https://github.com/ocadotechnology/hexagonjs/pull/200","id":146947813,"number":200,"title":"Configurable user facing text","user":{"login":"c-frater","id":3194349,"avatar_url":"https://avatars.githubusercontent.com/u/3194349?v=3","gravatar_id":"","url":"https://api.github.com/users/c-frater","html_url":"https://github.com/c-frater","followers_url":"https://api.github.com/users/c-frater/followers","following_url":"https://api.github.com/users/c-frater/following{/other_user}","gists_url":"https://api.github.com/users/c-frater/gists{/gist_id}","starred_url":"https://api.github.com/users/c-frater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-frater/subscriptions","organizations_url":"https://api.github.com/users/c-frater/orgs","repos_url":"https://api.github.com/users/c-frater/repos","events_url":"https://api.github.com/users/c-frater/events{/privacy}","received_events_url":"https://api.github.com/users/c-frater/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-08T14:43:53Z","updated_at":"2016-04-12T15:18:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ocadotechnology/hexagonjs/pulls/200","html_url":"https://github.com/ocadotechnology/hexagonjs/pull/200","diff_url":"https://github.com/ocadotechnology/hexagonjs/pull/200.diff","patch_url":"https://github.com/ocadotechnology/hexagonjs/pull/200.patch"},"body":"I've written a module for configuring the user facing text.\r\n\r\nYou can set up the text using:\r\n```js\r\nhx.userFacingText('noData', {'en': 'No Data'})\r\nhx.userFacingText(['dataTable','noData'], {en: 'No Data'})\r\n```\r\n\r\nThese can then be retrieved using the symmetrical getter:\r\n```js\r\nhx.userFacingText('noData')\r\nhx.userFacingText(['dataTable','noData'])\r\n```\r\n\r\nYou can also retrieve all the currently set strings using:\r\n```js\r\nhx.userFacingText()\r\n```\r\nWhich is useful if you want to see what you need to localise.\r\n\r\nThe theory is that each module would set up it's own user facing text which would then be stored in the global `userFacingText` object then each module would internally use the function to retrieve the text.\r\n\r\nThe retrieval checks for text in the current `hx.preferences.locale()` and then falls back to `en` which _should_ always exist (as it will be set up in the module code).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ocadotechnology/hexagonjs/issues/comments/208957869","html_url":"https://github.com/ocadotechnology/hexagonjs/pull/200#issuecomment-208957869","issue_url":"https://api.github.com/repos/ocadotechnology/hexagonjs/issues/200","id":208957869,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T15:18:04Z","updated_at":"2016-04-12T15:18:04Z","body":"\n[![Coverage Status](https://coveralls.io/builds/5756626/badge)](https://coveralls.io/builds/5756626)\n\nCoverage increased (+0.2%) to 56.14% when pulling **74261b337ca6de50fc9debde80d492a68e0956e3 on c-frater:user-facing-text** into **b1152ff1e2c7d920639a145668ac1ec87c813f00 on ocadotechnology:master**.\n"}}