{"action":"created","issue":{"url":"https://api.github.com/repos/i18next/react-i18next/issues/503","repository_url":"https://api.github.com/repos/i18next/react-i18next","labels_url":"https://api.github.com/repos/i18next/react-i18next/issues/503/labels{/name}","comments_url":"https://api.github.com/repos/i18next/react-i18next/issues/503/comments","events_url":"https://api.github.com/repos/i18next/react-i18next/issues/503/events","html_url":"https://github.com/i18next/react-i18next/issues/503","id":356392820,"node_id":"MDU6SXNzdWUzNTYzOTI4MjA=","number":503,"title":"Imported static field translation does not reevaluate","user":{"login":"Elminday","id":14983636,"node_id":"MDQ6VXNlcjE0OTgzNjM2","avatar_url":"https://avatars0.githubusercontent.com/u/14983636?v=4","gravatar_id":"","url":"https://api.github.com/users/Elminday","html_url":"https://github.com/Elminday","followers_url":"https://api.github.com/users/Elminday/followers","following_url":"https://api.github.com/users/Elminday/following{/other_user}","gists_url":"https://api.github.com/users/Elminday/gists{/gist_id}","starred_url":"https://api.github.com/users/Elminday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elminday/subscriptions","organizations_url":"https://api.github.com/users/Elminday/orgs","repos_url":"https://api.github.com/users/Elminday/repos","events_url":"https://api.github.com/users/Elminday/events{/privacy}","received_events_url":"https://api.github.com/users/Elminday/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-03T07:46:23Z","updated_at":"2018-09-03T07:50:30Z","closed_at":null,"author_association":"NONE","body":"To create translations for my form I use exported fields:\r\n```\r\n// ProfilesFormConfig\r\nimport i18n from '~/shared/i18n';\r\n\r\nclass ProfilesFormConfig {\r\n  static fields = {\r\n    name: {\r\n      label: i18n.t(`${MODULE.PROFILE}:label.name`),\r\n    },\r\n  };\r\n}\r\n```\r\nand import it here:\r\n\r\n```\r\n// FormConfigFactory\r\nimport ProfilesFormConfig from '~/shared/form/config/ProfilesFormConfig';\r\n\r\ncreate() {\r\n  console.log(i18n.languages[0]); // 'lt'\r\n  console.log(ProfilesFormConfig.fields.name.label); 'en translation, expect lt'\r\n}\r\n```\r\n\r\n\r\nHow can this be solved so that my imported fields are reevaluated on create function?\r\n"},"comment":{"url":"https://api.github.com/repos/i18next/react-i18next/issues/comments/418030893","html_url":"https://github.com/i18next/react-i18next/issues/503#issuecomment-418030893","issue_url":"https://api.github.com/repos/i18next/react-i18next/issues/503","id":418030893,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODAzMDg5Mw==","user":{"login":"jamuhl","id":977772,"node_id":"MDQ6VXNlcjk3Nzc3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/977772?v=4","gravatar_id":"","url":"https://api.github.com/users/jamuhl","html_url":"https://github.com/jamuhl","followers_url":"https://api.github.com/users/jamuhl/followers","following_url":"https://api.github.com/users/jamuhl/following{/other_user}","gists_url":"https://api.github.com/users/jamuhl/gists{/gist_id}","starred_url":"https://api.github.com/users/jamuhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamuhl/subscriptions","organizations_url":"https://api.github.com/users/jamuhl/orgs","repos_url":"https://api.github.com/users/jamuhl/repos","events_url":"https://api.github.com/users/jamuhl/events{/privacy}","received_events_url":"https://api.github.com/users/jamuhl/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T07:50:30Z","updated_at":"2018-09-03T07:50:30Z","author_association":"MEMBER","body":"or just use keys there and during render:\r\n\r\n`console.log(t(ProfilesFormConfig.fields.name.label));`"}}
{"actor":{"display_login":"jamuhl"}}