Empty DialogCaptions when 6.3.1 reads a 6.3.0.2 SIB File

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Jean-Paul Brassard
Posts: 65
Joined: Thu May 08, 2008 7:46 pm

Empty DialogCaptions when 6.3.1 reads a 6.3.0.2 SIB File

Post by Jean-Paul Brassard »

TsiLang Suite v6.3.1.

We found two problems when v6.3.1 reads SIB files that have been created with v6.2.2 then edited with v6.3.0.* :cry: .

1) TranslationEditor problem:
The new TranslationEditor of v6.3.1 adds extra "empty" DialogCaptions when reading those SIB files. If we do any change then save such a SIB file, we sometimes get two groups of extra empty DialogCaptions.

2) Wrong Captions displayed by siDialog:
Button captions are incorrect when the second language is active.
Cancel button, for example, displays "||Abort". Here, "||" stands for the display for two control characters: "#13#10", the delimiter between CaptionDisplay items in the SIB.

Workaround:
Both problems disapear if we export the SIB file as a SIL, then export back that SIL to the original SIB.

By the way, the new SIB is smaller that the original one. Some sections are removed, such as IsInheritedOwner, ActiveLanguage and DoNotTranslate.

Problem of that workaround:
The ExtendedTranslation section is corrupted by this workaround.
The property kind becomes "tkUnknown" instead of "tkInteger" :!:

Origin of the problem:
I dropped an eye into TsiLang sources and seen that the object "FsiCustomLang.DlgsCaptions" contains some extra Strings at the beginning of the list. Those extra strings, not from the SIB, are a Default Set of "DialogCaptions".

When "GetTextFrom" searches in that list to find "Cancel", it finds the first occurence, which is the one in the extra default Set. Then, "GetTextFrom" skips two "#01" to get the translation for the second language. Unfortunately, in the Default Dialog Set, there is only one language. After the second "#01", "GetTextFrom" find the ID of the next caption which is "#13#10Abort" and returns that as the French translation for "Cancel".

Here is the result of DlgsCaptions.Text:
'Warning'#1'Warning'#1#$D#$A
'Error'#1'Error'#1#$D#$A
...
'Cancel'#1'Cancel'#1#$D#$A
'Abort'
#1
'&Abort'#1#$D#$A
'Retry'#1'&Retry'#1#$D#$A
...
Then followed by the real DialogCaptions that come from the SIB:
'Warning'#1'Warning'#1'Avertissement'#1'Advertencia'#1#$D#$A
'Error'#1'Error'#1'Erreur'#1'Error'#1#$D#$A'
...
'Cancel'#1'Cancel'#1'Annuler'#1'&Cancelar'#1#$D#$A
'Abort'#1'&Abort'#1'&Abandonner'#1'C&ancelar'#1#$D#$A'
...
Jean-Paul Brassard
Quebec, Canada
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Could you please send us a SIB file that causes such problem to test? I mean a SIB file before your workaround and we will try to repeat all your mentioned steps.
Best regards,
Igor Siticov.
Jean-Paul Brassard
Posts: 65
Joined: Thu May 08, 2008 7:46 pm

Modification to SIB file format?

Post by Jean-Paul Brassard »

In my message, I observed that the new SIB (after the workaround) is smaller that the original one. Some sections are removed, such as
- IsInheritedOwner,
- ActiveLanguage and
- DoNotTranslate.

The last item, the list of excluded component, is seems the most important one.

Is this an optimisation to reduce file size in TsiLang Suite 6.3.1?

Or is this a bug that can cause us some promblems later on???

Moreover, what should we do with the corrupted property kind?
They become "tkUnknown" instead of "tkInteger".
Jean-Paul Brassard
Quebec, Canada
Jean-Paul Brassard
Posts: 65
Joined: Thu May 08, 2008 7:46 pm

The Workaround is only a temporary solution

Post by Jean-Paul Brassard »

Unfortunately, the workaround posted in the first message of this subject is only a temporary solution :( .

The problem comes back as soon we do a "SaveSelectedForm" command (option "Save/LoadTranslation" of the "File" menu) in TsiLangExpert.

Then we now need a fix very quickly (a line number to change is OK).

Thanks
Jean-Paul Brassard
Quebec, Canada
Jean-Paul Brassard
Posts: 65
Joined: Thu May 08, 2008 7:46 pm

Cause of the Double Captions and False Translations(?)

Post by Jean-Paul Brassard »

I think I put the finger on the bug.

The problem seems to be related with the value of "FSIBLoading" set by the method LoadAllFromFile.

The line 10215 tests FSIBLoading and that prevents the merge between default values and the dialog caption read from the SIB file.

N.B. I sent an email with more details.
Jean-Paul Brassard
Quebec, Canada
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Please check my reply by email.
Best regards,
Igor Siticov.
Post Reply