[icinga-checkins] icinga.org: icinga-web/master: * i18n

git at icinga.org git at icinga.org
Tue Apr 6 13:52:12 CEST 2010


Module: icinga-web
Branch: master
Commit: 0c479308a5ed9a58e5e7aef9d5afc0ba8933baa2
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=0c479308a5ed9a58e5e7aef9d5afc0ba8933baa2

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Apr  6 12:30:20 2010 +0200

* i18n
* user preferences

---

 .../AppKit/templates/User/PreferencesSuccess.php   |   16 +++++++++++++-
 .../System/ViewProc/AjaxGridLayoutSuccess.php      |    6 ++--
 .../System/ViewProc/js/IcingaCommandHandler.js     |   22 ++++++++++----------
 .../System/ViewProc/js/IcingaGridFilterHandler.js  |   10 ++++----
 .../Cronks/templates/System/js/CronkTrigger.js     |    2 +-
 lib/appkit/js/ext/ExtJs.js                         |    4 +-
 6 files changed, 37 insertions(+), 23 deletions(-)

diff --git a/app/modules/AppKit/templates/User/PreferencesSuccess.php b/app/modules/AppKit/templates/User/PreferencesSuccess.php
index 224c610..1e8b9f4 100755
--- a/app/modules/AppKit/templates/User/PreferencesSuccess.php
+++ b/app/modules/AppKit/templates/User/PreferencesSuccess.php
@@ -1 +1,15 @@
-<p>Will be implemented soon ...</p>
\ No newline at end of file
+<?php
+
+?>
+<div id="user-pref-container">
+
+</div>
+<script type="text/javascript">
+<!-- // <![CDATA[
+(function() {
+	Ext.onReady(function() {
+		
+	});
+})();
+// ]]> -->
+</script>
diff --git a/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php b/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
index 6c78f2d..e68cef6 100644
--- a/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
+++ b/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
@@ -52,16 +52,16 @@
 				
 					this.topToolbar.add([
 						'-', {
-							text: '<?php echo $tm->_("Filter"); ?>',
+							text: _("Filter"),
 							iconCls: 'silk-pencil',
 							menu: { 
 								items: [{ 
-									text: '<?php echo $tm->_("Modify"); ?>', 
+									text: _("Modify"), 
 									iconCls: 'silk-application-form',
 									handler: fw.startHandler,
 									scope: this
 								},{ 
-									text: '<?php echo $tm->_("Remove"); ?>', 
+									text: _("Remove"), 
 									iconCls: 'silk-cancel',
 									handler: function(b, e) {
 										fw.removeFilters();
diff --git a/app/modules/Cronks/templates/System/ViewProc/js/IcingaCommandHandler.js b/app/modules/Cronks/templates/System/ViewProc/js/IcingaCommandHandler.js
index cec615b..c4ec565 100644
--- a/app/modules/Cronks/templates/System/ViewProc/js/IcingaCommandHandler.js
+++ b/app/modules/Cronks/templates/System/ViewProc/js/IcingaCommandHandler.js
@@ -87,10 +87,10 @@ IcingaCommandHandler.prototype = {
 						idIndex: 0,
 						fields: ['fId', 'fStatus', 'fLabel'],
 						data: [
-							['1', '0', '(default) no option'],
-							['2', '1', 'Broadcast'],
-							['3', '2', 'Forced'],
-							['4', '4', 'Increment current notification']
+							['1', '0', _('(default) no option')],
+							['2', '1', _('Broadcast')],
+							['3', '2', _('Forced')],
+							['4', '4', _('Increment current notification')]
 						]
 					}),
 					
@@ -123,11 +123,11 @@ IcingaCommandHandler.prototype = {
 						idIndex: 0,
 						fields: ['fId', 'fStatus', 'fLabel'],
 						data: [
-							['1', '0', 'OK'],
-							['2', '1', 'Warning'],
-							['3', '2', 'Critical'],
-							['4', '3', 'Unknown'],
-							['5', '255', 'Return code out of bounds']
+							['1', '0', _('OK')],
+							['2', '1', _('Warning')],
+							['3', '2', _('Critical')],
+							['4', '3', _('Unknown')],
+							['5', '255', _('Return code out of bounds')]
 						]
 					}),
 					
@@ -167,8 +167,8 @@ IcingaCommandHandler.prototype = {
 					name: o.FieldName + '-group',
 					columns: 2,
 					items: [
-						{boxLabel: 'Yes', inputValue: 1, name: o.fieldName},
-						{boxLabel: 'No', inputValue: 0, name: o.fieldName, checked: true},
+						{boxLabel: _('Yes'), inputValue: 1, name: o.fieldName},
+						{boxLabel: _('No'), inputValue: 0, name: o.fieldName, checked: true},
 					]
 				});
 				
diff --git a/app/modules/Cronks/templates/System/ViewProc/js/IcingaGridFilterHandler.js b/app/modules/Cronks/templates/System/ViewProc/js/IcingaGridFilterHandler.js
index 4ca4ef6..3bb8ddd 100644
--- a/app/modules/Cronks/templates/System/ViewProc/js/IcingaGridFilterHandler.js
+++ b/app/modules/Cronks/templates/System/ViewProc/js/IcingaGridFilterHandler.js
@@ -52,7 +52,7 @@ var IcingaGridFilterWindow = function() {
 	function oWindow() {
 		if (!oWin) {
 			oWin = new Ext.Window({
-				title: '<?php echo $tm->_("Modify filter"); ?>',
+				title: _("Modify filter"),
 				closeAction: 'hide',
 				width: 500,
 				autoHeight: true,
@@ -115,19 +115,19 @@ var IcingaGridFilterWindow = function() {
 				
 				bbar: {
 					items: [{
-						text: '<?php echo $tm->_("Apply"); ?>',
+						text: _("Apply"),
 						iconCls: 'silk-accept',
 						handler: function(b, e) {
 							pub.applyFilters();
 						}
 					},{
-						text: '<?php echo $tm->_("Discard"); ?>',
+						text: _("Discard"),
 						iconCls: 'silk-cross',
 						handler: function(b, y) {
 							oWin.hide();
 						}
 					}, '-',{
-						text: '<?php echo $tm->_("Reset"); ?>',
+						text: _("Reset"),
 						iconCls: 'silk-delete',
 						handler: function(b, y) {
 							pub.resetFilterForm();
@@ -180,7 +180,7 @@ var IcingaGridFilterWindow = function() {
 				forceSelection: true,
 				
 				
-				fieldLabel: '<?php echo $tm->_("Add restriction"); ?>',
+				fieldLabel: _("Add restriction"),
 				
 				valueField: 'fType',
 				displayField: 'fLabel',
diff --git a/app/modules/Cronks/templates/System/js/CronkTrigger.js b/app/modules/Cronks/templates/System/js/CronkTrigger.js
index 0c60cd2..8ff9c29 100644
--- a/app/modules/Cronks/templates/System/js/CronkTrigger.js
+++ b/app/modules/Cronks/templates/System/js/CronkTrigger.js
@@ -22,7 +22,7 @@ function CronkTrigger (config) {
 		switch (thisConfig.objectType) {
 			case "host":
 				thisConfig.idPrefix = "servicesForHost";
-				thisConfig.titlePrefix = "Services for ";
+				thisConfig.titlePrefix = _("Services for ");
 				thisConfig.targetTemplate = "icinga-service-template";
 				thisConfig.targetField = "host_object_id";
 				break;
diff --git a/lib/appkit/js/ext/ExtJs.js b/lib/appkit/js/ext/ExtJs.js
index ed736b5..b0b8694 100644
--- a/lib/appkit/js/ext/ExtJs.js
+++ b/lib/appkit/js/ext/ExtJs.js
@@ -105,10 +105,10 @@ AppKit.Ext = function() {
 		notifyMessage : function(title, format) {
 			
 			if (!growlStack) {
-				growlStack = Ext.DomHelper.insertFirst(document.body, {id:'ext-msg-stack'}, true);
+				growlStack = Ext.DomHelper.insertFirst(window.document.body, {id:'ext-msg-stack'}, true);
 			}
 			
-			growlStack.alignTo(document, 'tr-tr', [-18, 10]);
+			growlStack.alignTo(Ext.getDoc(), 'tr-tr', [-18, 10]);
 			
 			var params = [];
 			var config = {





More information about the icinga-checkins mailing list