From 79af448a38e6631ef94bc7a6e521ba9067962aa2 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 31 Jan 2012 10:17:45 +0000 Subject: [PATCH] fix i18n when updating network proxy git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1238361 13f79535-47bb-0310-9956-ffa450edef68 --- .../resources/org/apache/archiva/i18n/default.properties | 5 ++++- .../src/main/webapp/js/archiva/network-proxies.js | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties index 1405a573e..308dc330f 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties @@ -57,4 +57,7 @@ remoterepository.downloadremoteindex.now=Download Remote Index Now #proxy connector proxy-connectors.grid.remoterepo.settings.popover.title=Settings -proxy-connectors.remoterepo.settings.networkproxy=Network Proxy \ No newline at end of file +proxy-connectors.remoterepo.settings.networkproxy=Network Proxy + +#network proxy +networkproxy.updated=Network Proxy '{0}' updated. diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js index 32e3f9fca..8f5f8544d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js @@ -67,7 +67,7 @@ $(function() { data: "{\"networkProxy\": " + ko.toJSON(networkProxy)+"}", dataType: 'json', success: function(data) { - displaySuccessMessage($.i18n.prop('networkproxy.updated')); + displaySuccessMessage($.i18n.prop('networkproxy.updated',self.networkProxy.id())); self.networkProxy.modified(false); activateNetworkProxiesGridTab(); }, @@ -163,9 +163,11 @@ $(function() { var viewModel = new NetworkProxyViewModel(new NetworkProxy(),false,networkProxiesViewModel); ko.applyBindings(viewModel,$("#main-content #network-proxies-edit").get(0)); activateNetworkProxyFormValidation(); + clearUserMessages(); } if ($(e.target).attr("href")=="#network-proxies-view") { $("#main-content #network-proxies-view-tabs-li-edit a").html($.i18n.prop("add")); + clearUserMessages(); } }); @@ -236,6 +238,7 @@ $(function() { $("#main-content #network-proxies-view-tabs-li-grid").addClass("active"); $("#main-content #network-proxies-view").addClass("active"); $("#main-content #network-proxies-view-tabs-li-edit a").html($.i18n.prop("add")); + } activateNetworkProxyEditTab=function(){ @@ -244,7 +247,6 @@ $(function() { $("#main-content #network-proxies-view-tabs-li-edit").addClass("active"); $("#main-content #network-proxies-edit").addClass("active"); - } mapNetworkProxy=function(data){ -- 2.39.5