Lazarus

Miscellaneous => Translations => Topic started by: gasensor on May 17, 2022, 06:46:01 pm

Title: lazarus "i18n" PO Output Directory setting, Users are easily misled
Post by: gasensor on May 17, 2022, 06:46:01 pm
User can set the PO Output Directory freely in lazarus. However, the PO Output Directory should be "languages","locale" or "locale/LangID/LC_MESSAGES". Otherwise the user program will not display correctly. It is not mentioned anywhere.

Maybe, it is a good idea that change it form TEdit to TRadioButton.

Title: Re: lazarus "i18n" PO Output Directory setting, Users are easily misled
Post by: wp on May 17, 2022, 07:30:06 pm
The directories are hard-coded in the LCLTranslator unit. But you can use the translation system also without LCLTranslator, and in this case you have full control over the location of the po files (https://wiki.lazarus.freepascal.org/Getting_translation_strings_right#ResourceStrings_in_your_Application).
Title: Re: lazarus "i18n" PO Output Directory setting, Users are easily misled
Post by: dsiders on May 17, 2022, 08:16:08 pm
User can set the PO Output Directory freely in lazarus. However, the PO Output Directory should be "languages","locale" or "locale/LangID/LC_MESSAGES". Otherwise the user program will not display correctly. It is not mentioned anywhere.

Maybe, it is a good idea that change it form TEdit to TRadioButton.

The requirement is documented in the LCLTranslator unit:

https://dsiders.gitlab.io/lazdocsnext/lcl/lcltranslator/index.html

But it is not mentioned in the Context Help used in the IDE dialog:

https://wiki.lazarus.freepascal.org/IDE_Window:__Project_Options#i18n

I am not sure who maintains that information on the wiki. Perhaps you could file a bug report for it.
Title: Re: lazarus "i18n" PO Output Directory setting, Users are easily misled
Post by: CCRDude on May 17, 2022, 08:36:27 pm
If you speak about the path, it would fit better into Compiler Options / Paths for me.
I've got a project with multiple build modes, with different target folders for the executables, and possibly different strings per mode (branding).
But then, it could not be easily updated when saving .lfm files...

The way it currently is works fine :)
Title: Re: lazarus "i18n" PO Output Directory setting, Users are easily misled
Post by: dbannon on May 18, 2022, 01:59:50 am
As CCRDude said, the location set in Lazarus is more about where the files are stored during development and where the build system will look for them.

At run time is a different thing, its pre-determined in the Translator and complies with most operating systems defaults.

https://wiki.freepascal.org/Everything_else_about_translations#Where_a_Lazarus_App_looks_for_Language_Files is linked off the main i18n page, https://wiki.freepascal.org/Translations_/_i18n_/_localizations_for_programs

Davo
TinyPortal © 2005-2018