Forum OpenACS Development: Metadata on messages in acs-lang

Collapse
Posted by Christian Hvid on

From doing internationalization work on acs-lang:

This suggestion is inspired by a feature in Greenpeace's localization UI that supports localization of images (for e.g. for images holding text). The Greenpeace code figures out whether a given key is an image url by checking whether the image exists in the file system.

A better way to do this would be to have a way to store additional information about the messages' format in the catalog. Since the information would be the same regardless of locale it would have to go to a 'father table' keyed only by key and package for the db to normalised. The sort of 'metadata' could be:

  • whether the message string is actual data or an url reference to some data
  • what type of data it is (mime type?)
  • whether this should go through the adp-parser or not

The usefullness of letting translated material go through the adp- parser would be that it made it possible to translate text that was part dynamically generated content and in some languages had swapped the order of the words. Like:

  • english: Christian's apple
  • french: la pomme de Christian

where 'Christian' and 'apple' are dynamically created.

Any comments?

Collapse
Posted by Carl Robert Blesius on

It is great that you are thinking about taking acs-lang a step further with Metadata on messages... incorrect order on translations is something that bothers me and is seen often in translated software. Metadata might eventually allow the storage of additional information as well. An example: German adjectives do not retain the same form in all contexts (unlike English), that is, they change their endings according to the words they accompany. Example:

  • English: Christian's tasty apple
  • German: Christian's schmackhafter Apfel
  • English: Christian's tasty orange
  • German: Christian's schmackhafte Apfelsine

Note: In German Apfel is of masculine gender and orange feminine, which determines the declination of the adjectives.

Although this goes above and beyond what we will need to start with (and I am sure it would get really complex very quickly), Peter's suggestion of using XML for the message catalogs combined with your suggestion for simple cases of word order might make it easier to add this kind of information in the future. I like the idea and I am interested to see if anyone else has something to say about it.