Recent

Author Topic: lpi file correction [Solved]  (Read 1462 times)

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
lpi file correction [Solved]
« on: October 21, 2018, 11:36:52 am »
I changed the name of a form and after compiling and building I changed the name of the corresponding unit. The form is now called frmSetDisplay and the unit is now called SetDisplay.

The lpi file has retained the earlier form name - frmSettings. The two screen shots show the affected names.

Everything compiles, builds and runs, except the po files. (This is an i10n project.) At the moment, I do not know whether these are related problems.

I have used the Project|Options to create a separate session file (lps).
Is there a way to force generation of a new lpi file?

I am using Linux Mint 19 Cinnamon 64bit o a PC and have tried Lazarus 1.8, 1.8 fixes and 2.0 RC1. All behave in the same way.

« Last Edit: October 21, 2018, 12:57:54 pm by Windsurfer »

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: lpi file correction
« Reply #1 on: October 21, 2018, 12:06:48 pm »
How did you change the name of the unit? Inside Lazarus, "Save as" with a new name? This would be the correct way because the IDE takes care of renaming all references. Or did you rename it outside the IDE? Not good... I would simply revert the steps done, i.e. rename it back (outside the IDE), and then save the unit from the IDE with its new name. Or, if the unit is still listed  in the Project Options with its old name, you could also try to remove it from the project and to add the renamed unit. Delete the ppu folder to enforce clean recompilation of the project (or do "Run" > "Build", or "Run" > "Clean up and Build" - but I've had issues with the first one, and the second one takes quite long).

Quote
Is there a way to force generation of a new lpi file?
Save the project under a new name?

Disclaimer: Not tested. Make a backup of your project before following these tips.

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: lpi file correction [Solved]
« Reply #2 on: October 21, 2018, 12:57:27 pm »
Hi wp, thanks for your help,

I 'think' I did everything the correct way in terms of renaming units and forms, but can't now be sure.

When hdpi became available, I moved the project to an hdpi PC and worked on it there. The problems appeared when I moved it back to another folder next to the original. I found that it pointed to the old 'published' and 'languages' folders These had never been used on the second pc.  I have now edited the lpi file manually to correct it. Things seem to work properly. Everything is now named correctly and everything seems to work, except that I cannot force po file updates from the Project|Options. I think that is a separate problem and will open a separate thread, after some research and experimenting.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: lpi file correction [Solved]
« Reply #3 on: October 21, 2018, 01:14:52 pm »
Ah, maybe it's this: In the i18n config page of the project options there's a "Force update po file on next build". Check this and do a "Run" > "Clean up and Build". Or try "Project" > "Save forms with enabled i18n" (which is disabled here, though).

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: lpi file correction [Solved]
« Reply #4 on: October 21, 2018, 01:52:16 pm »
I have tried all of those. In particular, I noticed that 'Force update po file on next build' does not always change the date on the po file. It could be that the file was read and not changed, therefore the date was not changed.

I have defaulttranslator in the project file uses and LCLTranslator in the uses of the main unit and another form from which languages are changed. The wiki is not uptodate. This project used to work perfectly, so I am a little puzzled. As I said, I will look further and open another thread.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: lpi file correction [Solved]
« Reply #5 on: October 21, 2018, 05:31:37 pm »
Please post your question on the Lazarus mailing list which is read by Maxim Ganetsky who takes care of the translation system.

 

TinyPortal © 2005-2018