Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Admin plugin not translate default value in text blueprint

Started by Pedro M 3 years ago · 2 replies · 402 views
3 years ago

Hello.

I'm trying to translate the "default" value in blueprints.yaml for a text field, but the character string used to translate in languages.yaml is displayed instead of the translated text.

Example:

YAML
custom_text:
   type: text
   default: CUSTOM_LINK_TEXT.DEFAULT
   label: CUSTOM_LINK_TEXT.LABEL

The default field shows: CUSTOM_LINK_TEXT.DEFAULT instead the translated text.

Does anyone know how to fix this problem, if it is some kind of bug in the Admin plugin or if this type of string cannot be used in the default value of a text field.

3 years ago

Could you post the template where you are using this? I also assume the string in your languages.yaml file is exactly the same?

3 years ago

Hi @Netzhexe.

You can see this error in action if you test the changes I made in this Pull Request for the tecart plugin cookies manager.

Specifically in the blueprints.yaml file, line 54:

TXT
default: PLUGIN_TECART_COOKIE_MANGER.CUSTOM_SETTINGS.LINK_TEXT.DEFAULT

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 99 16 hours ago
General · by pamtbaau, 21 hours ago
1 63 21 hours ago
General · by Andy Miller, 1 day ago
0 48 1 day ago
General · by Marcel, 12 months ago
6 357 5 days ago
General · by Duc , 6 days ago
3 45 6 days ago