{"action":"created","issue":{"url":"https://api.github.com/repos/carlosperate/ardublockly/issues/67","repository_url":"https://api.github.com/repos/carlosperate/ardublockly","labels_url":"https://api.github.com/repos/carlosperate/ardublockly/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/carlosperate/ardublockly/issues/67/comments","events_url":"https://api.github.com/repos/carlosperate/ardublockly/issues/67/events","html_url":"https://github.com/carlosperate/ardublockly/issues/67","id":147128416,"number":67,"title":"Translation of typeName required","user":{"login":"bmcage","id":1011414,"avatar_url":"https://avatars.githubusercontent.com/u/1011414?v=3","gravatar_id":"","url":"https://api.github.com/users/bmcage","html_url":"https://github.com/bmcage","followers_url":"https://api.github.com/users/bmcage/followers","following_url":"https://api.github.com/users/bmcage/following{/other_user}","gists_url":"https://api.github.com/users/bmcage/gists{/gist_id}","starred_url":"https://api.github.com/users/bmcage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmcage/subscriptions","organizations_url":"https://api.github.com/users/bmcage/orgs","repos_url":"https://api.github.com/users/bmcage/repos","events_url":"https://api.github.com/users/bmcage/events{/privacy}","received_events_url":"https://api.github.com/users/bmcage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-09T13:16:32Z","updated_at":"2016-04-11T06:28:37Z","closed_at":null,"body":"I see quite some code checking on typeName, and not on typeKey.\r\n\r\nI want to translate typeName, as that is always English in the currect method.\r\nI see \r\n\r\n      typesArray.push([Blockly.Types[typeKey].typeName, typeKey]);\r\n\r\nSo from a selection in the dropdown of the cast block typeKey is returned. However, a grep search on typeName show it used a lot, eg in arduino.js, `switch (typeBlockly.typeName) { `\r\n\r\nSo, how to translate. Will changing in types.js \r\n\r\n      typeName: 'Character',\r\n\r\ninto \r\n\r\n      typeName: Blockly.Msg.ARD_TYPE_CHARACTER,\r\n\r\nand then the translations everywhere just work ?\r\n"},"comment":{"url":"https://api.github.com/repos/carlosperate/ardublockly/issues/comments/208182157","html_url":"https://github.com/carlosperate/ardublockly/issues/67#issuecomment-208182157","issue_url":"https://api.github.com/repos/carlosperate/ardublockly/issues/67","id":208182157,"user":{"login":"bmcage","id":1011414,"avatar_url":"https://avatars.githubusercontent.com/u/1011414?v=3","gravatar_id":"","url":"https://api.github.com/users/bmcage","html_url":"https://github.com/bmcage","followers_url":"https://api.github.com/users/bmcage/followers","following_url":"https://api.github.com/users/bmcage/following{/other_user}","gists_url":"https://api.github.com/users/bmcage/gists{/gist_id}","starred_url":"https://api.github.com/users/bmcage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmcage/subscriptions","organizations_url":"https://api.github.com/users/bmcage/orgs","repos_url":"https://api.github.com/users/bmcage/repos","events_url":"https://api.github.com/users/bmcage/events{/privacy}","received_events_url":"https://api.github.com/users/bmcage/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T06:28:37Z","updated_at":"2016-04-11T06:28:37Z","body":"yes.\r\nMy suggestion would be to replace\r\n\r\n    typesArray.push([Blockly.Types[typeKey].typeName, typeKey]);\r\n\r\nby\r\n\r\n    typesArray.push([Blockly.Types[typeKey].selectName, typeKey]);\r\n\r\nand then when making a type selectName is translatable, so from Blockly.Msg.....\r\n\r\nOn the other hand, the switch statement on typeName could perhaps be changed to a switch based on an enum or classname or ... Once typeName is no longer exposed in the GUI,it seems a bit stupid to still use something like _typeName: 'Short Positive Number'_ in a switch statement."}}