{"action":"created","issue":{"url":"https://api.github.com/repos/GabrielRF/Send2KindleBot/issues/2","repository_url":"https://api.github.com/repos/GabrielRF/Send2KindleBot","labels_url":"https://api.github.com/repos/GabrielRF/Send2KindleBot/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/GabrielRF/Send2KindleBot/issues/2/comments","events_url":"https://api.github.com/repos/GabrielRF/Send2KindleBot/issues/2/events","html_url":"https://github.com/GabrielRF/Send2KindleBot/issues/2","id":247074871,"node_id":"MDU6SXNzdWUyNDcwNzQ4NzE=","number":2,"title":"Add Portuguese (and more) as an option","user":{"login":"GabrielRF","id":7331540,"node_id":"MDQ6VXNlcjczMzE1NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/7331540?v=4","gravatar_id":"","url":"https://api.github.com/users/GabrielRF","html_url":"https://github.com/GabrielRF","followers_url":"https://api.github.com/users/GabrielRF/followers","following_url":"https://api.github.com/users/GabrielRF/following{/other_user}","gists_url":"https://api.github.com/users/GabrielRF/gists{/gist_id}","starred_url":"https://api.github.com/users/GabrielRF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GabrielRF/subscriptions","organizations_url":"https://api.github.com/users/GabrielRF/orgs","repos_url":"https://api.github.com/users/GabrielRF/repos","events_url":"https://api.github.com/users/GabrielRF/events{/privacy}","received_events_url":"https://api.github.com/users/GabrielRF/received_events","type":"User","site_admin":false},"labels":[{"id":379407365,"node_id":"MDU6TGFiZWwzNzk0MDczNjU=","url":"https://api.github.com/repos/GabrielRF/Send2KindleBot/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-08-01T13:47:01Z","updated_at":"2018-09-26T14:13:21Z","closed_at":null,"author_association":"OWNER","body":"https://core.telegram.org/bots/api#user\r\n`language_code | String | Optional. IETF language tag of the user's language`\r\n"},"comment":{"url":"https://api.github.com/repos/GabrielRF/Send2KindleBot/issues/comments/424731009","html_url":"https://github.com/GabrielRF/Send2KindleBot/issues/2#issuecomment-424731009","issue_url":"https://api.github.com/repos/GabrielRF/Send2KindleBot/issues/2","id":424731009,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDczMTAwOQ==","user":{"login":"kedMertens","id":39831696,"node_id":"MDQ6VXNlcjM5ODMxNjk2","avatar_url":"https://avatars0.githubusercontent.com/u/39831696?v=4","gravatar_id":"","url":"https://api.github.com/users/kedMertens","html_url":"https://github.com/kedMertens","followers_url":"https://api.github.com/users/kedMertens/followers","following_url":"https://api.github.com/users/kedMertens/following{/other_user}","gists_url":"https://api.github.com/users/kedMertens/gists{/gist_id}","starred_url":"https://api.github.com/users/kedMertens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kedMertens/subscriptions","organizations_url":"https://api.github.com/users/kedMertens/orgs","repos_url":"https://api.github.com/users/kedMertens/repos","events_url":"https://api.github.com/users/kedMertens/events{/privacy}","received_events_url":"https://api.github.com/users/kedMertens/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T14:13:21Z","updated_at":"2018-09-26T14:13:21Z","author_association":"NONE","body":"@GabrielRF, @rougeth, here is what I found out. \r\nIn order to provide multi-language feature following steps has to be applied :\r\n1. Wrap desired strings from pdftokindlebot.py with `_()` , that mark will highlight text for next step. \r\n2. Generate Portable Object Template (POT) file, the file will contain all marked strings. To generate one, several tools are available: xgettext, xpot, standard python script pygettext.py and Babel library. \r\n3. Add translations of the text to POT file and generate Portable Object (PO), Machine Object (MO) files. Filling POT file can be done manually or with help of third party services, for instance [Transifex ](https://www.transifex.com/) - provides translation and generates PO, MO files, open-source translations editor is [Poedit ](https://poedit.net/), Babel library methods.\r\n4. Add [gettext ](https://docs.python.org/3/library/gettext.html) module to pdftokindlebot.py.\r\n5. Modify source-code to enable translation options based on user language_code or with bot commands to change language on fly.\r\n\r\nI can open a PR and start to work with respect to revealed algorithm.\r\nWill be glade to hear your feedback.\r\n"}}
{"actor":{"display_login":"kedMertens"}}