View Issue Details

IDProjectCategoryView StatusLast Update
0037506LazarusLCLpublic2020-08-13 14:59
ReporterRob Muller Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.0.6 
Summary0037506: TEdit.texthint not translated
Descriptioni see my TEdit.texthint entries in the .po file
they are translated.
when i switch to the translated language, all is translated but the texthint
Steps To Reproducecreate texthint for tEdit field
translate via i18n
translate <langid>.po file to <langid>
execute program with --lang=<langid>
TagsNo tags attached.
Fixed in Revisionr63718
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0037553 closedJuha Manninen after rev 63725 not work memo.lines.add 

Activities

Juha Manninen

2020-08-10 08:49

developer   ~0124710

Can you please provide a test application. Sources zipped.

Rob Muller

2020-08-11 11:55

reporter   ~0124749

Zip of project directory test attached.
test.zip (527,689 bytes)

Juha Manninen

2020-08-11 17:17

developer   ~0124770

Please test with Lazarus trunk r63718.

My knowledge of localization stuff is limited. Is procedure CreateLangResource() really needed?

Your project had -dDisableUTF8RTL. Why?

wp

2020-08-11 17:20

developer   ~0124771

Last edited: 2020-08-11 17:23

View 2 revisions

I am attaching a simpler demo using a simple TEdit instead of TLabeledEdit and simple po files without access to resources which can pose problems on their own.

Running this (and your) demo on Windows does not show the issue. On Linux I cannot see it on qt5 either, but I do see it on gtk2 and on qt. On gtk2/qt I noticed that when I put the cursor into one of the LabeledEdits and then focus some other control the dutch translated text suddenly appears.

Therefore, I think this is not a translation issue but something related to widgetsets.
edit_only.zip (3,431 bytes)

Juha Manninen

2020-08-12 01:12

developer   ~0124783

> Therefore, I think this is not a translation issue but something related to widgetsets.

More precisely it is related to the emulated TextHint system in LCL, made for widgetsets like GTK2 that do not have a native TextHint.
I think I fixed it in r63718. I also simplified the code in r63725.

Rob Muller

2020-08-12 11:55

reporter   ~0124789

#juha
>Your project had -dDisableUTF8RTL. Why?
must have click that during experimenting. retested, on 2.0.6 no difference.
>Is procedure CreateLangResource() really needed?
yes, that unpacks the embedded resource into a usable translation file when the program is run from a location w here there is no translation file found.it is currently unix specific (using /tmp).

i will install Lazarus trunk r63718 and retest asap.
@wp
>On Linux I cannot see it on qt5 either, but I do see it on gtk2 and on qt.
i see the same behavior on gtk2 and qt5. when translated, clicking in the labelededit always brings up the translation for labelededit1. different issue, i think.

Juha Manninen

2020-08-12 13:27

developer   ~0124793

Last edited: 2020-08-12 13:28

View 2 revisions

> i see the same behavior on gtk2 and qt5. when translated, clicking in the labelededit always brings up the translation for labelededit1. different issue, i think.

QT5 has a native TextHint. It behaves slightly differently than the emulated one. It is visible also when a control has focus but its Text=''.
IMO this is intuitive and nice.
If you see a bug there, please explain more.

Rob Muller

2020-08-12 15:57

reporter   ~0124799

Can someone guide me how to install Lazarus trunk r63718 or r63725?
I googled, but could not find how to do this.
i did install 2.0.10 from the deb files, but no change.

Rob Muller

2020-08-12 16:12

reporter   ~0124800

@Juha
experimenting further, i reinstalled the 2.0.6 from the repositories as 2.0.10 installed from the deb file (lazarus-project_2.0.10-0_amd64.deb) gives me an error when selecting qt5.
2. 0.6 qt5 behaves as you state, so no issue there.

Juha Manninen

2020-08-12 19:15

developer   ~0124805

Last edited: 2020-08-12 19:18

View 3 revisions

> Can someone guide me how to install Lazarus trunk r63718 or r63725?

See:
 https://wiki.freepascal.org/Getting_Lazarus#Development_version_of_Lazarus
Just do
$ svn co https://svn.freepascal.org/svn/lazarus/trunk lazarus_trunk
Later update with
$ svn up
You can build it with the FPC version provided by your distro. Just run "make", then "./lazarus &". No installation needed. You can have many versions from SVN the same way.
Please ask more info about building etc. in forum or mailing list.

Rob Muller

2020-08-12 20:53

reporter   ~0124809

>Please ask more info about building etc. in forum or mailing list.
sorry, i am very new to the lazarus ecosystem, 2 weeks in. mea culpa.

the good news is with this update the issue is solved.

thanks, juha!

Juha Manninen

2020-08-13 14:59

developer   ~0124841

Ok, resolving.

Issue History

Date Modified Username Field Change
2020-08-07 15:15 Rob Muller New Issue
2020-08-10 08:49 Juha Manninen Note Added: 0124710
2020-08-11 11:55 Rob Muller Note Added: 0124749
2020-08-11 11:55 Rob Muller File Added: test.zip
2020-08-11 17:14 Juha Manninen Assigned To => Juha Manninen
2020-08-11 17:14 Juha Manninen Status new => assigned
2020-08-11 17:17 Juha Manninen Status assigned => feedback
2020-08-11 17:17 Juha Manninen LazTarget => -
2020-08-11 17:17 Juha Manninen Note Added: 0124770
2020-08-11 17:20 wp Note Added: 0124771
2020-08-11 17:20 wp File Added: edit_only.zip
2020-08-11 17:23 wp Note Edited: 0124771 View Revisions
2020-08-12 01:12 Juha Manninen Note Added: 0124783
2020-08-12 10:36 Juha Manninen Relationship added related to 0037553
2020-08-12 11:55 Rob Muller Note Added: 0124789
2020-08-12 11:55 Rob Muller Status feedback => assigned
2020-08-12 13:27 Juha Manninen Note Added: 0124793
2020-08-12 13:28 Juha Manninen Note Edited: 0124793 View Revisions
2020-08-12 15:57 Rob Muller Note Added: 0124799
2020-08-12 16:12 Rob Muller Note Added: 0124800
2020-08-12 19:15 Juha Manninen Note Added: 0124805
2020-08-12 19:17 Juha Manninen Note Edited: 0124805 View Revisions
2020-08-12 19:18 Juha Manninen Note Edited: 0124805 View Revisions
2020-08-12 20:53 Rob Muller Note Added: 0124809
2020-08-13 14:59 Juha Manninen Status assigned => resolved
2020-08-13 14:59 Juha Manninen Resolution open => fixed
2020-08-13 14:59 Juha Manninen Fixed in Revision => r63718
2020-08-13 14:59 Juha Manninen Widgetset GTK 2 => GTK 2
2020-08-13 14:59 Juha Manninen Note Added: 0124841