{"action":"created","issue":{"url":"https://api.github.com/repos/Tatoeba/tatoeba2/issues/623","labels_url":"https://api.github.com/repos/Tatoeba/tatoeba2/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/Tatoeba/tatoeba2/issues/623/comments","events_url":"https://api.github.com/repos/Tatoeba/tatoeba2/issues/623/events","html_url":"https://github.com/Tatoeba/tatoeba2/pull/623","id":64498559,"number":623,"title":"Localization of countries names","user":{"login":"jiru","id":5107734,"avatar_url":"https://avatars.githubusercontent.com/u/5107734?v=3","gravatar_id":"","url":"https://api.github.com/users/jiru","html_url":"https://github.com/jiru","followers_url":"https://api.github.com/users/jiru/followers","following_url":"https://api.github.com/users/jiru/following{/other_user}","gists_url":"https://api.github.com/users/jiru/gists{/gist_id}","starred_url":"https://api.github.com/users/jiru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiru/subscriptions","organizations_url":"https://api.github.com/users/jiru/orgs","repos_url":"https://api.github.com/users/jiru/repos","events_url":"https://api.github.com/users/jiru/events{/privacy}","received_events_url":"https://api.github.com/users/jiru/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Tatoeba/tatoeba2/milestones/50","html_url":"https://github.com/Tatoeba/tatoeba2/milestones/2015-04-04","labels_url":"https://api.github.com/repos/Tatoeba/tatoeba2/milestones/50/labels","id":1032457,"number":50,"title":"2015-04-04","description":"","creator":{"login":"trang","id":221850,"avatar_url":"https://avatars.githubusercontent.com/u/221850?v=3","gravatar_id":"","url":"https://api.github.com/users/trang","html_url":"https://github.com/trang","followers_url":"https://api.github.com/users/trang/followers","following_url":"https://api.github.com/users/trang/following{/other_user}","gists_url":"https://api.github.com/users/trang/gists{/gist_id}","starred_url":"https://api.github.com/users/trang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trang/subscriptions","organizations_url":"https://api.github.com/users/trang/orgs","repos_url":"https://api.github.com/users/trang/repos","events_url":"https://api.github.com/users/trang/events{/privacy}","received_events_url":"https://api.github.com/users/trang/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2015-03-22T00:57:24Z","updated_at":"2015-03-31T20:53:44Z","due_on":"2015-04-03T22:00:00Z","closed_at":null},"comments":1,"created_at":"2015-03-26T11:12:16Z","updated_at":"2015-04-01T00:54:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Tatoeba/tatoeba2/pulls/623","html_url":"https://github.com/Tatoeba/tatoeba2/pull/623","diff_url":"https://github.com/Tatoeba/tatoeba2/pull/623.diff","patch_url":"https://github.com/Tatoeba/tatoeba2/pull/623.patch"},"body":"This adds localization for countries names displayed on the UI (on the profile page) (#151).\r\n* Got rid of the Country model (it’s now a helper)\r\n* Updated the country list (“Serbia and Montenegro” removed, Canary Islands, Montenegro, South Sudan, Kosovo etc. added)\r\n* Made countries names translatable (in a separate domain (separate pot file))\r\n* Imported translations from CLDR (Esperanto and Belarusian are partially translated; Interlingua, Lojban, Latin, Low German, Occitan and Tagalog are missing; the rest is fully translated)\r\n* The script used to import translations can be reused to import updated translations from CLDR, or we can update the translations ourselves by editing the PO files. We will need to merge things by hand however.\r\n\r\nNote that 7 users have country set as “Serbia and Montenegro” in their profile: Dimitrije, Amicus, Ninche, tepsa, neron, ban17 and kojot. We will need to fix this somehow.\r\n"},"comment":{"url":"https://api.github.com/repos/Tatoeba/tatoeba2/issues/comments/88297821","html_url":"https://github.com/Tatoeba/tatoeba2/pull/623#issuecomment-88297821","issue_url":"https://api.github.com/repos/Tatoeba/tatoeba2/issues/623","id":88297821,"user":{"login":"jiru","id":5107734,"avatar_url":"https://avatars.githubusercontent.com/u/5107734?v=3","gravatar_id":"","url":"https://api.github.com/users/jiru","html_url":"https://github.com/jiru","followers_url":"https://api.github.com/users/jiru/followers","following_url":"https://api.github.com/users/jiru/following{/other_user}","gists_url":"https://api.github.com/users/jiru/gists{/gist_id}","starred_url":"https://api.github.com/users/jiru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiru/subscriptions","organizations_url":"https://api.github.com/users/jiru/orgs","repos_url":"https://api.github.com/users/jiru/repos","events_url":"https://api.github.com/users/jiru/events{/privacy}","received_events_url":"https://api.github.com/users/jiru/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T00:54:22Z","updated_at":"2015-04-01T00:54:22Z","body":"I agree about the naming.\r\n\r\nI initially wanted to make a model, but I changed my mind giving the following:\r\n* We need to have the English country list somewhere in the code, so that the strings are translatable.\r\n* I wasn’t able to make it work as a read-only model with just a PHP array as data. A simple ->find('all') (to generate the list) worked, but joining with other tables (to grab informations about a user) did not.\r\n\r\nTo be honest I’m always having trouble with MVC when it comes to handling choices lists, and I’ve never been able to find a proper solution that doesn’t duplicate the list somehow. Usually you need the list both in the model (for data validation) and in the view (to generate the list), while you both want the values to be translatable (written in the source code) and stored in the database. That’s why I’d prefer not to duplicate the list while we don’t need to."}}