Patch for internationalisation of fields and other things


Subject: Patch for internationalisation of fields and other things
From: Tim Allen (rita_tim@tpg.com.au)
Date: Tue Jul 04 2000 - 17:59:29 CDT


The attached patch does the following:

Added a m_DescId member to the fp_FieldTypeData and fp_FieldData structs.

Changed the list in fp_Fields.h so that text is replaced by string id.

Changed the initialiser for the globals fp_FieldTypes and fp_FieldFmts
to set the description to NULL initially.

Added string ids for the field types and fields. Added corresponding text
for the id_ID translation.

Added code to ap_fooApp::initialize() to set up the field and type
descriptions as soon as the string set is loaded. Tested this for
ap_UnixApp, added code for Win32, BeOS, QNX. Did not add code for Mac
since that doesn't seem to be complete enough to have anything much in its
initialize method. Completely untested on these platforms, but moderately
optimistic, since it looked like the same code would work on all
platforms. I'm warning you in advance, so don't expect donuts :-).

BTW, I notice that there appears to be some potential to abstract out a
bit of code in the various ap_fooApp classes and reduce duplicated code.
We would need to mumble things like "multiple inheritance"; maybe if we
mumbled them quietly enough we could avoid having the Luddites revolt and
throwing their wooden shoes at us... :)

Fixed a bug in ap_UnixDialog_Field where the field types list was being
loaded with field names instead of field type names. Performed some minor
cleaning up of code, eg changed two method names so case was consistent
with other methods.

Fixed some minor errors in the id_ID translation.

The result of this is that field descriptions are now internationalised,
and appear that way in the insert field dialog.

Note that the field _tags_ are _not_ internationalised, but are still in
English, so there is no problem with reading documents with fields
prepared using a different language (no problem for AbiWord, that is,
maybe a problem for the human reader :)).

Tim

-- 
-----------------------------------------------------------
Tim Allen             http://www4.tpg.com.au/users/rita_tim/
tim@proximity.com.au  rita_tim@tpg.com.au




This archive was generated by hypermail 2b25 : Tue Jul 04 2000 - 17:52:17 CDT