SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Empty DialogCaptions when 6.3.1 reads a 6.3.0.2 SIB File

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
Jean-Paul Brassard



Joined: 08 May 2008
Posts: 65

PostPosted: Fri Jan 16, 2009 6:17 pm    Post subject: Empty DialogCaptions when 6.3.1 reads a 6.3.0.2 SIB File Reply with quote

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.* Crying or Very sad .

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" Exclamation

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'
...
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Sat Jan 17, 2009 6:57 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Jean-Paul Brassard



Joined: 08 May 2008
Posts: 65

PostPosted: Mon Jan 19, 2009 10:33 pm    Post subject: Modification to SIB file format? Reply with quote

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".
Back to top
View user's profile Send private message
Jean-Paul Brassard



Joined: 08 May 2008
Posts: 65

PostPosted: Wed Jan 21, 2009 1:20 am    Post subject: The Workaround is only a temporary solution Reply with quote

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

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
Back to top
View user's profile Send private message
Jean-Paul Brassard



Joined: 08 May 2008
Posts: 65

PostPosted: Wed Jan 21, 2009 4:51 am    Post subject: Cause of the Double Captions and False Translations(?) Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Wed Jan 21, 2009 9:42 am    Post subject: Reply with quote

Please check my reply by email.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group