TsiLangRT.StorageFile doesn't get TsiLangDispatcher.FileName
Posted: Wed Jun 08, 2005 2:32 pm
I have a TsiLangDispatcher on a data module shared by all forms in the application.
On each form I place a TsiLangRT component and set its LangDispatcher property.
But TsiLangRT.StorageFile doesn't "inherit" the TsiLangDispatcher's FileName (and so also doesn't get updated whenever the dispatcher's file name is changed).
I can work around this at run-time. I have an application-level event that traps Ctrl+T keypresses, searches Screen.ActiveForm for a component of type TsiLangRT and calls the following code on it:
StorageFile := siLangComp.LangDispatcher.FileName;
EditAll;
But what do I do at design time? I don't want to hard-code TsiLangRT.StorageFile on all of 600+ forms.
Our version control system is largely path independent, except for LangDispatcher.FileName and the ADO connection's file name for the UDL file.
It's okay to have to change those each time a new feature branch (and working copy) are created in the version control system. But not on 600+ forms!
Worse still, when the feature branch is merged back into the main line of development, those 600+ file names will be incorrect in the main line, and will have to be changed back again. Yuck.
Am I missing something? Is there some simple way of specifying the translation file in just one place?
On each form I place a TsiLangRT component and set its LangDispatcher property.
But TsiLangRT.StorageFile doesn't "inherit" the TsiLangDispatcher's FileName (and so also doesn't get updated whenever the dispatcher's file name is changed).
I can work around this at run-time. I have an application-level event that traps Ctrl+T keypresses, searches Screen.ActiveForm for a component of type TsiLangRT and calls the following code on it:
StorageFile := siLangComp.LangDispatcher.FileName;
EditAll;
But what do I do at design time? I don't want to hard-code TsiLangRT.StorageFile on all of 600+ forms.
Our version control system is largely path independent, except for LangDispatcher.FileName and the ADO connection's file name for the UDL file.
It's okay to have to change those each time a new feature branch (and working copy) are created in the version control system. But not on 600+ forms!
Worse still, when the feature branch is merged back into the main line of development, those 600+ file names will be incorrect in the main line, and will have to be changed back again. Yuck.
Am I missing something? Is there some simple way of specifying the translation file in just one place?