Error translating dbgrid column titles

VictorUlloa, Mon Jan 24 2022, 12:50PM

Hello!

After activating the Localization and setting translation values for the labels in grid with form app, the dbgrid column titles are not translated.  They show values like this:

.translate('software_edicion_dbgrid_1_nombresoftware').

I examined the generated code and found that the column is added to the grid using this code:

$this->AddColumn('software_pkSoftware',".translate('software_edicion_dbgrid_1_pksoftware').",'true','false','false','cDbField','','',"");


I changed it to (to experiment), editing the generated file:

$this->AddColumn('software_pkSoftware',translate('software_edicion_dbgrid_1_pksoftware'),'true','false','false','cDbField','','',"");


As you can see, I removed the quotes and the dots around the title parameter for the AddColumn method.  This solves the problem, the title in the column is shown ok, (but obviously the file is overwritten every time I regenerates the app).   So I think there's an error in the generated code.

Re: Error translating dbgrid column titles
administrator, Mon Jan 24 2022, 09:04PM

Created issue in the bugtracker. See link