Recent

Author Topic: lazarus "i18n" PO Output Directory setting, Users are easily misled  (Read 330 times)

gasensor

  • New Member
  • *
  • Posts: 15
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.


wp

  • Hero Member
  • *****
  • Posts: 9735
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).
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

dsiders

  • Hero Member
  • *****
  • Posts: 649
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.
Lazarus 2.0.12, 2.2.0, 2.2.2, 2.3.0 (Git) / FPC 3.2.0, 3.2.2, 3.3.1 / x86 64-bit / Windows 8.1
Preview Lazarus 2.3.0 documentation at: https://dsiders.gitlab.io/lazdocsnext

CCRDude

  • Hero Member
  • *****
  • Posts: 535
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 :)

dbannon

  • Hero Member
  • *****
  • Posts: 2037
    • tomboy-ng, a rewrite of the classic Tomboy
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
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

 

TinyPortal © 2005-2018