{"action":"created","issue":{"url":"https://api.github.com/repos/ChurchCRM/CRM/issues/1384","repository_url":"https://api.github.com/repos/ChurchCRM/CRM","labels_url":"https://api.github.com/repos/ChurchCRM/CRM/issues/1384/labels{/name}","comments_url":"https://api.github.com/repos/ChurchCRM/CRM/issues/1384/comments","events_url":"https://api.github.com/repos/ChurchCRM/CRM/issues/1384/events","html_url":"https://github.com/ChurchCRM/CRM/issues/1384","id":190064457,"number":1384,"title":"Updated javascript : Include/Header-function.php","user":{"login":"phili67","id":20263693,"avatar_url":"https://avatars.githubusercontent.com/u/20263693?v=3","gravatar_id":"","url":"https://api.github.com/users/phili67","html_url":"https://github.com/phili67","followers_url":"https://api.github.com/users/phili67/followers","following_url":"https://api.github.com/users/phili67/following{/other_user}","gists_url":"https://api.github.com/users/phili67/gists{/gist_id}","starred_url":"https://api.github.com/users/phili67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phili67/subscriptions","organizations_url":"https://api.github.com/users/phili67/orgs","repos_url":"https://api.github.com/users/phili67/repos","events_url":"https://api.github.com/users/phili67/events{/privacy}","received_events_url":"https://api.github.com/users/phili67/received_events","type":"User","site_admin":false},"labels":[{"id":177527235,"url":"https://api.github.com/repos/ChurchCRM/CRM/labels/bug","name":"bug","color":"fc2929","default":true},{"id":293669536,"url":"https://api.github.com/repos/ChurchCRM/CRM/labels/development","name":"development","color":"006b75","default":false},{"id":476486739,"url":"https://api.github.com/repos/ChurchCRM/CRM/labels/Localization","name":"Localization","color":"873600","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-17T14:37:38Z","updated_at":"2016-11-20T16:27:54Z","closed_at":null,"body":"Ok to get the localization to work correctly :\r\n\r\n```\r\nwindow.CRM.VerifyThenLoadAPIContent = function(url) {\r\n      var error = \"<?=gettext(\"There was a problem retrieving the requested object\") ?>\";\r\n      $.ajax({\r\n        type: 'HEAD',\r\n        url: url,\r\n        async: false,\r\n        statusCode: {\r\n          200: function() {\r\n            window.open(url);\r\n          },\r\n          404: function() {\r\n            window.CRM.DisplayErrorMessage(url, error);\r\n          },\r\n          500: function() {\r\n            window.CRM.DisplayErrorMessage(url, error);\r\n          }\r\n        }\r\n      });\r\n    };\r\n```"},"comment":{"url":"https://api.github.com/repos/ChurchCRM/CRM/issues/comments/261788172","html_url":"https://github.com/ChurchCRM/CRM/issues/1384#issuecomment-261788172","issue_url":"https://api.github.com/repos/ChurchCRM/CRM/issues/1384","id":261788172,"user":{"login":"DawoudIO","id":554959,"avatar_url":"https://avatars.githubusercontent.com/u/554959?v=3","gravatar_id":"","url":"https://api.github.com/users/DawoudIO","html_url":"https://github.com/DawoudIO","followers_url":"https://api.github.com/users/DawoudIO/followers","following_url":"https://api.github.com/users/DawoudIO/following{/other_user}","gists_url":"https://api.github.com/users/DawoudIO/gists{/gist_id}","starred_url":"https://api.github.com/users/DawoudIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DawoudIO/subscriptions","organizations_url":"https://api.github.com/users/DawoudIO/orgs","repos_url":"https://api.github.com/users/DawoudIO/repos","events_url":"https://api.github.com/users/DawoudIO/events{/privacy}","received_events_url":"https://api.github.com/users/DawoudIO/received_events","type":"User","site_admin":false},"created_at":"2016-11-20T16:27:54Z","updated_at":"2016-11-20T16:27:54Z","body":"the fix is not to change the translation but to switch every where in the code.\r\n\r\n`      var error = '<?=gettext(\"There was a problem retrieving the requested object\") ?>'; `\r\nto\r\n`      var error = \"<?=gettext(\"There was a problem retrieving the requested object\") ?>\";`"}}
{"actor":{"display_login":"DawoudIO"}}