Skip to content
New issue

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

Added fallback to node.data to support server side translations via T… #378

Closed
wants to merge 3 commits into from
Closed

Added fallback to node.data to support server side translations via T… #378

wants to merge 3 commits into from

Conversation

ilDon
Copy link

@ilDon ilDon commented Dec 30, 2016

Fix to make TranslateDirective work server side, see issue #377

}
node.currentValue = isDefined(res) ? res : (node.originalContent || key);
// we replace in the original content to preserve spaces that we might have trimmed
node.textContent = this.key ? node.currentValue : node.originalContent.replace(key, node.currentValue);
if(node.textContent) node.textContent = this.key ? node.currentValue : node.originalContent.replace(key, node.currentValue);
else node.data = _this.key ? node.currentValue : node.originalContent.replace(key, node.currentValue);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_this is undefined, that's why travis fails

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! copy+paste from working file, my bad...

@ocombe
Copy link
Member

ocombe commented Dec 30, 2016

Thanks ! Can you fix the error ?

@ilDon
Copy link
Author

ilDon commented Dec 30, 2016

Done :-)

@ocombe ocombe added this to the 6.0.0 milestone Feb 3, 2017
@ilDon
Copy link
Author

ilDon commented Mar 8, 2017

I can confirm that this issue is still present in v. 6.x.x and that the PR I had submitted still fixes it. Do you know if you will be able to merge?

@ocombe ocombe closed this in 54aba57 Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants