Author Topic: [SOLVED] How to make Lazarus update the .POT files  (Read 219 times)

CM630

  • Hero Member
  • *****
  • Posts: 1842
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
[SOLVED] How to make Lazarus update the .POT files
« on: October 28, 2026, 04:21:31 pm »
How to make Lazarus update the .POT files?
I tried Main menu — Project options — i18 — Force update PO files on next build but it does nothing.
Sometimes the .POT gets updated, but I still have not figured out how to make it happen.
Besides that, I do not want the .PO files autoupdated, never, only the .POT.
« Last Edit: November 10, 2026, 07:40:02 am by CM630 »
Лазар 4,8 32 bit (sometimes 64 bit); FPC3,2,2

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1254
    • Burdjia
Re: How to make Lazarus update the .POT files
« Reply #1 on: October 28, 2026, 06:04:43 pm »
Didn't it update when you recompile?  In the worst case, remove the files.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

CM630

  • Hero Member
  • *****
  • Posts: 1842
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: How to make Lazarus update the .POT files
« Reply #2 on: October 29, 2026, 11:09:22 am »
Didn't it update when you recompile?  In the worst case, remove the files.
I remove/ rename the .POT, and a new .POT is not created, until... I do not know when, it somehow it decides to create it after multiple attempts.
Лазар 4,8 32 bit (sometimes 64 bit); FPC3,2,2

wp

  • Hero Member
  • *****
  • Posts: 13712
Re: How to make Lazarus update the .POT files
« Reply #3 on: October 29, 2026, 12:36:24 pm »
I don't know whether it is possible to update pot alone without updating po also. But why don't you want to autoupdate po files? Seems like a lot of (error-prone) work to update them manually from pot.

In the Project Options, page i18n, there is a checkbox "Force update PO files on next build". And IIRC, a "Run" > "Clean up and Build" is better for updating than just "Run" > "Compile (Ctrl+F9)" or even only "Run" > "Run (F9)". In "Project" > "Resave forms with enabled i18n" there is also a possibility to recreate a damaged help system.

CM630

  • Hero Member
  • *****
  • Posts: 1842
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: How to make Lazarus update the .POT files
« Reply #4 on: October 29, 2026, 03:09:52 pm »
...But why don't you want to autoupdate po files? Seems like a lot of (error-prone) work to update them manually from pot.
For example there is lblIformation. Then you rename it to lblInformation. When Lazarus updates the .PO it deletes the translation of lblIformation, and lblInformation remains untranslated.
When only the .POT is updated and the translator updates the .PO from the .POT using a didicated tool like POEdit, it removes/ comments out lblIformation, but assigns its translated value to lblInformation (and marks it as fuzzy).

In the Project Options, page i18n, there is a checkbox "Force update PO files on next build". And IIRC, a "Run" > "Clean up and Build" is better for updating than just "Run" > "Compile (Ctrl+F9)" or even only "Run" > "Run (F9)". In "Project" > "Resave forms with enabled i18n" there is also a possibility to recreate a damaged help system.
I already tried "Clean up and Build" - it does not work for me  :'(


EDIT: Issue https://gitlab.com/freepascal.org/lazarus/lazarus/-/work_items/42699 created and fixed in Lazarus, probably will be available in Lazarus 5.0rc2.
« Last Edit: November 10, 2026, 07:40:58 am by CM630 »
Лазар 4,8 32 bit (sometimes 64 bit); FPC3,2,2

 

TinyPortal © 2005-2018