Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
fix(directive): make translate-values interpolate correctly with newe…
Browse files Browse the repository at this point in the history
…r MessageFormat.js
  • Loading branch information
tspaeth authored and knalli committed Apr 9, 2015
1 parent 2533f2d commit 887dc1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/directive/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ angular.module('pascalprecht.translate')
scope.postText = '';
var translationIds = {};

// initial setup
if (iAttr.translateValues) {
angular.extend(scope.interpolateParams, $parse(iAttr.translateValues)(scope.$parent));
}

// Ensures any change of the attribute "translate" containing the id will
// be re-stored to the scope's "translationId".
// If the attribute has no content, the element's text value (white spaces trimmed off) will be used.
Expand Down

0 comments on commit 887dc1b

Please sign in to comment.