"i18n Options > Create/update.po file..." doesn't work properly lazarus / 31-LCL ---------------------------------------------------------------------- Ñuño_Martínez · 2020-08-17 10:20 I've found an annoying behavior on the i18n on Lazarus 2.0.10:  It removes all resourcestrings from one and only one of the frames of my application.  Any other resourcestring is correctly saved.  If I edit the .po file externally and add the removed resourcestrings then the frame is properly translated. Frame has only two controls:  TDividerBevel and TComboBoxEx. Is it a bug, an issue or did I miss something? ---------------------------------------------------------------------- lainz · 2020-08-17 11:43 I lost all my English translations with an old project in trunk so maybe is a similar issue. Seems fixed btw in latest trunk. Same was happening with Lazpaint the deletion of parts of the translations. The solution is the same thing you did. I did not report it because I can't reproduce it in a new project. But I have discussed it here in the forum. ---------------------------------------------------------------------- Ñuño_Martínez · 2020-08-17 16:09 So it is a bug.  Nice to know that trunk fixes it but annoying to wait.  I don't wan't to install an older Lazarus version. ---------------------------------------------------------------------- lainz · 2021-01-08 14:06 Still not working in trunk, today loosing my translations ---------------------------------------------------------------------- trev · 2021-01-08 21:22 Has someone logged the bug in the BugTracker? If not, it's unlikely it will ever be fixed. ---------------------------------------------------------------------- lainz · 2021-01-08 21:46 Quote from: trev on January 08, 2021, 10:22:20 pmHas someone logged the bug in the BugTracker? If not, it's unlikely it will ever be fixed. Yes I reported it here https://bugs.freepascal.org/view.php?id=38331 ---------------------------------------------------------------------- dbannon · 2021-01-08 22:48 This is a bit scary, I can imagine having translations 'lost' and I would not notice because I rarely look at the translated app and even if I did, I might think the translation is the same as the English word. End users would just assume that the translation to their language is incomplete. Only the translators themselves would pick it up. Is there anything we can do to help isolate this problem ? Should we check the number of lines in each .po file after a build ? In Iainz's example, the problem is "Printer", could it be that only words that exist in LCL's .po file  are being dropped ? Davo ---------------------------------------------------------------------- lainz · 2021-01-08 22:52 I'm not sure, a thing in common in the projects that this happen is that they have a lot of forms (LazPaint and the project I work on). Strange that this doesn't happen in Lazarus project itself... Another thing is that these projects has translations since a lot of time ago, maybe some breaking change? ---------------------------------------------------------------------- dbannon · 2021-01-09 02:23 My project has just over 400 translation strings, maybe 12 to 15 forms.  I don't know if you consider that a lot. But its relatively new, did not use translations until (I think) 2.0.x of Lazarus so, no 'old' data in there. I do not know if I have ever lost a translation, thats the issue really IMHO, it can easily slip past my normal release tests. Maybe I'll go back over recent git commits and see if diff flags things being removed that I don't remember removing. If its happening then my data may increase our info base ! Davo ---------------------------------------------------------------------- lainz · 2021-01-09 02:35 Thanks. Even if in your program there is no lost translation is good to know that doesn't happen in new projects. ---------------------------------------------------------------------- lainz · 2021-01-09 03:29 Ok, in the bugtracker Maxim Ganetsky helped me to find the bug. The problem was that in the projects the .lrj files was in the gitignore, and these .lrj files are needed to create the translations, so these files must be shipped with the sourcecode as well. So the solution is to open every single form in the project, move something a button or a component, then save the form. Then a .lrj file is created. Then rebuild the program and the .po file is correctly generated! As I promised in the bug report, I've added some small explanation of .lrj files in the translations wiki https://wiki.freepascal.org/Translations_/_i18n_/_localizations_for_pr ograms#Translating_Forms ---------------------------------------------------------------------- dbannon · 2021-01-09 11:06 Well, thats interesting.  I suspect I have not been effected because I always generate my .pot and .po files on the same machine and it did have its full complement of .lrj files. I have made a note on the https://wiki.freepascal.org/File_extensions wiki page too.  Nice catch folks ! Davo ---------------------------------------------------------------------- Ñuño_Martínez · 2021-02-08 13:39 Quote from: lainz on January 09, 2021, 04:29:03 amOk, in the bugtracker Maxim Ganetsky helped me to find the bug. (...) That's weird. I don't use GIT so I shouldn't be afected by gitignore stuff.  Also I remove the temporary files (.o, .ppu, .lrj...) and it still not generate the .po correctly (should made more tests moving the components though). Anyway, thanks for the tips. ---------------------------------------------------------------------- lainz · 2021-02-08 16:00 Quote from: Ñuño_Martínez on February 08, 2021, 02:39:18 pmQuote from: lainz on January 09, 2021, 04:29:03 amOk, in the bugtracker Maxim Ganetsky helped me to find the bug. (...) That's weird. I don't use GIT so I shouldn't be afected by gitignore stuff.  Also I remove the temporary files (.o, .ppu, .lrj...) and it still not generate the .po correctly (should made more tests moving the components though). Anyway, thanks for the tips. You must not delete .lrj files, that's the problem.