[open-ils-commits] r12516 - in trunk/Open-ILS/web: js/dojo/openils/reports/nls opac/locale/en-US reports/xul (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 13 22:56:13 EDT 2009
Author: miker
Date: 2009-03-13 22:56:11 -0400 (Fri, 13 Mar 2009)
New Revision: 12516
Modified:
trunk/Open-ILS/web/js/dojo/openils/reports/nls/reports.js
trunk/Open-ILS/web/opac/locale/en-US/reports.dtd
trunk/Open-ILS/web/reports/xul/source-browse.js
trunk/Open-ILS/web/reports/xul/source-setup.js
trunk/Open-ILS/web/reports/xul/template_builder.xul
Log:
apply proper I18N-ification to new template builder functionality
Modified: trunk/Open-ILS/web/js/dojo/openils/reports/nls/reports.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/reports/nls/reports.js 2009-03-14 02:31:48 UTC (rev 12515)
+++ trunk/Open-ILS/web/js/dojo/openils/reports/nls/reports.js 2009-03-14 02:56:11 UTC (rev 12516)
@@ -1,5 +1,10 @@
{
"RPT_BUILDER_CONFIRM_SAVE": "Name : ${0}\nDescription: ${1}\nSave Template?",
+
+ "LINK_NULLABLE_DEFAULT": "Default",
+ "LINK_NULLABLE_RIGHT": "Parent",
+ "LINK_NULLABLE_LEFT": "Child",
+ "LINK_NULLABLE_NONE": "None",
"FILTERS_LABEL_EQUALS":"Equals",
"FILTERS_LABEL_LIKE": "Contains Matching substring",
Modified: trunk/Open-ILS/web/opac/locale/en-US/reports.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/reports.dtd 2009-03-14 02:31:48 UTC (rev 12515)
+++ trunk/Open-ILS/web/opac/locale/en-US/reports.dtd 2009-03-14 02:56:11 UTC (rev 12516)
@@ -180,6 +180,8 @@
<!ENTITY reports.xul.template_builder.db_source_browser.label "Database Source Browser">
<!ENTITY reports.xul.template_builder.sources_menulist.label "Sources">
<!ENTITY reports.xul.template_builder.source_name.label "Source Name">
+<!ENTITY reports.xul.template_builder.source_nullable.label "Nullable">
+<!ENTITY reports.xul.template_builder.nullability_select.label "Enable nullability seletion">
<!ENTITY reports.xul.template_builder.source_specifier.label "Source Specifier:">
<!ENTITY reports.xul.template_builder.field_name.label "Field Name">
<!ENTITY reports.xul.template_builder.data_type.label "Data Type">
Modified: trunk/Open-ILS/web/reports/xul/source-browse.js
===================================================================
--- trunk/Open-ILS/web/reports/xul/source-browse.js 2009-03-14 02:31:48 UTC (rev 12515)
+++ trunk/Open-ILS/web/reports/xul/source-browse.js 2009-03-14 02:56:11 UTC (rev 12516)
@@ -66,7 +66,7 @@
subtreeList.push(
{ name : name,
- nullable : 'Default',
+ nullable : rpt_strings.LINK_NULLABLE_DEFAULT,
idlclass : idlclass,
map : map,
key : key,
@@ -77,67 +77,67 @@
}
);
- if ($('nullable-source-control').checked) {
- if (reltype == 'has_a') {
- subtreeList.push(
- { name : name,
- nullable : 'Parent', //rpt_strings.LINK_NULLABLE_RIGHT,
- idlclass : idlclass,
- map : map,
- key : key,
- join : 'right',
- field : field.getAttribute('name'),
- reltype : reltype,
- link : link,
- fullpath : fullpath + '>right'
- }
- );
+ if ($('nullable-source-control').checked) {
+ if (reltype == 'has_a') {
+ subtreeList.push(
+ { name : name,
+ nullable : rpt_strings.LINK_NULLABLE_RIGHT,
+ idlclass : idlclass,
+ map : map,
+ key : key,
+ join : 'right',
+ field : field.getAttribute('name'),
+ reltype : reltype,
+ link : link,
+ fullpath : fullpath + '>right'
+ }
+ );
- subtreeList.push(
- { name : name,
- nullable : 'None', //rpt_strings.LINK_NULLABLE_NONE
- idlclass : idlclass,
- map : map,
- key : key,
- join : 'inner',
- field : field.getAttribute('name'),
- reltype : reltype,
- link : link,
- fullpath : fullpath + '>inner'
- }
- );
-
- } else {
- subtreeList.push(
- { name : name,
- nullable : 'Child', //rpt_strings.LINK_NULLABLE_LEFT,
- idlclass : idlclass,
- map : map,
- key : key,
- join : 'left',
- field : field.getAttribute('name'),
- reltype : reltype,
- link : link,
- fullpath : fullpath + '>left'
- }
- );
+ subtreeList.push(
+ { name : name,
+ nullable : rpt_strings.LINK_NULLABLE_NONE,
+ idlclass : idlclass,
+ map : map,
+ key : key,
+ join : 'inner',
+ field : field.getAttribute('name'),
+ reltype : reltype,
+ link : link,
+ fullpath : fullpath + '>inner'
+ }
+ );
- subtreeList.push(
- { name : name,
- nullable : 'None', //rpt_strings.LINK_NULLABLE_NONE
- idlclass : idlclass,
- map : map,
- key : key,
- join : 'inner',
- field : field.getAttribute('name'),
- reltype : reltype,
- link : link,
- fullpath : fullpath + '>inner'
- }
- );
+ } else{
+ subtreeList.push(
+ { name : name,
+ nullable : rpt_strings.LINK_NULLABLE_LEFT,
+ idlclass : idlclass,
+ map : map,
+ key : key,
+ join : 'left',
+ field : field.getAttribute('name'),
+ reltype : reltype,
+ link : link,
+ fullpath : fullpath + '>left'
+ }
+ );
- }
- }
+ subtreeList.push(
+ { name : name,
+ nullable : rpt_strings.LINK_NULLABLE_NONE,
+ idlclass : idlclass,
+ map : map,
+ key : key,
+ join : 'inner',
+ field : field.getAttribute('name'),
+ reltype : reltype,
+ link : link,
+ fullpath : fullpath + '>inner'
+ }
+ );
+
+ }
+ }
}
populateSourcesSubtree( item.lastChild, subtreeList );
Modified: trunk/Open-ILS/web/reports/xul/source-setup.js
===================================================================
--- trunk/Open-ILS/web/reports/xul/source-setup.js 2009-03-14 02:31:48 UTC (rev 12515)
+++ trunk/Open-ILS/web/reports/xul/source-setup.js 2009-03-14 02:56:11 UTC (rev 12516)
@@ -276,10 +276,17 @@
var field_name = atom[1];
var join_type = field_name;
- field_name = field_name.split(/>/)[0];
- join_type = join_type.split(/>/)[1];
-
- if (join_type) _label += ' (' + join_type + ')';
+ switch (join_type) {
+ case 'right':
+ _label += ' (' + rpt_strings.LINK_NULLABLE_RIGHT + ')';
+ break;
+ case 'left':
+ _label += ' (' + rpt_strings.LINK_NULLABLE_LEFT + ')';
+ break;
+ case 'inner':
+ _label += ' (' + rpt_strings.LINK_NULLABLE_NONE + ')';
+ break;
+ }
}
path_label.push(_label);
Modified: trunk/Open-ILS/web/reports/xul/template_builder.xul
===================================================================
--- trunk/Open-ILS/web/reports/xul/template_builder.xul 2009-03-14 02:31:48 UTC (rev 12515)
+++ trunk/Open-ILS/web/reports/xul/template_builder.xul 2009-03-14 02:56:11 UTC (rev 12516)
@@ -76,12 +76,12 @@
ondblclick="sourceTreeHandlerDblClick(event)"
>
<treecols>
- <treecol label="Nullable" flex="0"/>
+ <treecol label="&reports.xul.template_builder.source_nullable.label;" flex="0"/>
<treecol primary="true" label="&reports.xul.template_builder.source_name.label;" flex="1"/>
</treecols>
<treechildren id="sources-treetop" alternatingbackground="true" />
</tree>
- <checkbox id="nullable-source-control" label="Enable nullability seletion"/>
+ <checkbox id="nullable-source-control" label="&reports.xul.template_builder.nullability_select.label;"/>
</vbox>
</hbox>
More information about the open-ils-commits
mailing list