Recent

Author Topic: Poedit problems with TListBox items  (Read 2677 times)

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 586
    • Double Dummy Solver - free download
Poedit problems with TListBox items
« on: April 26, 2017, 11:05:15 pm »
I'm localizing my first large project and it seems that POEdit (unit LCLTranslator) is not picking up my ListBoxItems. They are not appearing in the MyApp.xx.po which get's updated automatically. Also, RadioGroup items aren't being picked up. Is this a known problem? Is there a work around?
« Last Edit: April 26, 2017, 11:16:12 pm by bobonwhidbey »
Lazarus 3.0RC2, FPC 3.2.2 x86_64-win64-win32/win64

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Poedit problems with TListBox items
« Reply #1 on: April 26, 2017, 11:38:06 pm »
As far as I know, LCLTranslator only looks for captions. You must change the listbox and radiogroup items manually when language changes. Use resourcestrings for their items.

Look at the translation project in the examples folder of the Lazarus installation.

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 586
    • Double Dummy Solver - free download
Re: Poedit problems with TListBox items
« Reply #2 on: April 26, 2017, 11:55:56 pm »
Besides Captions it also picks up Hints and grid.columns[].title.caption [although that is actually a caption)
Lazarus 3.0RC2, FPC 3.2.2 x86_64-win64-win32/win64

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Poedit problems with TListBox items
« Reply #3 on: April 27, 2017, 12:36:48 am »
I think the idea is not to translate user strings, such as the grid cells - people sometimes have extremely large grids, and if the translator would attempt to handle these strings the program certainly will slow down considerably.

With this in the background, I am thinking why the strings of a RadioGroup are not translated?

So, maybe you should file a feature request in the bug tracker to get the strings of the usual containers translated: TRadioGroup, TCheckGroup, TCheckListbox. Not sure about TListbox and TCombobox - the latter at least is ready to accept user input, and TListbox sometimes also contains long lists.

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 586
    • Double Dummy Solver - free download
Re: Poedit problems with TListBox items
« Reply #4 on: April 27, 2017, 01:19:28 am »
Thanks wp. I'll file that request. Those words (in list boxes) are all necessary translations in my app; however I can change most of them to ResourceStrings. It would be nice if there were also resource string arrays.
Lazarus 3.0RC2, FPC 3.2.2 x86_64-win64-win32/win64

 

TinyPortal © 2005-2018