Client-side translation for the About and Dashboard modules.

This commit is contained in:
Dave Page
2017-03-22 12:57:59 +00:00
parent 90a369b7de
commit 5b12fd6d5f
2 changed files with 70 additions and 70 deletions

View File

@@ -1,6 +1,6 @@
define(
['jquery', 'alertify', 'pgadmin'],
function($, alertify, pgAdmin) {
['jquery', 'alertify', 'pgadmin', 'sources/translate'],
function($, alertify, pgAdmin, t) {
pgAdmin = pgAdmin || window.pgAdmin || {};
/* Return back, this has been called more than once */
@@ -18,7 +18,7 @@ define(
},
setup: function() {
return {
buttons:[{ text: "OK", key: 27, className: "btn btn-primary" }],
buttons:[{ text: t("OK"), key: 27, className: "btn btn-primary" }],
options: {
modal: false,
resizable: true,
@@ -41,7 +41,7 @@ define(
var content = '';
$.get("{{ url_for('about.index') }}",
function(data) {
alertify.aboutDialog('About {{ config.APP_NAME }}', data).resizeTo(800, 450);
alertify.aboutDialog(t("About %(appname)s", {appname: "{{ config.APP_NAME }}"}), data).resizeTo(800, 450);
});
}
};