[OPEN-ILS-DEV] PATCH: Introduce XUL string bundles for Javascript i18n

Jason Etheridge phasefx at gmail.com
Tue Aug 7 17:59:49 EDT 2007


> > This patch hopes to start changing that, by introducing string bundles
> > for a few small parts of the staff client -- hopefully paving the way
> > for conversion of more of the client to stringbundles and i18n glory.

Earlier on #openils-evergreen (freenode.org IRC channel), we
determined that XUL string bundles would not work for remote XUL.  So
we took a stab at implementing a remote version with XBL, which allows
us to create our own XUL elements and abstract away the
implementation.

Dan, the results of this are sitting at http://dev.gapines.org/~pines/
for now.  The test.xul file loads test.css, which assigns the XBL
binding in bindings.xml to any remote_stringbundle element in that
document.  The document defines one such stringbundle with a @src
pointing strings.properties.

We have .getString and .getFormattedString, and the latter understands
both the {1} {2} positional syntax and a subset of the sprintf format,
%1$s etc.  We should probably check for off-by-one errors.

Thanks for your help!

-- Jason
http://esilibrary.com/


More information about the Open-ils-dev mailing list