{"action":"opened","issue":{"url":"https://api.github.com/repos/c2corg/v6_ui/issues/195","repository_url":"https://api.github.com/repos/c2corg/v6_ui","labels_url":"https://api.github.com/repos/c2corg/v6_ui/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/c2corg/v6_ui/issues/195/comments","events_url":"https://api.github.com/repos/c2corg/v6_ui/issues/195/events","html_url":"https://github.com/c2corg/v6_ui/issues/195","id":136077840,"number":195,"title":"Alias for the \"translate\" directive that would not be extracted","user":{"login":"asaunier","id":1192331,"avatar_url":"https://avatars.githubusercontent.com/u/1192331?v=3","gravatar_id":"","url":"https://api.github.com/users/asaunier","html_url":"https://github.com/asaunier","followers_url":"https://api.github.com/users/asaunier/followers","following_url":"https://api.github.com/users/asaunier/following{/other_user}","gists_url":"https://api.github.com/users/asaunier/gists{/gist_id}","starred_url":"https://api.github.com/users/asaunier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaunier/subscriptions","organizations_url":"https://api.github.com/users/asaunier/orgs","repos_url":"https://api.github.com/users/asaunier/repos","events_url":"https://api.github.com/users/asaunier/events{/privacy}","received_events_url":"https://api.github.com/users/asaunier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-24T14:32:26Z","updated_at":"2016-02-24T14:32:26Z","closed_at":null,"body":"When translating data that are for instance provided by the API (using a mako variable or some angular expression), one cannot use the usual ``translate`` directive because then the variable is added to PO files by the translations extracting tool.\r\n\r\nA workaround is to use ``{{mainCtrl.translate('${some_variable}')}}`` since it is not recognized by the extractor. The downside is that we have ``{{ }}`` that appear in the page until the translation is done, wich is ugly.\r\n\r\nA solution would be to have an alias for the usual ``translate`` directive that could be use the same way but won't be \"extracted\" to the PO files.\r\n\r\n@tsauerwein has suggested to write something like\r\n```\r\napp.module.directive('translate-enum', angular.module('gettext').directive('translate'));\r\n```\r\n\r\nbut I get an Closure compiler error:\r\n> ERROR - actual parameter 2 of angular.Module.prototype.directive does not match formal parameter\r\nERR! compile found   : angular.Module\r\nERR! compile required: (Array<(Function|null|string)>|Function|null|undefined)\r\nERR! compile app.module.directive('translate-enum', angular.module('gettext').directive('translate'));\r\n\r\n"}}