I’ve been on holiday, which is why I’m a bit late in replying.
I’ve read through the very interesting discussion and tested the various suggestions.
Updating the PO files is part of our translation process. All I need is an up-to-date POT file containing all the latest texts of the application. Ideally, without the LCL texts, as these are located in the /lazarus/languages folder and it’s sufficient to include these.
Regarding our tests:We created a POT file from *.rsj files in
./lib/$(TargetCPU)-$(TargetOS)/*.rsj using
updatepofiles:
touch ./test.pot
updatepofiles --searchdir=./lib/x86_64-win64/ ./test.pot
The method using FOR does not work, as you have to pass all files to `updatepofiles` at the same time.
The POT file contains all the texts from the
ResourceString sections of all the units used. As expected, the texts from the LCL are missing.
Unfortunately, the texts from the Object Inspector contained in the *.lfm files are missing. These are located in the *.lrj files, which are in the same directory as the *.lfm files.
LazBuild does not create them automatically when building the application.
According to
https://wiki.freepascal.org/Lazarus_project_files, you should check these *.lrj files into version control.
Technically, you could also include the *.lrj files in the POT file using
updatepofiles.
However, we face the problem that we have forms stored in the standard forms. These are used by several applications, but not every application requires all the forms. This makes it difficult to identify the correct *.lrj files.