Forum .LRN Q&A: Re: what happened with the translated messages??!?!

Collapse
Posted by Peter Marklund on
Tilmann,
good catch about the acs-datetime keys. Actually the test servers also caught it for me, but you posting her made me fix it sooner. Sometimes when I fix one bug I introduce another, see this commit: http://xarg.net/tools/cvs/change-set-details?key=EE8D222D64FA3B78E0F53A77DAD282AFFBDC417C

Notice the acs-datetime.en_US file that is there and has nothing to do with what the commit was supposed to do. When the test servers are recreated tonight calendar should be back in business again.

The original problem with missing keys arose because the keys were not present in any scripts as package_key.message_key and therefore my consistency check script thought they were no longer used. It is very important that you *never* do dynamic message lookups like this:

set message_key [generate_message_key_dynamically]

set text [_ $message_key]

Instead you can do something like this:

set message_key_array {
  lookup1 package_key.message_key1
  lookup2 package_key.message_key2
}

set text [_ $message_key_array([generate_lookup_dynamically])]

Ok, that was maybe not so readable. The point I wanted to make is that package developers need to have their keys represented as package_key.message_key somewhere in their scripts or else the message keys risk being removed.