Recent

Author Topic: Translation does not work no matter what  (Read 3559 times)

Alienizering

  • New Member
  • *
  • Posts: 11
Translation does not work no matter what
« on: May 18, 2022, 01:07:17 am »
Running Laz 2.2 on Win10/64. If I create a new app, turn on i18n and set both check boxes, folder etc, include the DefaultTranslator in the uses clause, have ResourceString set etc build, I get the .pot file in the language folder. However, if I load my app, which was originally created with a much older version of laz, 1.8 I think, is now compiling fine in 2.2, I can't get the translator to create the .pot files, no matter what I do. I followed all instructions, even did exactly what the examples/translate project do, to no avail. I also clean the files like the ppu, lrs etc to no avail. Even building from the menu not the shortcut keys. I tried anything I can think of!!!

Could it be that because my project was created using an older version of Laz? Anyone else have this problem?

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Translation does not work no matter what
« Reply #1 on: May 18, 2022, 02:04:53 am »
No Alienizering, it won't be because of the applications history.  I suspect Lazarus is waiting to see a change to the app before generating new po files.

Have you tried ProjectOptions -> i18n -> Force Update PO files on next Build ?  Small tick box lower part of options screen.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Alienizering

  • New Member
  • *
  • Posts: 11
Re: Translation does not work no matter what
« Reply #2 on: May 18, 2022, 03:03:19 am »
Thanks for your reply Davo. Yes, I have tried that too. I even loaded the forms, change something.

I've noticed something in my code, instead of having...

implementation
{$R *.lfm}

I didn't have {$R *.lfm} but I had {$R *.lrs} under the initialization section. So I changed all my forms and now I do get the .pot file but only for the main form not the other. Any ideas why I don't get the .pot files for the other forms?

Thanks, I appreciate you taking the time to help me.

Alienizering

  • New Member
  • *
  • Posts: 11
Re: Translation does not work no matter what
« Reply #3 on: May 18, 2022, 04:38:22 am »
I got it to work fine now. I had to include the files in the project inspector, then I had to move each forms a bit and save, so it create the .lrt file for it. Doing a build now create a single .pot file with everything in it.

 

TinyPortal © 2005-2018