From c64d4b9a0f79748a8fcd1091cb7e57d8754229da Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Fri, 29 Apr 2011 18:07:31 +0200 Subject: [PATCH] improve i18n for sonia.repository.js --- .../src/main/webapp/resources/js/i18n/de.js | 31 +++++++++++++++++++ .../webapp/resources/js/sonia.repository.js | 22 ++++++------- 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/scm-webapp/src/main/webapp/resources/js/i18n/de.js b/scm-webapp/src/main/webapp/resources/js/i18n/de.js index c69ad2d349..14549d5270 100644 --- a/scm-webapp/src/main/webapp/resources/js/i18n/de.js +++ b/scm-webapp/src/main/webapp/resources/js/i18n/de.js @@ -163,6 +163,37 @@ if (Sonia.repository.Panel){ } +if (Sonia.repository.PermissionFormPanel){ + + Ext.override(Sonia.repository.PermissionFormPanel, { + titleText: 'Berechtigungen' + }); + +} + +if (Sonia.repository.InfoPanel){ + + Ext.override(Sonia.repository.InfoPanel, { + nameText: 'Name: ', + typeText: 'Typ: ', + contactText: 'Kontakt: ', + urlText: 'Url: ', + // german ?? + changesetViewerText: 'ChangesetViewer', + changesetViewerTitleText: 'ChangesetViewer {0}' + }); + +} + +if (Sonia.repository.ExtendedInfoPanel){ + + Ext.override(Sonia.repository.ExtendedInfoPanel, { + // german ?? + checkoutText: 'Checkout: ' + }); + +} + // sonia.config.js if (Sonia.config.ScmConfigPanel){ diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.repository.js b/scm-webapp/src/main/webapp/resources/js/sonia.repository.js index ff772f5275..7174ffb8f4 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.repository.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.repository.js @@ -62,8 +62,6 @@ Sonia.repository.setEditPanel = function(panels){ /** * panels - * - * TODO: missing i18n */ Sonia.repository.DefaultPanel = { @@ -210,7 +208,7 @@ Sonia.repository.InfoPanel = Ext.extend(Ext.Panel, { mailTemplate: '{0}', actionLinkTemplate: '{0}', - // text TODO i18n + // text nameText: 'Name: ', typeText: 'Type: ', contactText: 'Contact: ', @@ -225,28 +223,27 @@ Sonia.repository.InfoPanel = Ext.extend(Ext.Panel, { contact = String.format(this.mailTemplate, this.item.contact); } - // TODO i18n var items = [{ xtype: 'label', - text: 'Name: ' + text: this.nameText },{ xtype: 'box', html: this.item.name },{ xtype: 'label', - text: 'Type: ' + text: this.typeText },{ xtype: 'box', html: this.getRepositoryTypeText(this.item.type) },{ xtype: 'label', - text: 'Contact: ' + text: this.contactText },{ xtype: 'box', html: contact },{ xtype: 'label', - text: 'Url: ' + text: this.urlText },{ xtype: 'box', html: String.format(this.linkTemplate, this.item.url) @@ -355,8 +352,8 @@ Sonia.repository.ExtendedInfoPanel = Ext.extend(Sonia.repository.InfoPanel,{ checkoutTemplate: null, - // text TODO i18n - ckeckoutText: 'Checkout: ', + // text + checkoutText: 'Checkout: ', modifyDefaultConfig: function(config){ var items = config.items; @@ -569,6 +566,8 @@ Ext.reg('repositoryPropertiesForm', Sonia.repository.PropertiesFormPanel); Sonia.repository.PermissionFormPanel = Ext.extend(Sonia.repository.FormPanel, { permissionStore: null, + + titleText: 'Permissions', initComponent: function(){ var permissionStore = new Ext.data.JsonStore({ @@ -665,8 +664,7 @@ Sonia.repository.PermissionFormPanel = Ext.extend(Sonia.repository.FormPanel, { }); var config = { - // TODO i18n - title: 'Permissions', + title: this.titleText, listeners: { updated: this.clearModifications, preUpdate: {