From 004e092f9baf292c50343d10347137c6804aac9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matja=C5=BE=20Horvat?= Date: Thu, 27 Jul 2017 20:41:05 +0200 Subject: [PATCH] Fix bug 1384846: Fix diff view for FTL strings (#649) 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. --- pontoon/base/static/js/translate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pontoon/base/static/js/translate.js b/pontoon/base/static/js/translate.js index a144f9f3c3..fa69846ae7 100644 --- a/pontoon/base/static/js/translate.js +++ b/pontoon/base/static/js/translate.js @@ -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(