diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/js/table.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/js/table.js index 95464fe3c..50a9032b8 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/js/table.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/js/table.js @@ -159,7 +159,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) { return false; alertify.confirm( - S('{{ _('Are you sure you want to truncate table - %%s ?') }}').sprintf(d.label).value(), + S('{{ _('Are you sure you want to truncate table %s?') }}').sprintf(d.label).value(), function (e) { if (e) { var data = d; @@ -208,7 +208,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) { return false; alertify.confirm( - S('{{ _('Are you sure you want to reset table statistics - %%s ?') }}').sprintf(d.label).value(), + S('{{ _('Are you sure you want to reset table statistics for %s?') }}').sprintf(d.label).value(), function (e) { if (e) { var data = d; diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/js/databases.js b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/js/databases.js index 5d74661dc..34c3e050d 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/js/databases.js +++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/js/databases.js @@ -110,7 +110,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) { Alertify.confirm( '{{ _('Disconnect the database') }}', - S('{{ _('Are you sure you want to disconnect the database - %%s ?') }}').sprintf(d.label).value(), + S('{{ _('Are you sure you want to disconnect the database - %s?') }}').sprintf(d.label).value(), function(evt) { var data = d; $.ajax({ diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/servers.js b/web/pgadmin/browser/server_groups/servers/templates/servers/servers.js index 8ecfa3e64..1c8bff84b 100644 --- a/web/pgadmin/browser/server_groups/servers/templates/servers/servers.js +++ b/web/pgadmin/browser/server_groups/servers/templates/servers/servers.js @@ -181,8 +181,8 @@ function($, _, S, pgAdmin, pgBrowser, alertify) { return false; alertify.confirm( - '{{ _('Disconnect the server') }}', - S('{{ _('Are you sure you want to disconnect the server - %%s ?') }}').sprintf(d.label).value(), + '{{ _('Disconnect server') }}', + S('{{ _('Are you sure you want to disconnect the server %s?') }}').sprintf(d.label).value(), function(evt) { $.ajax({ url: obj.generate_url(i, 'connect', d, true), @@ -260,7 +260,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) { alertify.confirm( '{{ _('Reload server configuration') }}', - S('{{ _('Are you sure you want to reload the server configuration on %%s?') }}').sprintf(d.label).value(), + S('{{ _('Are you sure you want to reload the server configuration on %s?') }}').sprintf(d.label).value(), function(evt) { $.ajax({ url: obj.generate_url(i, 'reload', d, true), diff --git a/web/pgadmin/browser/templates/browser/js/collection.js b/web/pgadmin/browser/templates/browser/js/collection.js index 3a940030d..a6c1aab16 100644 --- a/web/pgadmin/browser/templates/browser/js/collection.js +++ b/web/pgadmin/browser/templates/browser/js/collection.js @@ -117,7 +117,7 @@ function($, _, S, pgAdmin, Backbone, Alertify, Backform) { Alertify.pgNotifier( error, jqxhr, S( - "{{ _("Error retrieving the properties - %%s.") }}" + "{{ _("Error retrieving properties: %s.") }}" ).sprintf(message).value() ); }); diff --git a/web/pgadmin/browser/templates/browser/js/messages.js b/web/pgadmin/browser/templates/browser/js/messages.js index 30d420460..75d1d1f85 100644 --- a/web/pgadmin/browser/templates/browser/js/messages.js +++ b/web/pgadmin/browser/templates/browser/js/messages.js @@ -14,10 +14,10 @@ function(_, S, pgAdmin) { 'SQL_TAB': '{{ _('SQL') }}', 'SQL_INCOMPLETE': '{{ _('Incomplete definition') }}', 'SQL_NO_CHANGE': '-- ' + '{{ _('Nothing changed')|safe }}', - 'MUST_BE_INT' : "{{ _("'%%s' must be an integer.")|safe }}", - 'MUST_BE_NUM' : "{{ _("'%%s' must be a numeric.")|safe }}", - 'MUST_GR_EQ' : "{{ _("'%%s' must be greater than or equal to %%d.")|safe }}", - 'MUST_LESS_EQ' : "{{ _("'%%s' must be less than or equal to %%d.")|safe }}", + 'MUST_BE_INT' : "{{ _("'%s' must be an integer.")|safe }}", + 'MUST_BE_NUM' : "{{ _("'%s' must be a numeric.")|safe }}", + 'MUST_GR_EQ' : "{{ _("'%s' must be greater than or equal to %d.")|safe }}", + 'MUST_LESS_EQ' : "{{ _("'%s' must be less than or equal to %d.")|safe }}", 'STATISTICS_LABEL': "{{ _("Statistics") }}", 'STATISTICS_VALUE_LABEL': "{{ _("Value") }}", 'NODE_HAS_NO_SQL': "{{ _("No SQL could be generated for the selected object.") }}", diff --git a/web/pgadmin/browser/templates/browser/js/node.js b/web/pgadmin/browser/templates/browser/js/node.js index 955ad950a..e11665915 100644 --- a/web/pgadmin/browser/templates/browser/js/node.js +++ b/web/pgadmin/browser/templates/browser/js/node.js @@ -126,7 +126,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { _.each(self.hasScriptTypes, function(stype) { var type_label = S( - "{{ _("%%s Script") }}" + "{{ _("%s Script") }}" ).sprintf(stype.toUpperCase()).value(), stype = stype.toLowerCase(); @@ -284,7 +284,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { Alertify.pgNotifier( error, jqxhr, S( - "{{ _("Error retrieving the properties - %%s.") }}" + "{{ _("Error retrieving properties: %s.") }}" ).sprintf(message).value() ); }); @@ -437,7 +437,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { if (!d) return; - l = S('{{ _("Create - %%s") }}').sprintf( + l = S('{{ _("Create - %s") }}').sprintf( [this.label]).value(); p = addPanel(); @@ -454,14 +454,14 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { **/ var mode = p.$container.attr('action-mode'); if (mode) { - var msg = '{{ _('Are you sure want to stop editing the properties of the %%s - "%%s"?') }}'; + var msg = '{{ _('Are you sure want to stop editing the properties of %s "%s"?') }}'; if (args.action == 'edit') { - msg = '{{ _('Are you sure want to reset the current changes and re-open the panel for %%s - "%%s"?') }}'; + msg = '{{ _('Are you sure want to reset the current changes and re-open the panel for %s "%s"?') }}'; } Alertify.confirm( '{{ _('Edit in progress?') }}', - S(msg).sprintf(o.label, d.label).value(), + S(msg).sprintf(o.label.toLowerCase(), d.label).value(), function() { setTimeout(function() { o.showProperties(i, d, p, args.action); @@ -509,9 +509,9 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { var msg, title; if (input.url == 'delete') { - msg = S('{{ _('Are you sure you want to drop %%s "%%s" and all the objects that depend on it?') }}') - .sprintf(obj.label, d.label).value(); - title = S('{{ _('DROP CASCADE %%s?') }}').sprintf(obj.label).value(); + msg = S('{{ _('Are you sure you want to drop %s "%s" and all the objects that depend on it?') }}') + .sprintf(obj.label.toLowerCase(), d.label).value(); + title = S('{{ _('DROP CASCADE %s?') }}').sprintf(obj.label).value(); if (!(_.isFunction(obj.canDropCascade) ? obj.canDropCascade.apply(obj, [d, i]) : obj.canDropCascade)) { @@ -524,9 +524,9 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { return; } } else { - msg = S('{{ _('Are you sure you want to drop %%s "%%s"?') }}') - .sprintf(obj.label, d.label).value(); - title = S('{{ _('DROP %%s?') }}').sprintf(obj.label).value(); + msg = S('{{ _('Are you sure you want to drop %s "%s"?') }}') + .sprintf(obj.label.toLowerCase(), d.label).value(); + title = S('{{ _('DROP %s?') }}').sprintf(obj.label).value(); if (!(_.isFunction(obj.canDrop) ? obj.canDrop.apply(obj, [d, i]) : obj.canDrop)) { @@ -572,7 +572,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { } catch (e) {} } pgBrowser.report_error( - S('{{ _('Error dropping %%s: "%%s"') }}') + S('{{ _('Error dropping %s: "%s"') }}') .sprintf(obj.label, objName) .value(), msg); } @@ -1057,7 +1057,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { Alertify.pgNotifier( "error", jqxhr, S( - "{{ _("Error saving properties: %%s") }}" + "{{ _("Error saving properties: %s") }}" ).sprintf(jqxhr.statusText).value() ); } diff --git a/web/pgadmin/misc/bgprocess/__init__.py b/web/pgadmin/misc/bgprocess/__init__.py index 89c523604..2897329de 100644 --- a/web/pgadmin/misc/bgprocess/__init__.py +++ b/web/pgadmin/misc/bgprocess/__init__.py @@ -55,7 +55,7 @@ class BGProcessModule(PgAdminModule): 'EXECUTION_TIME': _('Execution time'), 'running': _('Running...'), 'successfully_finished': _("Successfully completed."), - 'failed_with_exit_code': _("Failed (exit code: %%s).") + 'failed_with_exit_code': _("Failed (exit code: %s).") } diff --git a/web/pgadmin/tools/datagrid/templates/datagrid/index.html b/web/pgadmin/tools/datagrid/templates/datagrid/index.html index 16118877c..d1010bd8e 100644 --- a/web/pgadmin/tools/datagrid/templates/datagrid/index.html +++ b/web/pgadmin/tools/datagrid/templates/datagrid/index.html @@ -249,7 +249,7 @@ msg = data.errormsg; } catch (e) {} } pgBrowser.report_error( -S('{{ _('Error fetching sql for script: "%%s"') }}') +S('{{ _('Error fetching SQL for script: "%s"') }}') .sprintf(msg) .value(), msg); } diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js index 0e103ecf2..79c02c345 100644 --- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js +++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js @@ -1076,7 +1076,7 @@ define([ alertify.pgNotifier( "error", jqxhr, S( - "{{ _('Error saving properties: %%s') }}" + "{{ _('Error saving properties: %s') }}" ).sprintf(jqxhr.statusText).value() ); diff --git a/web/pgadmin/tools/import_export/templates/import_export/js/import_export.js b/web/pgadmin/tools/import_export/templates/import_export/js/import_export.js index 6758eccfd..11884992e 100644 --- a/web/pgadmin/tools/import_export/templates/import_export/js/import_export.js +++ b/web/pgadmin/tools/import_export/templates/import_export/js/import_export.js @@ -482,7 +482,7 @@ define( // Open the Alertify dialog for the import/export module Alertify.ImportDialog( S( - "{{ _("Import/Export data - table '%%s'") }}" + "{{ _("Import/Export data - table '%s'") }}" ).sprintf(treeInfo.table.label).value(), node, i, d ).set('resizable',true).resizeTo('70%','80%'); } diff --git a/web/pgadmin/tools/user_management/templates/user_management/js/user_management.js b/web/pgadmin/tools/user_management/templates/user_management/js/user_management.js index 74c3707eb..58facb121 100644 --- a/web/pgadmin/tools/user_management/templates/user_management/js/user_management.js +++ b/web/pgadmin/tools/user_management/templates/user_management/js/user_management.js @@ -167,14 +167,14 @@ define([ return errmsg; } else if (!!this.get('email') && !email_filter.test(this.get('email'))) { - errmsg = S("{{ _("Invalid Email id: %%s")}}").sprintf( + errmsg = S("{{ _("Invalid email address: %s.")}}").sprintf( this.get('email') ).value(); this.errorModel.set('email', errmsg); return errmsg; } else if (!!this.get('email') && this.collection.where({"email":this.get('email')}).length > 1) { - errmsg = S("{{ _("This email id %%s already exist.")}}").sprintf( + errmsg = S("{{ _("The email address %s already exists.")}}").sprintf( this.get('email') ).value(); @@ -188,7 +188,7 @@ define([ _.isNull(this.get('role')) || String(this.get('role')).replace(/^\s+|\s+$/g, '') == '')) { - errmsg = S("{{ _("Role cannot be empty for user %%s")}}").sprintf( + errmsg = S("{{ _("Role cannot be empty for user %s.")}}").sprintf( (this.get('email') || '') ).value(); @@ -204,7 +204,7 @@ define([ _.isNull(this.get('newPassword')) || this.get('newPassword') == '')) { - errmsg = S("{{ _("Password cannot be empty for user %%s")}}").sprintf( + errmsg = S("{{ _("Password cannot be empty for user %s.")}}").sprintf( (this.get('email') || '') ).value(); @@ -214,7 +214,7 @@ define([ !_.isNull(this.get('newPassword')) && this.get('newPassword').length < 6) { - errmsg = S("{{ _("Password must be at least 6 characters for user %%s")}}").sprintf( + errmsg = S("{{ _("Password must be at least 6 characters for user %s.")}}").sprintf( (this.get('email') || '') ).value(); @@ -228,7 +228,7 @@ define([ _.isNull(this.get('confirmPassword')) || this.get('confirmPassword') == '')) { - errmsg = S("{{ _("Confirm Password cannot be empty for user %%s")}}").sprintf( + errmsg = S("{{ _("Confirm Password cannot be empty for user %s.")}}").sprintf( (this.get('email') || '') ).value(); @@ -241,7 +241,7 @@ define([ if(!!this.get('newPassword') && !!this.get('confirmPassword') && this.get('newPassword') != this.get('confirmPassword')) { - errmsg = S("{{ _("Passwords do not match for user %%s")}}").sprintf( + errmsg = S("{{ _("Passwords do not match for user %s.")}}").sprintf( (this.get('email') || '') ).value(); @@ -271,7 +271,7 @@ define([ !this.get('newPassword') == '' && this.get('newPassword').length < 6) { - errmsg = S("{{ _("Password must be at least 6 characters for user %%s")}}").sprintf( + errmsg = S("{{ _("Password must be at least 6 characters for user %s.")}}").sprintf( (this.get('email') || '') ).value(); @@ -281,7 +281,7 @@ define([ _.isNull(this.get('confirmPassword')) || this.get('confirmPassword') == '') { - errmsg = S("{{ _("Confirm password cannot be empty for user %%s")}}").sprintf( + errmsg = S("{{ _("Confirm Password cannot be empty for user %s.")}}").sprintf( (this.get('email') || '') ).value(); @@ -290,7 +290,7 @@ define([ } else if (!!this.get('newPassword') && !!this.get('confirmPassword') && this.get('newPassword') != this.get('confirmPassword')) { - errmsg = S("{{ _("Passwords do not match for user %%s")}}").sprintf( + errmsg = S("{{ _("Passwords do not match for user %s.")}}").sprintf( (this.get('email') || '') ).value(); @@ -513,14 +513,14 @@ define([ 'confirmPassword':undefined}); m.startNewSession(); - alertify.success(S("{{_("User '%%s' saved.")|safe }}").sprintf( + alertify.success(S("{{_("User '%s' saved.")|safe }}").sprintf( m.get('email') ).value()); }, error: function(res, jqxhr) { m.startNewSession(); alertify.error( - S("{{_("Error during saving user: '%%s'")|safe }}").sprintf( + S("{{_("Error saving user: '%s'")|safe }}").sprintf( jqxhr.responseJSON.errormsg ).value() );