[OPEN-ILS-DEV] staff client i18n: hard-coded strings in javascript for XHTML files

Mike Rylander mrylander at gmail.com
Sun Jan 20 08:28:13 EST 2008


On Jan 20, 2008 8:25 AM, Dan Scott <denials at gmail.com> wrote:
> On 20/01/2008, Mike Rylander <mrylander at gmail.com> wrote:
> > On Jan 20, 2008 7:39 AM, Dan Scott <denials at gmail.com> wrote:
> > > Hello:
> > >
> > > In /xul/server/admin/non_cat_types.js, which is pulled into
> > > /xul/server/admin/non_cat_types.xhtml, the _splitInterval function has
> > > hard-coded time unit strings (minutes, hours, days weeks, etc) that
> > > can't (I think) be localized through the normal methods of either
> > > XMLENT (because this is a standalone javascript file) or
> > > messagecatalog (because the parent is an XHTML file, not a XUL file).
> >
> > IIUC, you want to change the actual value of the interval as stored on
> > the non-cat object.  Even if we could normalize it, we shouldn't (must
> > not, actually) -- the interval data itself that the function is meant
> > to work with is an PG INTERVAL value.
> >
> > It looks to me like the only thing that needs to be translated are the
> > displayed strings inside the xhtml file; Hours, Minutes, Weeks, Days
> > and Months (note the case) -- the text content of the <option/>
> > elements instead of that of the @value attribute.  Is this what you
> > mean and I'm just misunderstanding?
> >
> > Assuming I'm not misunderstanding, we'd just need the standard XMLENT/DTD dance.
>
> Oops. You are of course correct, idata[1] from the JS file just holds
> the selector id ("minutes", "hours", etc) which is then used to set
> the selector in the XHTML file where the strings are actually
> displayed and easily translatable.
>
> I've been up since 4:30 am working through the server/admin XUL, just
> started looking at the XHTML/JS in the directory, and made an
> assumption about how ncDisplayTypes worked without following it
> through. Sorry about wasting your time on this.
>

No apologies.  Many eyes and all that jazz.  Sleep, man! Sleep!  :)

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list