{"action":"created","issue":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/483","labels_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/483/labels{/name}","comments_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/483/comments","events_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/483/events","html_url":"https://github.com/aldeed/meteor-autoform/issues/483","id":50444768,"number":483,"title":"Autoform + i18n?","user":{"login":"SachaG","id":358832,"avatar_url":"https://avatars.githubusercontent.com/u/358832?v=3","gravatar_id":"","url":"https://api.github.com/users/SachaG","html_url":"https://github.com/SachaG","followers_url":"https://api.github.com/users/SachaG/followers","following_url":"https://api.github.com/users/SachaG/following{/other_user}","gists_url":"https://api.github.com/users/SachaG/gists{/gist_id}","starred_url":"https://api.github.com/users/SachaG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SachaG/subscriptions","organizations_url":"https://api.github.com/users/SachaG/orgs","repos_url":"https://api.github.com/users/SachaG/repos","events_url":"https://api.github.com/users/SachaG/events{/privacy}","received_events_url":"https://api.github.com/users/SachaG/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aldeed/meteor-autoform/labels/discussion","name":"discussion","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/milestones/1","html_url":"https://github.com/aldeed/meteor-autoform/milestones/Future%20-%20Needs%20Design","labels_url":"https://api.github.com/repos/aldeed/meteor-autoform/milestones/1/labels","id":985687,"number":1,"title":"Future - Needs Design","description":"","creator":{"login":"aldeed","id":3012067,"avatar_url":"https://avatars.githubusercontent.com/u/3012067?v=3","gravatar_id":"","url":"https://api.github.com/users/aldeed","html_url":"https://github.com/aldeed","followers_url":"https://api.github.com/users/aldeed/followers","following_url":"https://api.github.com/users/aldeed/following{/other_user}","gists_url":"https://api.github.com/users/aldeed/gists{/gist_id}","starred_url":"https://api.github.com/users/aldeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldeed/subscriptions","organizations_url":"https://api.github.com/users/aldeed/orgs","repos_url":"https://api.github.com/users/aldeed/repos","events_url":"https://api.github.com/users/aldeed/events{/privacy}","received_events_url":"https://api.github.com/users/aldeed/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":1,"state":"open","created_at":"2015-02-19T03:53:32Z","updated_at":"2015-04-23T14:48:01Z","due_on":null,"closed_at":null},"comments":24,"created_at":"2014-11-30T02:45:35Z","updated_at":"2015-10-16T15:51:22Z","closed_at":"2015-04-23T14:48:01Z","body":"It would be very nice to have a built-in integration with a package such as @theosp's [tap:i1n8](https://github.com/TAPevents/tap-i18n).\r\n\r\nFor example, maybe if an `i18n` option is set, Autoform could get the label via tap:i18n using the field name as key, instead of via the *label* option?"},"comment":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/comments/148752550","html_url":"https://github.com/aldeed/meteor-autoform/issues/483#issuecomment-148752550","issue_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/483","id":148752550,"user":{"login":"tcastelli","id":3498481,"avatar_url":"https://avatars.githubusercontent.com/u/3498481?v=3","gravatar_id":"","url":"https://api.github.com/users/tcastelli","html_url":"https://github.com/tcastelli","followers_url":"https://api.github.com/users/tcastelli/followers","following_url":"https://api.github.com/users/tcastelli/following{/other_user}","gists_url":"https://api.github.com/users/tcastelli/gists{/gist_id}","starred_url":"https://api.github.com/users/tcastelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcastelli/subscriptions","organizations_url":"https://api.github.com/users/tcastelli/orgs","repos_url":"https://api.github.com/users/tcastelli/repos","events_url":"https://api.github.com/users/tcastelli/events{/privacy}","received_events_url":"https://api.github.com/users/tcastelli/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T15:51:22Z","updated_at":"2015-10-16T15:51:22Z","body":"after updating to 5.7.1, the previous trick to implement language switch is no longer working, any idea of what happened? (Reverting to 5.4.0 makes it work again)\r\n````javascrip\r\ngetLabelsFor = (schema, name, sessionLanguage) ->\r\n  labels = {}\r\n  for fieldName in schema._schemaKeys\r\n    i18n_key = name.charAt(0).toLowerCase() + name.slice(1) + \".\" + fieldName.split(\".$\").join(\"\")\r\n    # console.log \"schema:  \" + name + \"  fieldName:  \" + fieldName + \" i18nkey: \" + i18n_key\r\n    translation = i18n.t(i18n_key)\r\n    if new RegExp('string').test(translation) isnt true and translation isnt i18n_key\r\n      # schema._schema[fieldName].label =  i18n.t(i18n_key)\r\n      labels[fieldName] = translation\r\n  return labels\r\n````\r\n"}}