Skip to content

Commit 6976f6b

Browse files
Add link to Google Translate in ui as target="_blank"
Allows for a quick click to see a potential localization.
1 parent e2300cb commit 6976f6b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

msgfmt:ui/lib/client.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ Template.mfTransLang.helpers({
288288
if (routeName) str.routeUrl = routePathFromName(routeName);
289289
}
290290
return str || {};
291+
},
292+
encodeURIComponent : function(text) {
293+
return encodeURIComponent(text);
291294
}
292295
});
293296

msgfmt:ui/lib/ui.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ <h2>{{mf 'mf_site_translations' 'Site Translations'}}</h2>
100100
</span><br />
101101
<textarea id="mfTransOrig" readonly>{{mfTransOrig}}</textarea>
102102
<textarea id="mfTransDest">{{mfTransTrans}}</textarea>
103-
103+
<a href='https://translate.google.com/#{{origLang}}/{{destLang}}/{{encodeURIComponent mfTransOrig}}' target='_blank'>
104+
Google Translate?
105+
</a>
104106
<br /><br />
105107
<p>
106108
<a href="/translate">Back to Translation Summary</a>

0 commit comments

Comments
 (0)