New component & resource files

Issue #36 wontfix
Tomáš Emresz created an issue

Hi,

I have an aplication and trying to add lang change manually. I have compiled some resource files (as aplication is in czech, I also add czech for simply change czech texts also). Then I add combobox and in formcreate event I tried to add langs by files in application directory. So, when I compiled resource files, I didn’t have this component on form (I added it later). In formcreate, i have cmbLangs.items.add ('');

But. When I have this older app.CSY in app directory, cmbLangs is nil, so it seemslike resourcefiles contains also components? When I remove this app.CSY, cmbLangs is ready to go. When I push update button in BTM, then compile RFs, all is also good. So when I add some components, need I also recompile RFs every time?

So, my question is - how can I add components to my app without needs to recompile all RF, it is possible ? (As I and translators are in other teams).

How to test (this is how I did with my app) :

  1. Make some app with 1 text for example.
  2. Import it to BTM. Add the same lang as you have in windows (I thing that it is the same as other lang, when you switch your windows lang or run on other computer lang)
  3. Compile RFs.
  4. Run app, try it.
  5. Add new component to app.
  6. WITHOUT recompiling RFs, run it. This component is nil now.

Comments (3)

  1. Anders@Melander

    This is "as designed".

    A resource/language module is a DLL that contains translated copies of the resourcestrings and DFM resources from the exe file. If you change the resourcestring or DFM resources in the exe file then you also need to update the resources in the resource/language modules. All translation systems that uses resource modules works this way.

    I suggest you don't build the resource modules on your development system - or at least delete the resource modules once you've tested them. That way you don't get these conflicts while you're developing.
    In BTM itself I avoid this problem by using a resource module loader that checks if the versioninfo resource is the same in the exe and the module, and it also checks if the timestamp between the two isn't too far apart. See amLocalization.Utils.pas

    I don't know how your workflow is but there really shouldn't be a problem with translators. A translator would normally just use BTM (or some other tool) to translate the texts without access to the compiled application. If they need to be able to run the application then they can just build the resource modules from the translation project.

  2. Tomáš Emresz reporter

    Thanks for description. I’ll look for adequate workflow, maybe build events for release mode. Will see.

  3. Log in to comment