{"action":"created","issue":{"url":"https://api.github.com/repos/rubenv/angular-gettext/issues/354","repository_url":"https://api.github.com/repos/rubenv/angular-gettext","labels_url":"https://api.github.com/repos/rubenv/angular-gettext/issues/354/labels{/name}","comments_url":"https://api.github.com/repos/rubenv/angular-gettext/issues/354/comments","events_url":"https://api.github.com/repos/rubenv/angular-gettext/issues/354/events","html_url":"https://github.com/rubenv/angular-gettext/issues/354","id":322306409,"node_id":"MDU6SXNzdWUzMjIzMDY0MDk=","number":354,"title":"Custom attributes translation extracts inner html instead of attribute value","user":{"login":"aszczepanek","id":785741,"node_id":"MDQ6VXNlcjc4NTc0MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/785741?v=4","gravatar_id":"","url":"https://api.github.com/users/aszczepanek","html_url":"https://github.com/aszczepanek","followers_url":"https://api.github.com/users/aszczepanek/followers","following_url":"https://api.github.com/users/aszczepanek/following{/other_user}","gists_url":"https://api.github.com/users/aszczepanek/gists{/gist_id}","starred_url":"https://api.github.com/users/aszczepanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aszczepanek/subscriptions","organizations_url":"https://api.github.com/users/aszczepanek/orgs","repos_url":"https://api.github.com/users/aszczepanek/repos","events_url":"https://api.github.com/users/aszczepanek/events{/privacy}","received_events_url":"https://api.github.com/users/aszczepanek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-11T13:56:21Z","updated_at":"2018-06-14T16:21:29Z","closed_at":null,"author_association":"NONE","body":"Configuration:\r\n`{\r\n    attributes: [\"title\"]\r\n}`\r\n\r\n\r\n\r\nExample html:\r\n`<div title=\"Some hint for user\">\r\n    <div>Header</div>\r\n    <div>Some content to read</div>\r\n< /div>`\r\n\r\nCurrent implementation will extract inner html (`<div>Header...`) instead of title attribute value, probably because of this lines:\r\n`if (possibleAttributes.indexOf(attr) > -1) {`\r\n`                        var attrValue = extracted[attr];`\r\n`                        str = node.html(); // this shouldn't be necessary, but it is`\r\n`                        self.addString(reference(n.startIndex), str || getAttr(attr) || '', attrValue.plural, attrValue.extractedComment, attrValue.context);`\r\n`}`\r\n\r\nIt works only for attributes on elements without closing tag like input:\r\n`<input type=\"text\" placeholder=\"This text can be extracted\" title=\"This text can also be extracted\">`\r\n\r\nThere is no </input> tag so node.html() returns nothing so getAttr can execute."},"comment":{"url":"https://api.github.com/repos/rubenv/angular-gettext/issues/comments/397354740","html_url":"https://github.com/rubenv/angular-gettext/issues/354#issuecomment-397354740","issue_url":"https://api.github.com/repos/rubenv/angular-gettext/issues/354","id":397354740,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzM1NDc0MA==","user":{"login":"dakk","id":1060425,"node_id":"MDQ6VXNlcjEwNjA0MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1060425?v=4","gravatar_id":"","url":"https://api.github.com/users/dakk","html_url":"https://github.com/dakk","followers_url":"https://api.github.com/users/dakk/followers","following_url":"https://api.github.com/users/dakk/following{/other_user}","gists_url":"https://api.github.com/users/dakk/gists{/gist_id}","starred_url":"https://api.github.com/users/dakk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakk/subscriptions","organizations_url":"https://api.github.com/users/dakk/orgs","repos_url":"https://api.github.com/users/dakk/repos","events_url":"https://api.github.com/users/dakk/events{/privacy}","received_events_url":"https://api.github.com/users/dakk/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T16:21:29Z","updated_at":"2018-06-14T16:21:29Z","author_association":"NONE","body":"@aszczepanek did you fixed this problem?"}}
{"actor":{"display_login":"dakk"}}