Hello, I will briefly talk here on what was previously in this mail list concerning I18N for GRASS. Before the 5.0 stable release, I read some letters rising doubts about how much safe it was to deal with I18N. =========================== 1. Hypothetically, I18N shall break GRASS on some systems where dgettext is in libintl. --------------------------- There is no evidence known to me when it broke anything. As this was considered the major problem, I think we can learn and list what systems will break, and why. If we can list such systems, then we must place warnings to those systems users who want NLS support, to be aware of '--with-nls' option expected break on such systems. Users who do not enable this option in 'configure' completely bypass all I18N changes. I think this is most important to notice, as it may be not obvious to everybody. I compiled the code --with-nls on one of such systems (Cygwin) and didn't find any problems except that Cygwin libiconv is required to redirect dgettext, textdomain, etc., to libintl_dgettext, etc. 2. The I18N code modifications done to libraries make them system-wide dangerous. --------------------------- There is no difference in doing actual string replacement by gettext _(macro) inside the code of both modules and libraries; the I18N is done in the same way. Therefore there is no difference in: a)being relatively safe with modules internationalization and in b) being put in risk with libraries internationalization, whatever risk one could foresee. All modules use libraries, but this should not mean that all modules will break, nothing would break if I18N was done in duly way. 3. Tcltkgrass and intro messages: locale is set up during install and for good, which is not correct because it should be determined and chosen on startup of GRASS. --------------------------- This is right but misleading. Neither tcltkgrass messages nor grass_into and license messages are defined on install. Actually, as it follows from the [locale/Gmakefile], all possible locales are installed into $(INST_DIR)/locale, including tcltkgrass messages and text files, 'only if' GRASS was configured with NLS support. On grass5 startup, Init.sh and tcltkgrass check for either LANG or LC_MESSAGES or LC_ALL env variables and assign $LCL variable. If the program finds translated files in $(INST_DIR)/locale/$LCL, - which might normally happen 'only if' --with-nls was given, it uses those files instead of originals which reside in their well-known catalogs. Files being not found, the program reads from default, i.e., from original files. 4. More testing is needed to find out other dangers from I18N looming, before such code can be included into any stable release. --------------------------- No other testing except the developer's would be possible if you do not include the subjects to be tested into the release. ====== STATUS of I18N done for GRASS 5.0 (November 12, 2002): A. Libraries - src/libes libgis.a libraster.a B. Modules - src.garden/ grass.postgresql: ---- d.rast.pg d.site.pg d.vect.pg d.what.r.pg d.what.s.pg d.what.v.pg g.column.pg g.select.pg g.stats.pg g.table.pg pg.in.dbf v.reclass.pg v.to.pg src/sites ---- s.surf.rst src/mapdev ---- v.digit -------- Excluded modules: v.in.shape.pg \ v.in.arc.pg The '.po' files for these libs and modules were prepared and placed in [locale/ru/LC_MESSAGES] catalog. They can be particularly used as templates by translators who edit other locales' '.po' files. C. Tcltkgrass (everything except maybe a few recently added new modules; and some of the modules may have always been tcltkgrass-unplugged - those from src.garden, contrib, etc.) Tcl i18n is done in two ways: a)using 'msgcat' for scripts with small number of translatable strings (e.g., gis_set.tcl) and b)wholly replacing the bulk of strings in modules/scripts, then placing the latter ones into a separate catalog where they serve for substitution in conditions described in p.3. The reason for not using 'msgcat' in all scripts is that much 'msgcat' work was found decreasing tcltkgrass script performance. D. Shell introduction texts from 'grass_intro' and 'license' invoked from Init.sh. ============= GRASS I18N implementation details can be found in [documents/grass_i18n_howto.html], [src/libes/gis/locale.c], [src/include/glocale.h] and [locale/Gmakefile]. New 'NLS for GRASS' contributors are kindly asked to read these before submitting their files. ============= Alex Shevlakov Motivation Free Software Consulting, 142190 Moscow, Russia http://motivation.ru tel +7(902)17399-52 fax +7(095)77739-92