Jump to content
cstarling1989

Better Translation Manager(BTM) and hint texts

Recommended Posts

I would like to give users of my software the possibility of setting/assigning hint texts to controls for which I have not yet set a hint text.
However, no hint line appears in the BTM for these controls because no line is set for them in the FRM file.
If I enter a dummy text with a space so that something appears in the BTM for modification, an empty hint text is always displayed.


Does anyone have any idea how I can solve my problem?


Thank you!

Share this post


Link to post

I haven't tried this but I would have thought just assigning a text string to the components "hint" property at run time would make it appear.....

Share this post


Link to post

I'm not sure I understand you. Where would your users specify the hint texts? In BTM?

 

If so you can configure BTM to synthesize properties in case the property "default" mechanism caused them not to be stored.
This is already done for the TField.DisplayLabel property which isn't stored in the DFM if its value equals the FieldName property:
image.thumb.png.a3f4c64145f0643ae28cbb0a17f6d965.png

 

So you need to specify:

  1. The control type as a regular expression.
  2. The name of the property to synthesize. Hint in your case.
  3. The synthesized value of the property. Probably just an empty string in your case.

The problem here is that you probably want this done for lots of different controls so I'm not if this is feasible for you.

 

It would of course best if you could just set the default hint texts in your base language so there's something to translate. Surely, if a control needs a hint text in one language, it needs it in all languages.

Share this post


Link to post

This

On 2/19/2024 at 10:12 PM, Anders Melander said:

t would of course best if you could just set the default hint texts in your base language so there's something to translate. Surely, if a control needs a hint text in one language, it needs it in all languages.

or I would suggest to keep going with dummy spaces and to remove then at runtime. Then, no hints are displayed where none are there to display.

Share this post


Link to post
7 hours ago, Sherlock said:

keep going with dummy spaces and to remove then at runtime.

Yes, I guess that could be done; Hook into the application OnShowHint handler and suppress empty hints.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×