=== added directory 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org' === added directory 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp' === added directory 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis' === added directory 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer' === added file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-01-18 05:05:02 +0000 @@ -0,0 +1,81 @@ +title=DHIS 2 Data Visualizer +chart_type=Chart type +column_chart= Column chart +stacked_column_chart=Stacked column chart +bar_chart=Bar chart +stacked_bar_chart=Stacked bar chart +line_chart=Line chart +area_chart=Area chart +pie_chart=Pie chart +series=Series +category=Category +filter=Filter +alert_no_indicators_selected=No indicators or data elements selected. +no_periods_selected=No periods selected. +no_orgunits_selected=No organisation units selected. +example_chart=Example chart +loading=Loading... +no_data=No data +value=Value +indicators=Indicators +select_group=Select group +data_elements=Data elements +all_indicator_groups=[ All indicator groups ] +available_indicators=Available indicators +selected_indicators=Selected indicators +available_data_elements=Available data elements +periods=Periods +months=Months +last_month=Last month +last_12_months=Last 12 months +quarters=Quarters +last_quarter=Last quarter +last_4_quarters=Last 4 quarters +six_months=Six months +last_six_month=Last 6 months +last_two_six_month=Last two 6 months +years=Years +last_year=Last year +last_5_years=Last 5 years +organisation_units=Organisation units +select_all_children=Select all children +chart_options=Chart options +png_only=NB! These fields are for the PNG version only +trend_line=Trend line +hide_subtitle=Hide subtitle +hide_legend=Hide legend +user_orgunit=User orgunit +x_axis_label=X axis label +y_axis_label=Y axis label +target_line_value=Target line value +target_line_label=Target line labels +show_hide_chart_settings=Show/hide chart settings +update=Update +data_table=Data table +favorites=Favorites.. +manage_favorites=Manage favorites +sort_by=Sort by +system=System +name=Name +last_updated=Last updated +rename=Rename +rename_favorite=Rename favorite +cancel=Cancel +name_already_in_use=*Name already in use +delete=Delete +delete_favorite=Delete favorite +are_you_sure=Are you sure? +save=Save +example_chart_cannot_be_saved=* The example chart cannot be saved. +overwrite=Overwrite +download_as=Download as +browser_download_alert=Please use Chrome, Firefox, Opera or Safari to export images. +no_svg_format=No SVG format +image_png=Image (PNG) +hide_data_table=Hide data table +no_data_elements_selected=No data elements selected. +data_elemenent_store_does_not_exist=Data element store does not exist. +saving=Saving +renaming=Renaming +deleting=Deleting + === added file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module_fr_FR.properties' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module_fr_FR.properties 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module_fr_FR.properties 2012-01-18 05:05:02 +0000 @@ -0,0 +1,2 @@ +title=DHIS 2 Data Visualizer +chart_type=Type de chart \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/struts.xml 2011-12-22 14:36:02 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/struts.xml 2012-01-18 05:05:02 +0000 @@ -82,6 +82,12 @@ + + + + + /dhis-web-visualizer/i18n.vm + === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-01-12 14:59:21 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-01-18 05:05:02 +0000 @@ -42,23 +42,23 @@ dimension: { data: { value: 'data', - rawvalue: 'Data' + rawvalue: 'Data' /*TODO i18n?*/ }, indicator: { value: 'indicator', - rawvalue: 'Indicator' + rawvalue: 'Indicator' /*TODO i18n?*/ }, dataelement: { value: 'dataelement', - rawvalue: 'Data element' + rawvalue: 'Data element' /*TODO i18n?*/ }, period: { value: 'period', - rawvalue: 'Period' + rawvalue: 'Period' /*TODO i18n?*/ }, organisationunit: { value: 'organisationunit', - rawvalue: 'Organisation unit' + rawvalue: 'Organisation unit' /*TODO i18n?*/ } }, chart: { @@ -337,12 +337,12 @@ a.push(r.data.id); }); if (exception && !a.length) { - alert('No data elements selected'); + alert(G.i18n.no_data_elements_selected); } return a; } else { - alert('Data element store does not exist'); + alert(G.i18n.data_element_store_does_not_exist); } } }, @@ -368,7 +368,7 @@ }); } if (exception && !a.length) { - alert('No indicators or data elements selected'); + alert(G.i18n.alert_no_indicators_selected); } return a; } @@ -396,7 +396,7 @@ } }); if (exception && !a.length) { - alert('No periods selected'); + alert(G.i18n.no_periods_selected); } return a; }, @@ -435,7 +435,7 @@ } }); if (exception && !a.length) { - alert('No periods selected'); + alert(G.i18n.no_periods_selected); } return a; }, @@ -448,7 +448,7 @@ valid = item.getValue() ? true : valid; }); if (exception && !valid) { - alert('No periods selected'); + alert(G.i18n.no_periods_selected); } return a; } @@ -473,7 +473,7 @@ a.push(DV.util.string.getEncodedString(r.data.text)); }); if (exception && !a.length) { - alert('No organisation units selected'); + alert( G.i18n.no_orgunits_selected ); } return a; }, @@ -489,7 +489,7 @@ a.push(DV.util.string.getEncodedString(r.data.id)); }); if (exception && !a.length) { - alert('No organisation units selected'); + alert( G.i18n.no_orgunits_selected ); } return a; } @@ -526,7 +526,7 @@ getTitle: function() { return { type: 'text', - text: DV.init.cmd === DV.conf.finals.cmd.init ? 'Example chart' : DV.state.filter.names[0], + text: DV.init.cmd === DV.conf.finals.cmd.init ? G.i18n.example_chart : DV.state.filter.names[0], font: 'bold 15px arial', fill: '#222', width: 300, @@ -705,6 +705,7 @@ return this.allValuesAreIntegers(DV.value.values) ? '0' : '0.0'; } }, + /*FIXME:This is probably not going to work as intended with UNICODE?*/ string: { getEncodedString: function(text) { return text.replace(/[^a-zA-Z 0-9(){}<>_!+;:?*&%#-]+/g,''); @@ -723,7 +724,7 @@ crud: { favorite: { create: function(fn, isUpdate) { - DV.util.mask.setMask(DV.cmp.favorite.window, 'Saving...'); + DV.util.mask.setMask(DV.cmp.favorite.window, G.i18n.saving + '...'); var params = DV.state.getParams(); params.name = DV.cmp.favorite.name.getValue(); params.trendLine = DV.cmp.favorite.trendline.getValue(); @@ -770,7 +771,7 @@ alert('Name is already in use'); return; } - DV.util.mask.setMask(DV.cmp.favorite.window, 'Renaming...'); + DV.util.mask.setMask(DV.cmp.favorite.window, G.i18n.renaming + '...'); var r = DV.cmp.favorite.grid.getSelectionModel().getSelection()[0]; var url = DV.cmp.favorite.system.getValue() ? DV.conf.finals.ajax.favorite_addorupdatesystem : DV.conf.finals.ajax.favorite_addorupdate; Ext.Ajax.request({ @@ -787,7 +788,7 @@ }); }, del: function(fn) { - DV.util.mask.setMask(DV.cmp.favorite.window, 'Deleting...'); + DV.util.mask.setMask(DV.cmp.favorite.window, G.i18n.deleting + '...'); var baseurl = DV.conf.finals.ajax.path_visualizer + DV.conf.finals.ajax.favorite_delete, selection = DV.cmp.favorite.grid.getSelectionModel().getSelection(); Ext.Array.each(selection, function(item) { @@ -1162,7 +1163,7 @@ DV.value = { values: [], getValues: function(exe) { - DV.util.mask.setMask(DV.cmp.region.center, 'Loading...'); + DV.util.mask.setMask(DV.cmp.region.center, G.i18n.loading); var params = [], i = DV.conf.finals.dimension.indicator.value, d = DV.conf.finals.dimension.dataelement.value; @@ -1182,7 +1183,7 @@ DV.value.values = DV.util.value.jsonfy(r); if (!DV.value.values.length) { DV.mask.hide(); - alert('No data'); + alert(G.i18n.no_data); return; } @@ -1472,7 +1473,7 @@ height: DV.conf.layout.east_gridcolumn_height }, { - text: 'Value', + text: G.i18n.value, dataIndex: 'v', width: 80, height: DV.conf.layout.east_gridcolumn_height @@ -1543,14 +1544,14 @@ items: [ { xtype: 'label', - text: 'Chart type', + text: G.i18n.chart_type, style: 'font-size:11px; font-weight:bold; padding:13px 8px 0 10px' }, { xtype: 'button', icon: 'images/column.png', name: DV.conf.finals.chart.column, - tooltip: 'Column chart', + tooltip: G.i18n.column_chart, width: 40, pressed: true }, @@ -1558,42 +1559,42 @@ xtype: 'button', icon: 'images/column-stacked.png', name: DV.conf.finals.chart.stackedcolumn, - tooltip: 'Stacked column chart', + tooltip: G.i18n.stacked_column_chart, width: 40 }, { xtype: 'button', icon: 'images/bar.png', name: DV.conf.finals.chart.bar, - tooltip: 'Bar chart', + tooltip: G.i18n.bar_chart, width: 40 }, { xtype: 'button', icon: 'images/bar-stacked.png', name: DV.conf.finals.chart.stackedbar, - tooltip: 'Stacked bar chart', + tooltip: G.i18n.stacked_bar_chart, width: 40 }, { xtype: 'button', icon: 'images/line.png', name: DV.conf.finals.chart.line, - tooltip: 'Line chart', + tooltip: G.i18n.line_chart, width: 40 }, { xtype: 'button', icon: 'images/area.png', name: DV.conf.finals.chart.area, - tooltip: 'Area chart', + tooltip: G.i18n.area_chart, width: 40 }, { xtype: 'button', icon: 'images/pie.png', name: DV.conf.finals.chart.pie, - tooltip: 'Pie chart', + tooltip: G.i18n.pie_chart, width: 40 } ] @@ -1609,7 +1610,7 @@ items: [ { xtype: 'label', - text: 'Series', + text: G.i18n.series, style: 'font-size:11px; font-weight:bold; padding:0 3px' }, { bodyStyle: 'padding:1px 0; border-style:none; background-color:transparent' }, @@ -1617,7 +1618,7 @@ xtype: 'combobox', cls: 'dv-combo', name: DV.conf.finals.chart.series, - emptyText: 'Series', + emptyText: G.i18n.series, queryMode: 'local', editable: false, valueField: 'id', @@ -1642,7 +1643,7 @@ items: [ { xtype: 'label', - text: 'Category', + text: G.i18n.category, style: 'font-size:11px; font-weight:bold; padding:0 3px' }, { bodyStyle: 'padding:1px 0; border-style:none; background-color:transparent' }, @@ -1650,7 +1651,7 @@ xtype: 'combobox', cls: 'dv-combo', name: DV.conf.finals.chart.category, - emptyText: 'Category', + emptyText: G.i18n.category, queryMode: 'local', editable: false, lastQuery: '', @@ -1684,7 +1685,7 @@ xtype: 'combobox', cls: 'dv-combo', name: DV.conf.finals.chart.filter, - emptyText: 'Filter', + emptyText: G.i18n.filter, queryMode: 'local', editable: false, lastQuery: '', @@ -1711,7 +1712,7 @@ xtype: 'fieldset', cls: 'dv-fieldset', name: DV.conf.finals.dimension.indicator.value, - title: 'Indicators', + title: '' + G.i18n.indicators + '', collapsible: true, width: DV.conf.layout.west_fieldset_width, items: [ @@ -1722,7 +1723,7 @@ width: DV.conf.layout.west_fieldset_width - 22, valueField: 'id', displayField: 'name', - fieldLabel: 'Select group', + fieldLabel: G.i18n.select_group, labelStyle: 'padding-left:7px;', labelWidth: 90, editable: false, @@ -1739,7 +1740,7 @@ }, listeners: { load: function(s) { - s.add({id: 0, name: '[ All indicator groups ]', index: -1}); + s.add({id: 0, name: G.i18n.all_indicator_groups, index: -1}); s.sort('index', 'ASC'); } } @@ -1777,7 +1778,7 @@ tbar: [ { xtype: 'label', - text: 'Available indicators', + text: G.i18n.available_indicators, cls: 'dv-toolbar-multiselect-left-label' }, '->', @@ -1842,7 +1843,7 @@ '->', { xtype: 'label', - text: 'Selected indicators', + text: G.i18n.selected_indicators, cls: 'dv-toolbar-multiselect-right-label' } ], @@ -1873,7 +1874,7 @@ xtype: 'fieldset', cls: 'dv-fieldset', name: DV.conf.finals.dimension.dataelement.value, - title: 'Data elements', + title: '' + G.i18n.data_elements + '', collapsed: true, collapsible: true, items: [ @@ -1938,7 +1939,7 @@ tbar: [ { xtype: 'label', - text: 'Available data elements', + text: G.i18n.available_data_elements, cls: 'dv-toolbar-multiselect-left-label' }, '->', @@ -2003,7 +2004,7 @@ '->', { xtype: 'label', - text: 'Selected data elements', + text: G.i18n.selected_data_elements, cls: 'dv-toolbar-multiselect-right-label' } ], @@ -2034,7 +2035,7 @@ xtype: 'fieldset', cls: 'dv-fieldset', name: DV.conf.finals.dimension.period.value, - title: 'Periods', + title: '' + G.i18n.periods +'', collapsed: true, collapsible: true, cmp: [], @@ -2061,18 +2062,18 @@ items: [ { xtype: 'label', - text: 'Months', + text: G.i18n.months, cls: 'dv-label-period-heading' }, { xtype: 'checkbox', paramName: 'lastMonth', - boxLabel: 'Last month' + boxLabel: G.i18n.last_month }, { xtype: 'checkbox', paramName: 'last12Months', - boxLabel: 'Last 12 months', + boxLabel: G.i18n.last_12_months, checked: true } ] @@ -2094,18 +2095,18 @@ items: [ { xtype: 'label', - text: 'Quarters', + text: G.i18n.quarters, cls: 'dv-label-period-heading' }, { xtype: 'checkbox', paramName: 'lastQuarter', - boxLabel: 'Last quarter' + boxLabel: G.i18n.last_quarter }, { xtype: 'checkbox', paramName: 'last4Quarters', - boxLabel: 'Last 4 quarters' + boxLabel: G.i18n.last_4_quarters } ] }, @@ -2126,18 +2127,18 @@ items: [ { xtype: 'label', - text: 'Six-months', + text: G.i18n.six_months, cls: 'dv-label-period-heading' }, { xtype: 'checkbox', paramName: 'lastSixMonth', - boxLabel: 'Last six-month' + boxLabel: G.i18n.last_six_month }, { xtype: 'checkbox', paramName: 'last2SixMonths', - boxLabel: 'Last 2 six-months' + boxLabel: G.i18n.last_two_six_month } ] } @@ -2165,18 +2166,18 @@ items: [ { xtype: 'label', - text: 'Years', + text: G.i18n.years, cls: 'dv-label-period-heading' }, { xtype: 'checkbox', paramName: 'thisYear', - boxLabel: 'This year' + boxLabel: G.i18n.last_year }, { xtype: 'checkbox', paramName: 'last5Years', - boxLabel: 'Last 5 years' + boxLabel: G.i18n.last_5_years } ] } @@ -2196,7 +2197,7 @@ xtype: 'fieldset', cls: 'dv-fieldset', name: DV.conf.finals.dimension.organisationunit.value, - title: 'Organisation units', + title: '' + G.i18n.organisation_units + '', collapsed: true, collapsible: true, items: [ @@ -2252,7 +2253,7 @@ if (!r.data.leaf) { v.menu.add({ id: 'treepanel-contextmenu-item', - text: 'Select all children', + text: G.i18n.select_all_children, icon: 'images/node-select-child.png', handler: function() { r.expand(false, function() { @@ -2290,12 +2291,12 @@ xtype: 'fieldset', cls: 'dv-fieldset', name: 'options', - title: 'Chart options', + title: '' + G.i18n.chart_options +'', collapsed: true, collapsible: true, items: [ { - html: 'NB! These fields are for the PNG version only', + html: G.i18n.png_only, bodyStyle: 'border:0 none; color:#555; font-style:italic; padding-bottom:10px' }, { @@ -2307,7 +2308,7 @@ xtype: 'checkbox', cls: 'dv-checkbox-alt1', style: 'margin-right:26px', - boxLabel: 'Trend line', + boxLabel: G.i18n.trend_line, labelWidth: DV.conf.layout.form_label_width, listeners: { added: function() { @@ -2319,7 +2320,7 @@ xtype: 'checkbox', cls: 'dv-checkbox-alt1', style: 'margin-right:26px', - boxLabel: 'Hide subtitle', + boxLabel: G.i18n.hide_subtitle, labelWidth: DV.conf.layout.form_label_width, listeners: { added: function() { @@ -2331,7 +2332,7 @@ xtype: 'checkbox', cls: 'dv-checkbox-alt1', style: 'margin-right:26px', - boxLabel: 'Hide legend', + boxLabel: G.i18n.hide_legend, labelWidth: DV.conf.layout.form_label_width, listeners: { added: function() { @@ -2342,7 +2343,7 @@ { xtype: 'checkbox', cls: 'dv-checkbox-alt1', - boxLabel: 'User orgunit', + boxLabel: G.i18n.user_orgunit, labelWidth: DV.conf.layout.form_label_width, listeners: { added: function() { @@ -2361,7 +2362,7 @@ xtype: 'textfield', cls: 'dv-textfield-alt1', style: 'margin-right:4px', - fieldLabel: 'X axis label', + fieldLabel: G.i18n.x_axis_label, labelAlign: 'top', labelSeparator: '', maxLength: 100, @@ -2377,7 +2378,7 @@ { xtype: 'textfield', cls: 'dv-textfield-alt1', - fieldLabel: 'Y axis label', + fieldLabel: G.i18n.y_axis_label, labelAlign: 'top', labelSeparator: '', maxLength: 100, @@ -2402,7 +2403,7 @@ cls: 'dv-textfield-alt1', style: 'margin-right:4px', hideTrigger: true, - fieldLabel: 'Target line value', + fieldLabel: G.i18n.target_line_value, labelAlign: 'top', labelSeparator: '', maxLength: 100, @@ -2420,7 +2421,7 @@ { xtype: 'textfield', cls: 'dv-textfield-alt1', - fieldLabel: 'Target line label', + fieldLabel: G.i18n.target_line_label, labelAlign: 'top', labelSeparator: '', maxLength: 100, @@ -2488,7 +2489,7 @@ name: 'resizewest', cls: 'dv-toolbar-btn-2', text: '<<<', - tooltip: 'Show/hide chart settings', + tooltip: G.i18n.show_hide_chart_settings, handler: function() { var p = DV.cmp.region.west; if (p.collapsed) { @@ -2507,7 +2508,7 @@ { xtype: 'button', cls: 'dv-toolbar-btn-1', - text: 'Update', + text: G.i18n.update, handler: function() { DV.exe.execute(true, DV.init.cmd); } @@ -2515,7 +2516,7 @@ { xtype: 'button', cls: 'dv-toolbar-btn-2', - text: 'Data table', + text: G.i18n.data_table, handler: function() { var p = DV.cmp.region.east; if (p.collapsed && p.items.length) { @@ -2532,7 +2533,7 @@ { xtype: 'button', cls: 'dv-toolbar-btn-2', - text: 'Favorites..', + text: G.i18n.favorites, listeners: { afterrender: function(b) { this.menu = Ext.create('Ext.menu.Menu', { @@ -2548,7 +2549,7 @@ } else { DV.cmp.favorite.window = Ext.create('Ext.window.Window', { - title: 'Manage favorites', + title: G.i18n.manage_favorites, iconCls: 'dv-window-title-favorite', bodyStyle: 'padding:8px; background-color:#fff', width: DV.conf.layout.grid_favorite_width, @@ -2585,7 +2586,7 @@ xtype: 'checkbox', cls: 'dv-checkbox', style: 'padding-bottom:2px', - fieldLabel: 'System', + fieldLabel: G.i18n.system, labelWidth: DV.conf.layout.form_label_width, disabled: !DV.init.system.user.isAdmin, listeners: { @@ -2630,7 +2631,7 @@ }, items: [ { - text: 'Sort by..', + text: G.i18n.sort_by + '..', cls: 'dv-toolbar-btn-2', listeners: { added: function() { @@ -2651,7 +2652,7 @@ vertical: true, items: [ { - boxLabel: 'Name', + boxLabel: G.i18n.name, name: 'sortby', handler: function() { if (this.getValue()) { @@ -2664,7 +2665,7 @@ } }, { - boxLabel: 'System', + boxLabel: G.i18n.system, name: 'sortby', handler: function() { if (this.getValue()) { @@ -2677,7 +2678,7 @@ } }, { - boxLabel: 'Last updated', + boxLabel: G.i18n.last_updated, name: 'sortby', checked: true, handler: function() { @@ -2699,7 +2700,7 @@ }, '->', { - text: 'Rename', + text: G.i18n.rename, cls: 'dv-toolbar-btn-2', disabled: true, xable: function() { @@ -2713,7 +2714,7 @@ handler: function() { var selected = DV.cmp.favorite.grid.getSelectionModel().getSelection()[0]; var w = Ext.create('Ext.window.Window', { - title: 'Rename favorite', + title: G.i18n.rename_favorite, layout: 'fit', width: DV.conf.layout.window_confirm_width, bodyStyle: 'padding:10px 5px; background-color:#fff; text-align:center', @@ -2748,13 +2749,13 @@ }, '->', { - text: 'Cancel', + text: G.i18n.cancel, handler: function() { this.up('window').close(); } }, { - text: 'Rename', + text: G.i18n.rename, disabled: true, xable: function() { var value = this.up('window').cmp.name.getValue(); @@ -2765,7 +2766,7 @@ return; } else { - DV.cmp.favorite.rename.label.setText('* Name already in use'); + DV.cmp.favorite.rename.label.setText(G.i18n.name_already_in_use); } } this.disable(); @@ -2799,7 +2800,7 @@ } }, { - text: 'Delete', + text: G.i18n.delete, cls: 'dv-toolbar-btn-2', disabled: true, xable: function() { @@ -2819,13 +2820,13 @@ str += '
' + out; } var w = Ext.create('Ext.window.Window', { - title: 'Delete favorites', + title: G.i18n.delete_favorite, width: DV.conf.layout.window_confirm_width, bodyStyle: 'padding:10px 5px; background-color:#fff; text-align:center', modal: true, items: [ { - html: 'Are you sure?', + html: G.i18n.are_you_sure, bodyStyle: 'border-style:none' }, { @@ -2835,14 +2836,14 @@ ], bbar: [ { - text: 'Cancel', + text: G.i18n.cancel, handler: function() { this.up('window').close(); } }, '->', { - text: 'Delete', + text: G.i18n.delete, handler: function() { this.up('window').close(); DV.util.crud.favorite.del(function() { @@ -2893,7 +2894,7 @@ }, '->', { - text: 'Save', + text: G.i18n.save, disabled: true, xable: function() { if (DV.state.isRendered) { @@ -2908,7 +2909,7 @@ } else { if (DV.cmp.favorite.name.getValue()) { - DV.cmp.favorite.label.setText('* The example chart cannot be saved'); + DV.cmp.favorite.label.setText(G.i18n.example_chart_cannot_be_saved); } else { DV.cmp.favorite.label.setText(''); @@ -2928,7 +2929,7 @@ modal: true, items: [ { - html: 'Are you sure?', + html: G.i18n.area_you_sure, bodyStyle: 'border-style:none' }, { @@ -2938,14 +2939,14 @@ ], bbar: [ { - text: 'Cancel', + text: G.i18n.cancel, handler: function() { DV.cmp.favorite.window.close(); } }, '->', { - text: 'Overwrite', + text: G.i18n.overwrite, handler: function() { this.up('window').close(); DV.util.crud.favorite.update(function() { @@ -3051,12 +3052,12 @@ { xtype: 'button', cls: 'dv-toolbar-btn-2', - text: 'Download as..', + text: G.i18n.download_as, execute: function(type) { var svg = document.getElementsByTagName('svg'); if (svg.length < 1) { - alert('Please use Chrome, Firefox, Opera or Safari to export images'); + alert(G.i18n.browser_download_alert); return; } @@ -3071,7 +3072,7 @@ exportForm.submit(); } else { - alert("No svg/format"); + alert(G.i18n.no_svg_format); } }, listeners: { @@ -3081,7 +3082,7 @@ showSeparator: false, items: [ { - text: 'Image (PNG)', + text: G.i18n.image_png, iconCls: 'dv-menu-item-png', minWidth: 105, handler: function() { @@ -3115,7 +3116,7 @@ name: 'resizeeast', cls: 'dv-toolbar-btn-2', text: '>>>', - tooltip: 'Hide data table', + tooltip: G.i18n.hide_data_table, hidden: true, handler: function() { DV.cmp.region.east.collapse(); === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html 2011-11-25 12:25:07 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html 2012-01-18 05:05:02 +0000 @@ -12,6 +12,7 @@ + === added file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm 2012-01-18 05:05:02 +0000 @@ -0,0 +1,86 @@ +var G = {}; + +G.i18n = { +title: '$encoder.jsEscape($i18n.getString( 'title' ) , "'")', +chart_type: '$encoder.jsEscape($i18n.getString( 'chart_type' ) , "'")', +column_chart: '$encoder.jsEscape($i18n.getString( 'column_chart' ) , "'")', +stacked_column_chart: '$encoder.jsEscape($i18n.getString( 'stacked_column_chart' ) , "'")', +bar_chart: '$encoder.jsEscape($i18n.getString( 'bar_chart' ) , "'")', +stacked_bar_chart: '$encoder.jsEscape($i18n.getString( 'stacked_bar_chart' ) , "'")', +line_chart: '$encoder.jsEscape($i18n.getString( 'line_chart' ) , "'")', +area_chart: '$encoder.jsEscape($i18n.getString( 'line_chart' ) , "'")', +pie_chart: '$encoder.jsEscape($i18n.getString( 'pie_chart' ) , "'")', +series: '$encoder.jsEscape($i18n.getString( 'series' ) , "'")' , +category:'$encoder.jsEscape($i18n.getString( 'category' ) , "'")', +filter:'$encoder.jsEscape($i18n.getString( 'filter' ) , "'")', +alert_no_indicators_selected:'$encoder.jsEscape($i18n.getString( 'alert_no_indicators_selected' ) , "'")', +no_periods_selected:'$encoder.jsEscape($i18n.getString( 'no_periods_selected' ) , "'")', +no_orgunits_selected:'$encoder.jsEscape($i18n.getString( 'no_orgunits_selected' ) , "'")', +example_chart:'$encoder.jsEscape($i18n.getString( 'example_chart' ) , "'")', +loading:'$encoder.jsEscape($i18n.getString( 'loading' ) , "'")', +no_data:'$encoder.jsEscape($i18n.getString( 'no_data' ) , "'")', +value:'$encoder.jsEscape($i18n.getString( 'value' ) , "'")', +indicators:'$encoder.jsEscape($i18n.getString( 'indicators' ) , "'")', +select_group:'$encoder.jsEscape($i18n.getString( 'select_group' ) , "'")', +data_elements:'$encoder.jsEscape($i18n.getString( 'data_elements' ) , "'")', +all_indicator_groups:'$encoder.jsEscape($i18n.getString( 'all_indicator_groups' ) , "'")', +available_indicators:'$encoder.jsEscape($i18n.getString( 'available_indicators' ) , "'")', +selected_indicators:'$encoder.jsEscape($i18n.getString( 'selected_indicators' ) , "'")', +available_data_elements:'$encoder.jsEscape($i18n.getString( 'available_data_elements' ) , "'")', +periods:'$encoder.jsEscape($i18n.getString( 'periods' ) , "'")', +months:'$encoder.jsEscape($i18n.getString( 'months' ) , "'")', +last_month:'$encoder.jsEscape($i18n.getString( 'last_month' ) , "'")', +last_12_months:'$encoder.jsEscape($i18n.getString( 'last_12_months' ) , "'")', +quarters:'$encoder.jsEscape($i18n.getString( 'quarters' ) , "'")', +last_quarter:'$encoder.jsEscape($i18n.getString( 'last_quarter' ) , "'")', +last_4_quarters:'$encoder.jsEscape($i18n.getString( 'last_4_quarters' ) , "'")', +six_months:'$encoder.jsEscape($i18n.getString( 'six_months' ) , "'")', +last_six_month:'$encoder.jsEscape($i18n.getString( 'last_six_month' ) , "'")', +last_two_six_month:'$encoder.jsEscape($i18n.getString( 'last_two_six_month' ) , "'")', +years:'$encoder.jsEscape($i18n.getString( 'years' ) , "'")', +last_year:'$encoder.jsEscape($i18n.getString( 'last_year' ) , "'")', +last_5_years:'$encoder.jsEscape($i18n.getString( 'last_5_years' ) , "'")', +organisation_units:'$encoder.jsEscape($i18n.getString( 'organisation_units' ) , "'")', +select_all_children:'$encoder.jsEscape($i18n.getString( 'select_all_children' ) , "'")', +chart_options:'$encoder.jsEscape($i18n.getString( 'chart_options' ) , "'")', +png_only:'$encoder.jsEscape($i18n.getString( 'png_only' ) , "'")', +trend_line:'$encoder.jsEscape($i18n.getString( 'trend_line' ) , "'")', +hide_subtitle:'$encoder.jsEscape($i18n.getString( 'hide_subtitle' ) , "'")', +hide_legend:'$encoder.jsEscape($i18n.getString( 'hide_legend' ) , "'")', +user_orgunit:'$encoder.jsEscape($i18n.getString( 'user_orgunit' ) , "'")', +x_axis_label:'$encoder.jsEscape($i18n.getString( 'x_axis_label' ) , "'")', +y_axis_label:'$encoder.jsEscape($i18n.getString( 'y_axis_label' ) , "'")', +target_line_value:'$encoder.jsEscape($i18n.getString( 'target_line_value' ) , "'")', +target_line_label:'$encoder.jsEscape($i18n.getString( 'target_line_label' ) , "'")', +show_hide_chart_settings:'$encoder.jsEscape($i18n.getString( 'show_hide_chart_settings' ) , "'")', +update:'$encoder.jsEscape($i18n.getString( 'update' ) , "'")', +data_table:'$encoder.jsEscape($i18n.getString( 'data_table' ) , "'")', +favorites:'$encoder.jsEscape($i18n.getString( 'favorites' ) , "'")', +manage_favorites:'$encoder.jsEscape($i18n.getString( 'manage_favorites' ) , "'")', +sort_by:'$encoder.jsEscape($i18n.getString( 'sort_by' ) , "'")', +system:'$encoder.jsEscape($i18n.getString( 'system' ) , "'")', +name:'$encoder.jsEscape($i18n.getString( 'name' ) , "'")', +last_updated:'$encoder.jsEscape($i18n.getString( 'last_updated' ) , "'")', +rename:'$encoder.jsEscape($i18n.getString( 'rename' ) , "'")', +rename_favorite:'$encoder.jsEscape($i18n.getString( 'rename_favorite' ) , "'")', +cancel:'$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")', +name_already_in_use:'$encoder.jsEscape($i18n.getString( 'name_already_in_use' ) , "'")', +delete:'$encoder.jsEscape($i18n.getString( 'delete' ) , "'")', +delete_favorite:'$encoder.jsEscape($i18n.getString( 'delete_favorite' ) , "'")', +are_you_sure:'$encoder.jsEscape($i18n.getString( 'are_you_sure' ) , "'")', +save:'$encoder.jsEscape($i18n.getString( 'save' ) , "'")', +example_chart_cannot_be_saved:'$encoder.jsEscape($i18n.getString( 'example_chart_cannot_be_saved' ) , "'")', +overwrite:'$encoder.jsEscape($i18n.getString( 'overwrite' ) , "'")', +download_as:'$encoder.jsEscape($i18n.getString( 'download_as' ) , "'")', +browser_download_alert:'$encoder.jsEscape($i18n.getString( 'browser_download_alert' ) , "'")', +no_svg_format:'$encoder.jsEscape($i18n.getString( 'no_svg_format' ) , "'")', +image_png:'$encoder.jsEscape($i18n.getString( 'image_png' ) , "'")', +hide_data_table:'$encoder.jsEscape($i18n.getString( 'hide_data_table' ) , "'")', +data_elemenent_store_does_not_exist:'$encoder.jsEscape($i18n.getString( 'data_elemenent_store_does_not_exist' ) , "'")', +saving:'$encoder.jsEscape($i18n.getString( 'saving' ) , "'")', +renaming:'$encoder.jsEscape($i18n.getString( 'renaming' ) , "'")', +Deleting:'$encoder.jsEscape($i18n.getString( 'Deleting' ) , "'")' + + + +}; \ No newline at end of file