{"action":"created","issue":{"url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/891","repository_url":"https://api.github.com/repos/kobotoolbox/enketo-express","labels_url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/891/labels{/name}","comments_url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/891/comments","events_url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/891/events","html_url":"https://github.com/kobotoolbox/enketo-express/issues/891","id":280726930,"number":891,"title":"Off-line mode fails in Swedish on Android/iOS","user":{"login":"niklaslj","id":5328476,"avatar_url":"https://avatars2.githubusercontent.com/u/5328476?v=4","gravatar_id":"","url":"https://api.github.com/users/niklaslj","html_url":"https://github.com/niklaslj","followers_url":"https://api.github.com/users/niklaslj/followers","following_url":"https://api.github.com/users/niklaslj/following{/other_user}","gists_url":"https://api.github.com/users/niklaslj/gists{/gist_id}","starred_url":"https://api.github.com/users/niklaslj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklaslj/subscriptions","organizations_url":"https://api.github.com/users/niklaslj/orgs","repos_url":"https://api.github.com/users/niklaslj/repos","events_url":"https://api.github.com/users/niklaslj/events{/privacy}","received_events_url":"https://api.github.com/users/niklaslj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-09T15:09:53Z","updated_at":"2017-12-09T22:01:50Z","closed_at":null,"author_association":"NONE","body":"When reloading a form without Internet connection the load is failing. \r\n`Loading Error` / `Alert` is displayed in an dialog box and no form is opened.\r\nThe problem occurs only when the browser is requesting the page in swedish and only on mobile devices (both Andriod/Chrome and iOS/Safari).\r\nWorks fine in english browsers even mobile. Also works in swedish in Win10/Chrome as far as I have been able to test.\r\nSeems the translation tables is not loaded for offline use.\r\n\r\nTested with the form [https://enke.to/_#widgets]( https://enke.to/_#widgets) that is running Enketo 1.55.5. Same error in Enketo 1.55.2.\r\n\r\nChrome console snippet from offline use:\r\n`enketo-webform-bundle.min.js:1 GET https://enke.to/locales/sv/translation-combined.json net::ERR_INTERNET_DISCONNECTED`\r\n`enketo-webform-bundle.min.js:1 [\"failed parsing /locales/sv/translation-combined.json to json\"] undefined`\r\n`[\"failed parsing /locales/sv/translation-combined.json to json\"]`\r\n\r\n_My problem is that firemen all over Sweden is now stucked when doing home visits to inspect smoke detectors. Very important work around Christmas!\r\nBegging for a quick fix!_"},"comment":{"url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/comments/350508682","html_url":"https://github.com/kobotoolbox/enketo-express/issues/891#issuecomment-350508682","issue_url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/891","id":350508682,"user":{"login":"niklaslj","id":5328476,"avatar_url":"https://avatars2.githubusercontent.com/u/5328476?v=4","gravatar_id":"","url":"https://api.github.com/users/niklaslj","html_url":"https://github.com/niklaslj","followers_url":"https://api.github.com/users/niklaslj/followers","following_url":"https://api.github.com/users/niklaslj/following{/other_user}","gists_url":"https://api.github.com/users/niklaslj/gists{/gist_id}","starred_url":"https://api.github.com/users/niklaslj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklaslj/subscriptions","organizations_url":"https://api.github.com/users/niklaslj/orgs","repos_url":"https://api.github.com/users/niklaslj/repos","events_url":"https://api.github.com/users/niklaslj/events{/privacy}","received_events_url":"https://api.github.com/users/niklaslj/received_events","type":"User","site_admin":false},"created_at":"2017-12-09T22:01:50Z","updated_at":"2017-12-09T22:01:50Z","author_association":"NONE","body":"Deeper investigations hints that the problem is related to the problem when the browser gives the `Accept-Language:` in the form language-region, i.e. `sv-SE` instead of only language, i.e. `fr`. \r\nUsing Android/FireFox, that allows easy language change, and trying some languages  with and without region attachment the following visualizes:\r\nGerman (language code: `de`) works\r\nFrench (language code: `fr`) works \r\nSpanish (language code: `es-ES`): fails\r\nSwedish (language code: `sv-SE`): fails\r\n\r\nTesting offline on  Win10:\r\nChrome, Swedish (language code: `sv`): works\r\nEdge, Swedish (language code: `sv-SE`): fails\r\n\r\nMy theory is that this is residues from the earlier bug when handling language codes.\r\nWhen offline mode is handled in the browser the cached translation table is named \"sv\", but the language code from the browser asks for \"sv-SE\".\r\n\r\n_Hope this will help you to find the bug!_\r\n"}}
{"actor":{"display_login":"niklaslj"}}