{"action":"created","issue":{"url":"https://api.github.com/repos/harbaum/TouchUI/issues/1","repository_url":"https://api.github.com/repos/harbaum/TouchUI","labels_url":"https://api.github.com/repos/harbaum/TouchUI/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/harbaum/TouchUI/issues/1/comments","events_url":"https://api.github.com/repos/harbaum/TouchUI/issues/1/events","html_url":"https://github.com/harbaum/TouchUI/pull/1","id":186157784,"number":1,"title":"Add Multilanguage Support","user":{"login":"ski7777","id":17218193,"avatar_url":"https://avatars.githubusercontent.com/u/17218193?v=3","gravatar_id":"","url":"https://api.github.com/users/ski7777","html_url":"https://github.com/ski7777","followers_url":"https://api.github.com/users/ski7777/followers","following_url":"https://api.github.com/users/ski7777/following{/other_user}","gists_url":"https://api.github.com/users/ski7777/gists{/gist_id}","starred_url":"https://api.github.com/users/ski7777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ski7777/subscriptions","organizations_url":"https://api.github.com/users/ski7777/orgs","repos_url":"https://api.github.com/users/ski7777/repos","events_url":"https://api.github.com/users/ski7777/events{/privacy}","received_events_url":"https://api.github.com/users/ski7777/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-30T19:42:42Z","updated_at":"2016-11-03T13:39:22Z","closed_at":"2016-10-31T07:52:05Z","pull_request":{"url":"https://api.github.com/repos/harbaum/TouchUI/pulls/1","html_url":"https://github.com/harbaum/TouchUI/pull/1","diff_url":"https://github.com/harbaum/TouchUI/pull/1.diff","patch_url":"https://github.com/harbaum/TouchUI/pull/1.patch"},"body":"From now on you can easily access translation files to easily use apps with multiple languages. A good App to set the language will follow.\n\nRaphael\n"},"comment":{"url":"https://api.github.com/repos/harbaum/TouchUI/issues/comments/258144453","html_url":"https://github.com/harbaum/TouchUI/pull/1#issuecomment-258144453","issue_url":"https://api.github.com/repos/harbaum/TouchUI/issues/1","id":258144453,"user":{"login":"ski7777","id":17218193,"avatar_url":"https://avatars.githubusercontent.com/u/17218193?v=3","gravatar_id":"","url":"https://api.github.com/users/ski7777","html_url":"https://github.com/ski7777","followers_url":"https://api.github.com/users/ski7777/followers","following_url":"https://api.github.com/users/ski7777/following{/other_user}","gists_url":"https://api.github.com/users/ski7777/gists{/gist_id}","starred_url":"https://api.github.com/users/ski7777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ski7777/subscriptions","organizations_url":"https://api.github.com/users/ski7777/orgs","repos_url":"https://api.github.com/users/ski7777/repos","events_url":"https://api.github.com/users/ski7777/events{/privacy}","received_events_url":"https://api.github.com/users/ski7777/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T13:39:22Z","updated_at":"2016-11-03T13:39:22Z","body":"What should I learn from my triple post and double opening yesterday? Move the android github app to trash!\r\n\r\nI don't think, tgat we should use different translation systems. In my opinion we should use the easiest system for both developer and translator.\r\n\r\nMy System is based very simple you only need the base class, which is currently in my TouchStyle Pull:\r\n`class Language():\r\n    def __init__(self, path, default_language):\r\n        self.path = path\r\n        self.default_language = default_language\r\n\r\n        try:\r\n            config = configparser.RawConfigParser()\r\n            config.read(CONFIG_FILE)\r\n            self.language = config.get('general', 'language')\r\n        except:\r\n            self.language = self.default_language\r\n\r\n        try:\r\n            self.global_error = False\r\n            self.translation = configparser.RawConfigParser()\r\n            self.translation.read(self.path)\r\n        except:\r\n            self.global_error = True\r\n\r\n    def get_string(self, key):\r\n        if self.global_error == False:\r\n            try:\r\n                return(self.translation.get(self.language, key))\r\n            except:\r\n                pass\r\n\r\n            try:\r\n                return(self.translation.get(self.default_language, key))\r\n            except:\r\n                pass\r\n        return('missingno')`\r\n Then I need a confug file at /media/sdcard/data/config.conf:\r\n`[general]\r\nlanguage: DE`\r\nand a translation file e.g. in the app-directory. \"translation\":\r\n`[EN]\r\nhello: Hello World\r\n[DE]\r\nhello: Hallo Welt\r\n[FR]\r\nhello: Salut le monde`\r\n\r\nThe last thing I need is the app itself:\r\n`from TouchStyle import *\r\ntranslation = Language('path_to_app/translation', 'EN')\r\n# let's be simple I only do a printout\r\nprint(translation.get_string('hello'))`\r\n\r\nIf German is your user language you will be welcomed in German, if English it will be English and French to French. All the others will be English.\r\n\r\nHow do another system work? Could we imprive mine?\r\n\r\nRaphael"}}
{"actor":{"display_login":"ski7777"}}