From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5b12489678b6b080 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!u25g2000pra.googlegroups.com!not-for-mail From: Michael R Newsgroups: comp.lang.ada Subject: Re: ANN: ZanyBlue.Text, Localization Support for Ada Date: Thu, 25 Nov 2010 23:00:44 -0800 (PST) Organization: http://groups.google.com Message-ID: <701c5b2c-5c51-49f1-9109-7f57d6026867@u25g2000pra.googlegroups.com> References: <3ab4e227-e87a-4df1-85ad-aabee2690de0@w2g2000yqb.googlegroups.com> NNTP-Posting-Host: 71.94.40.234 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1290754844 32589 127.0.0.1 (26 Nov 2010 07:00:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 26 Nov 2010 07:00:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u25g2000pra.googlegroups.com; posting-host=71.94.40.234; posting-account=iokpWwkAAAC4FdoU8cY5F_WfowBALHIE User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 AskTbTRL2/3.9.1.14019 Firefox/3.6.12 GTB7.1,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:16631 Date: 2010-11-25T23:00:44-08:00 List-Id: On Nov 22, 2:19=A0am, Michael R wrote: > Hi Folks, > > This is the first release of the ZanyBlue Ada packages. =A0This release > includes the Text package which support localization of Ada > applications > with Java style message formatting and .properties files. =A0The > released > files are available at > > http://sourceforge.net/projects/zanyblue/files/ > > There are two downloadable files: > > 1) The core release files: zanyblue-0.1.0b-r1663.tar.gz > 2) Support files for testing (AUnit) and regneration of the built-in > =A0 =A0localizations (CLDR) zanyblue-0.1.0b-r1663-libs3rd.tar.gz > > The primary dev environment is Unix but has been tested on Windows. > > Take care, > Michael. > > The readme is: > > The ZanyBlue.Text Package > ------------------------- > > ZanyBlue.Text is an Ada 2005 package supporting localization support > in Ada > by allowing the externalization of application messages into a > properties > file which can be localized into additional languages, similar to > Java. > The localized files include the locale string in the file name, e.g., > the > file "zbmcompile.properties" is localized to > "zbmcompile_fr.properties" in > French. > > The locale string is > > * A language abbreviation (2 or 3 alpha-numeric characters), e.g., > "en" for > =A0 English, "zh" for Chinese, "cop" for Coptic, etc. > * A script abbreviation (4 alpha-numeric characters), e.g., "Latn" for > Latin, > =A0 "Hant" for Traditional Han, "Hebr" for Hebrew, etc. > * A territory abbreviation (2 or 3 alpha-numeric characters), e.g., > "US" for > =A0 US, "CN" for China, "142" for Asia, etc. > > All components are optional, giving locale strings "" for the base > locale, > "en" for English, "zh_Hant" for Traditional Chinese, "zh_TW" for > Chinese > in Taiwan (also Traditional Chinese), and "zh_Hant_TW". > > The externalized .properties files are compiled to an Ada 2005 package > containing the application strings (including localized strings) to be > compiled into an application. =A0The selection of locale by > ZanyBlue.Text > is based on a locale argument which defaults to the locale string > value > of the environment variable "ZB_LANG", or, if it's not defined, > "LANG". > This allows applications to automatically switch the display language > (provided the application was localized into the selected locale). > E.g., the example application "moons" defaults to displaying English > but can be changed to using German, French or Spanish, e.g., =A0to > display > is German: > > =A0 =A0 $ export ZB_LANG=3Dde > =A0 =A0 $ moons > > The externalization of messages into a .properties files allows the > embedding > of parameters references via index (also similar to Java), e.g., the > message > to print the value of a number, the message could be defined as > > =A0 =A0 00001=3DThe value of the counter is {0} ticks. > > The ZanyBlue.Text package supports the "passing" of argument values by > "boxing" the values into ZanyBlue.Text objects. =A0This particular > message > could be printed, with an argument of 1904 as, > > =A0 =A0 Print_Line ("myapp", "00001", +1904); > > The unitary "+" operator is overloaded by the ZanyBlue.Text package to > create > the "boxed" object. =A0See the ZanyBlue documentation for details on the > types > supported by the package. > > Building > -------- > > The ZanyBlue packages have been build primarily on Unix systems using > a > recent GCC (GCC 4.4) or on Windows using GNAT GPL 2010. =A0The GCC > version > 4.5.0, however, gives an internal compiler error when building the > test > application. > > The build is make based. =A0To build on Unix: > > =A0 =A0$ cd src > =A0 =A0$ make > > The build will also build the needed files from Dmitry Kazakov's > components > v3.8 open source package used to format real values. =A0To run the > ZanyBlue > tests for the Text package, use the "check" build target. =A0The > ZanyBlue tests > use AdaCore's AUnit testing environment (also included in the src/ > libs3rd > directory), which is compiled as part of the test application build, > i.e., > > =A0 =A0 $ make check > > All the examples, except the "gtk" example, do not require additional > packages > beyond the ZanyBlue library. =A0The "gtk" example requires the GtkAda > package > from AdaCore. > > http://www.unicode.org/repos/cldr/tags/release-1-8-d03/common=A0 cldr > > Contact > ------- > > For additional information contact Michael Rohan > Hi Folks, Noticed that the number of downloads for the libs3rd package exceeded the download for the actual ZanyBlue code: I've re-uploaded the code making it the default download. The libs3rd package contains the third party dependencies for ZanyBlue needed only if you want to change the set of built-in localizations via the Unicode.org CLDR XML data or you don't have AUnit. The regression tests, via a "make check" in the src directory attempt to first build to the AUnit library in the src/libs3rd directory. If AUnit is already installed simply run "make check" in the src/test directory rather than the src directory (the build of AUnit, via ZanyBlue, only works on Unix). Take care, Michael