{"action":"opened","issue":{"url":"https://api.github.com/repos/gnunn1/terminix/issues/301","repository_url":"https://api.github.com/repos/gnunn1/terminix","labels_url":"https://api.github.com/repos/gnunn1/terminix/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/gnunn1/terminix/issues/301/comments","events_url":"https://api.github.com/repos/gnunn1/terminix/issues/301/events","html_url":"https://github.com/gnunn1/terminix/issues/301","id":153326256,"number":301,"title":"Gettext used fundamentally incorrectly for shortcuts","user":{"login":"egmontkob","id":5750745,"avatar_url":"https://avatars.githubusercontent.com/u/5750745?v=3","gravatar_id":"","url":"https://api.github.com/users/egmontkob","html_url":"https://github.com/egmontkob","followers_url":"https://api.github.com/users/egmontkob/followers","following_url":"https://api.github.com/users/egmontkob/following{/other_user}","gists_url":"https://api.github.com/users/egmontkob/gists{/gist_id}","starred_url":"https://api.github.com/users/egmontkob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egmontkob/subscriptions","organizations_url":"https://api.github.com/users/egmontkob/orgs","repos_url":"https://api.github.com/users/egmontkob/repos","events_url":"https://api.github.com/users/egmontkob/events{/privacy}","received_events_url":"https://api.github.com/users/egmontkob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-05T21:06:39Z","updated_at":"2016-05-05T21:06:39Z","closed_at":null,"body":"At certain places, Terminix uses internal technical identifiers as the string to be translated (msgid), and translates it even to English. E.g. en.po contains:\r\n\r\nmsgid \"switch-to-terminal-1\"\r\nmsgstr \"Switch To Terminal 1\"\r\n\r\nThis approach is wrong for a couple of reasons.\r\n\r\nSure there are some internationalization frameworks out in the wild that work this way, but gettext is not one. It expects the source string to be the American English UI label. (In case the English word is ambiguous and the same word appears at multiple places which should be translated differently, the solution is pgettext()).\r\n\r\nGettext falls back to the source string (msgid) and displays that on the UI if the catalog(s) according to the LANG, LANGUAGE, LC_* variables do not contain the translation.\r\n\r\nJust start up Terminix with a locale that it is not translated to. E.g. `LC_ALL=hu_HU.UTF-8 LANGUAGE= terminix`. The UI literally presents `switch-to-terminal-1`. Not good.\r\n\r\nAlso, translators are not being helped enough. E.g. they see `switch-to-terminal-1`, it's hard to come up with a consistent way of capitalizing the letters – how should they know, without seeing the English translation, whether it's preferably translated with fully lowercase, or uppercase initial, or uppercase initial at each word? Sure a language might decide to deviate from English, but at least there should be a reference. Even flavors of English, let's say Canadian, might easily get \"translated\" differently from the Americal one for no good reason.\r\n\r\nSometimes the ID is even less intuitive, e.g. `switch-to-terminal-0` becomes `Switch To Terminal 10`, a translator shouldn't have to figure out that 0 stands for 10.\r\n\r\n`app` is translated to `Application`, `win` is translated as `Window` (a translator might believe it's the opposite of `lose`) etc.\r\n\r\nPlease stick to the convention and how gettext was designed: msgid should always be the American English UI string. en.po probably shouldn't exist since the American strings are hardcoded; if other spellings are available then they go to en_GB.po, en_CA.po etc.\r\n"}}