Page 1 of 1

Tooltips for language files

Posted: Thu Jan 25, 2024 8:06 pm
by Tata
Right now I work with config help tooltips and I think about putting some tooltips for language files as well. But can't find the way how to.
The tooltips for config are put as

Code: Select all

$plugin_tx['plugin']['cf_function']="...string..."
It would be nice to have also

Code: Select all

$plugin_tx['plugin']['hlp_function']="...string..."
Sometime wrongly written language string may break the whole website. This way at least the warning or advises{examples could be provided.

Re: Tooltips for language files

Posted: Fri Jan 26, 2024 7:07 pm
by lck
Tata wrote:
Thu Jan 25, 2024 8:06 pm
It would be nice to have also

Code: Select all

$plugin_tx['plugin']['hlp_function']="...string..."
Sometime wrongly written language string may break the whole website. This way at least the warning or advises{examples could be provided.
As far as I know, this function does not "yet" exist in CMSimple_XH.
I would move the data from the language file to config.php, in my opinion this would also be the right place.
Here you can also use "bool", "enum", "xenum" ... in the metaconfig.php. can be used. See, for example, the "Login-Info_XH" from Olaf.
And, by using metaxx.php (metade.php & metaen.php ...) in the language folder, you can also create the labels in other languages.

Re: Tooltips for language files

Posted: Sat Jan 27, 2024 9:41 am
by Tata
lck wrote:
Fri Jan 26, 2024 7:07 pm
And, by using metaxx.php (metade.php & metaen.php ...) in the language folder, you can also create the labels in other languages.
More than the labels in config, I meant hints/warnings right in the language files, as to what shall/must not be put into the language strings.
This could be put though directly into the string fields as a placeholder (but the hint/warning written in the filed is definitely gone after the string is written into the field / or there should be somewhere given a test / e.g.: if a string is empty drop the placeholder back).
E.g.:
What is the proper date format, what character must never be used, how to use numbers, variables, interpunction etc.
Also I am looking for the way of putting a calendar option into the config.php - ideally via the metaconfig.php.

Re: Tooltips for language files

Posted: Sat Jan 27, 2024 1:04 pm
by olape
Tata wrote:
Sat Jan 27, 2024 9:41 am
More than the labels in config, I meant hints/warnings right in the language files, as to what shall/must not be put into the language strings.
This could be put though directly into the string fields as a placeholder (but the hint/warning written in the filed is definitely gone after the string is written into the field / or there should be somewhere given a test / e.g.: if a string is empty drop the placeholder back).
E.g.:
What is the proper date format, what character must never be used, how to use numbers, variables, interpunction etc.
Also I am looking for the way of putting a calendar option into the config.php - ideally via the metaconfig.php.
Both are not possible, as of now.
However, the extension for the form fields is already noted.

https://github.com/cmsimple-xh/cmsimple-xh/issues/396

There will probably be no Helps for the language file.