Closed andreasmeer closed 8 years ago
Hmm, I can't think that there should be a particular problem with Angular, although haven't tested it myself.
Have you tried looking in the Network tab of the web browser debugger to see what is in the responses? What precisely are you getting e.g. are you getting raw nuggets with nugget markup?
The views are displayed without [[[]]],
html:
<a href="#/addartist" class="btn btn-circle btn-default"> <i class="fa fa-plus"></i> [[[Neuer Künstler]]] </a>
Chrome Network:
<a href="#/addartist" class="btn btn-circle btn-default"> <i class="fa fa-plus"></i> Neuer Künstler </a>
The fact that the nugget-markup is being stripped suggests i18n is working okay.
Would you show what the URLs are: for the initial html resource request and any subsequent requests made by angular for the template html resource.
I have a small Angular app created and is releasing on GitHub . Here the texts are in the Navigation Translated , but as with my Great Application the html views not .
I am experiencing the same issue.
In a AngularJS controller I have the following code:
$scope.title = "[[[Upload Boundaries]]]";
This gets used in a View with the following code:
<span>{{$title}}</span>
The resulting HTML is:
<span>Upload Boundaries</span>
postBuild.exe does not seem to pick up the [[[Upload Boundaries]]] in AngularJS controller file. I can see this from the section within messages.po where it picks it up in other files.
All other translations within the View's HTML are working.
So it appears to be picking up the [[[ and ]]] because it is removing them. But it's not doing the actual translation.
Would you confirm the encoding of the JS file containing the Angular controller. If it isn't UTF-8 can you try that?
It was encoded as UTF-8-BOM as per Notepad++.
I have now saved it as UTF-8, rebuilt, and the same still happens.
To confirm then:
locale/messages.pot
file?messages.pot
?Your mention of the directory tree made me recheck the web.config file.
Turns out if I whitelist *.js as well, the postBuild now picks up the placeholder in the controller file and puts it in the messages.pot file. I just assumed if I didn't blacklist it, it would be checked.
So all works as intended. Thank you for taking the time to respond. My apologies for wasting your time.
No problem, I'm glad it works.
If the language is given with the calling of a Angular Views, the languages are loaded correctly . :)
Now it's working. :D
I have a AngularJS App, the translations in the controllers function properly. The translations in the Template Views (html files) are not displayed. Is there a solution ? Here the white and black list in the web.config.
Sorry for my terrible English.