auto translate big projects

This forum designated to discuss the TsiLang Components Suite.
Post Reply
geldo79
Posts: 11
Joined: Tue Feb 21, 2017 9:09 am

auto translate big projects

Post by geldo79 »

Hi,

I think i asked this question some time ago, but maybe there are news?!

What i would like to do (and what is an inconvenient way at the moment) is to add a new language to a big project and do an automatic translation for the whole project. For this, i first want to generate a dictionary from the existing project. At the moment, i use the following way : open the tsilang-expert in my project, save project-properties (captions) to .SIL file. As the .SIL-file may contain duplicate entries, i have to convert that file into one which shows each term only once (remove all duplicates). I wrote my own little tool to do this. I then can open that file in excel, add one column for the new language, and send that file to a tranlastion agency. When i get back my file with all translations, I can import that file using the dictionary manager and create a dictionary from it. Then I would translate the .SIL-file to the new language using the SIL-Editor and the generated dictionary. The last step would be to import the SIL-file into my project (again using the tsilang expert).

My Questions:

- Overall, that procedure is a bit complicated. Is there a better and faster way to do this?
- The procedure of exporting project properties (captions) into a SIL-File, and later importing them again, has a big disadvantage : Frames which are placed on forms, will not be updated. The dictionary contains all information how to translate all terms, but as it is a frame which is placed on a form, only the frame itself is translated, and none of its instances inside my project. Thus, I have to manually translate all instances of that frame using the dictionary. If this process could be automatically done, it would be a great benefit.

Up to now, everytime I have to translate my project into a new language, I would really like to skip that procedure. It's no fun :?

Greeting Christian

isiticov
Site Admin
Posts: 2265
Joined: Thu Nov 21, 2002 3:17 pm

Re: auto translate big projects

Post by isiticov »

Hello,

Below is the way we use in similar cases:
  1. Export project translations to SIB file using TsiLang Expert.
  2. Open generated SIB file in the SIl Editor.
  3. Add a new language to the SIB file and auto-translate the whole SIB file with our "big" dictionary file using Dictionary | Auto-translate.
  4. In Dictionary Manager create a new empty dictionary with the base language inside only.
  5. Export base language and the new one from the SIB file to the dictionary using Dictionary | Add Language and select the new language.
  6. Send the created DIC file to translators.
  7. After receiving the translated DIC file retrieve the translations into SIB file using again Dictionary | Auto-translate or Dictionary | Translate | Language in the SIL Editor.
  8. Load the SIB file back to project using TsiLang Expert.
  9. Merge DIC file with new language into the big one from 3 in order to reduce future translation costs.
save project-properties (captions) to .SIL file
Are you sure you need to translate ONLY captions? All other string properties most time need to be translated as well.
Frames which are placed on forms, will not be updated
Did you set IsInheritedOwner property to True for the TsiLang components on these frames? If this property is True and translations in "placed" frames don't differ from the base then the translations from the base frame will be used.
Best regards,
Igor Sitikov.

geldo79
Posts: 11
Joined: Tue Feb 21, 2017 9:09 am

Re: auto translate big projects

Post by geldo79 »

Did you set IsInheritedOwner property to True for the TsiLang components on these frames? If this property is True and translations in "placed" frames don't differ from the base then the translations from the base frame will be used.
It tried that. But the problem already starts when i create my sil-file using tsilang expert. Here, only one entry (for the captions of the frame itself) is written to the file. Thus, there is e.g. an entry for FrameA.Label1.Caption, but not for FormX.FrameA.Label1.Caption.

Greetings Christian

geldo79
Posts: 11
Joined: Tue Feb 21, 2017 9:09 am

Re: auto translate big projects

Post by geldo79 »

Thus, if the "save project properties" feature in the tsilang expert would export everything like

[Captions]
FormA.FrameA.LabelA=Caption
FormB.FrameA.LabelA=Caption
FormC.FrameA.LabelA=Caption
.
.
.
and not only

FrameA.LabelA=Caption,

I would be able to update all translations by loading project properties from a sil-file. At the moment, none of the Frames in my project ( except the frame itself which is not used directly, but only placed on forms ) will be translated.

Greetings Christian

isiticov
Site Admin
Posts: 2265
Joined: Thu Nov 21, 2002 3:17 pm

Re: auto translate big projects

Post by isiticov »

We will try to find a way to implement this.
Best regards,
Igor Sitikov.

geldo79
Posts: 11
Joined: Tue Feb 21, 2017 9:09 am

Re: auto translate big projects

Post by geldo79 »

Great :D

geldo79
Posts: 11
Joined: Tue Feb 21, 2017 9:09 am

Re: auto translate big projects

Post by geldo79 »

I tested again to add a new language to a sil-file and update my complete project that way. I have seen now that the problem is a bit different than described before:

The placed frames are updated in general. But not if the captions of the placed frame have been edited manually before. In that case, a new entry for translations of the frame is inserted into the .dfm-file of the form where the frame is placed on. I expected the TsiLang Expert to overwrite these entries as well. But when it sees an entry for translations of the frame in the .dfm of the form where it is placed on, it does not overwrite the entries.

I might of course delete all translation sections of the placed frames in the forms, because it does not really make sense to edit the placed frame translations instead of the translations of the frame itself. But of course it would also be nice if i could tell the Tsilang expert to overwrite all translations of placed frames.

Greetings Christian

isiticov
Site Admin
Posts: 2265
Joined: Thu Nov 21, 2002 3:17 pm

Re: auto translate big projects

Post by isiticov »

Could you please create a small sample that reproduces your case exactly and send it to us? That would help a lot.
Best regards,
Igor Sitikov.

geldo79
Posts: 11
Joined: Tue Feb 21, 2017 9:09 am

Re: auto translate big projects

Post by geldo79 »

The most simple example should be a project with only one form and one frame. And the frame has to be used/placed on the form. Then, you should open the translations of the placed frame by clicking on the silanglinked symbol on the placed frame. Do some edits and save. When the translations of the frame itself is edited afterwards then (e.g. using Tsilang expert => load project), the translations of the placed frame will not be updated any more. And as the sil-file only contains information of the frame itself and not its inherited instances, an update of the sil-file will not update the placed frame anymore, unless you remove the translations-part of the frame inside the .dfm of the form. Maybe that behaviour is wanted, i don't know. But for me it is a problem, because lots of people are working on the project, and there always might be someone who edits translations directly on the placed frame and not on the frame itself (which would of course be better). But if they do so, the placed frames are excluded from all future updates done by the Tsilang expert, unless the translations section of the placed frame inside the .dfm of the form where it is placed on is removed manually.

Need more info?

Post Reply