We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have an attribute, <a content="{{expand ? 'a.' : 'b.'}}"> I want add a 'translate', then get a pot file contains "a" and "b". How can I do it?
<a content="{{expand ? 'a.' : 'b.'}}">
The text was updated successfully, but these errors were encountered:
Not ideal, but there's an approach that works:
Put them on the scope and translate from directly.
$scope.a = gettext('a.'); $scope.b = gettext('b.');
The gettext() wrapper is key to annotate the strings for translation.
gettext()
And somewhere (we put it on the root scope):
$scope.translate = gettextCatalog.getString;
This then becomes:
<a content="{{translate(expand ? a : b)}}">
More info: https://angular-gettext.rocketeer.be/dev-guide/annotate-js/
Sorry, something went wrong.
If you do the scope annotation then you can use the filter on the view btw
No branches or pull requests
I have an attribute,
<a content="{{expand ? 'a.' : 'b.'}}">
I want add a 'translate', then get a pot file contains "a" and "b". How can I do it?
The text was updated successfully, but these errors were encountered: