Skip to content

Commit

Permalink
Fix bug 1384846: Fix diff view for FTL strings (#649)
Browse files Browse the repository at this point in the history
This worked for all formats except for FTL, because getSimplePreview()
returns the fallback value for them, which is passed as the second
argument.

For FTL strings we need to generate their presentation using their
source, which is passed as the first argument. Since the same argument
was passed for the base string and the translate string, the diff
was always empty.
  • Loading branch information
mathjazz committed Jul 27, 2017
1 parent 1428e84 commit 004e092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pontoon/base/static/js/translate.js
Expand Up @@ -269,7 +269,7 @@ var Pontoon = (function (my) {
success: function(data) {
if (data.length) {
$.each(data, function(i) {
var baseString = self.fluent.getSimplePreview(this, data[0].string, entity);
var baseString = self.fluent.getSimplePreview(data[0], data[0].string, entity),
translationString = self.fluent.getSimplePreview(this, this.string, entity);

list.append(
Expand Down

0 comments on commit 004e092

Please sign in to comment.