Panel: Show the translation of the title-help from a blueprint

I have a multi-language site with de and en.

If I have a blueprint with:

fields:
  title:
    label: 
      en: Title
      de: Titel
    type:  text
    help:
      de: Gebe den "Namen" dieser Seite ein.
      en: Enter the "title" of this page.

then Kirby 2.2.3 throws an error:
Notice: Array to string conversion in H:\xampp\htdocs\kirby_test\panel\app\fields\title\title.php on line 18

The line with the help text under the Title-input-box shows in both languages:
Array
and no help text from the blueprint.

If I have no translation (no “de:” and no “en:” lines but the text of the help in the help: line) then I get no error but no translation.


This is not in the docs for the Title field but if I look at http://getkirby.com/docs/panel/blueprints/form-fields#translating-form-fields this would be that, what I would assume for the title too.

Try wrapping in single quotes… The double quotes may be throwing off the YAML parser:

fields:
  title:
    label: 
      en: Title
      de: Titel
    type:  text
    help:
      de: 'Gebe den "Namen" dieser Seite ein.'
      en: 'Enter the "title" of this page.'

@jevets:
Thanks for your hint.

But I get no difference if I follow your hint (wrapping the lines in single quotes) or if I delete the double quotes.

And there is no difference, if the admin choses his language in the panel at http://127.0.0.1/kirby_test/panel/<username>/edit like the default language of the site or like the other language. This language is the language of “his” panel descriptions. In the right top of the panel he can choose the language of the contents he wants to edit.

Just guessing, but this is probably by design, because why would you need a help text for the title of a page?

Edit: An additional help line on top of the path marginalia would be a bit too much, anyway, don’t you think.

Also, you have to enter the title when you create a new page, so if a help text was needed, it would be needed then and there.

You could, however, use the new title field type together with a placeholder, then when the user creates a new page, the page has no title by default, only a folder name.

I also think it doesn’t really make sense there. But I think Kirby should not throw an error and ignore the help text completely for the title field. See my issue on GitHub.

1 Like

Hello @texnixe and @lukasbestle,
thank you very much for your answer to my suggestion to improve the building of a good GUI in the panel for a multi-language site.

I think every GUI designer, who uses the panel, follows his experience in building a good panel. This is ok and every GUI designer will build a different GUI, what is ok!

I like Kirby and its blueprints to design this like the particular client wants or needs, in particular if he or his staff wants to use the panel without the help of the GUI designer of the panel and without the coder of the PHP files. Therefore I used field instructions in every panel field of every blueprint, but until now my public Kirby websites are “only” no multi-language sites. So I had no problem with the translation of the “help” line in the blueprint of the “Title” field of a page in the panel.
Sometimes it may be useful to provide guidance for selecting the “right” Title and / or the URL-appendix, for example, if the editor needs to know this help contents, but later not remembers this limitation (and would not look in a separate help). This may be, that e.g. the URL-appendix must not be changed, if this is used in the PHP code of the templates or snippets or … .
The placeholder can not be read, if the field is not empty. Therefore it is no alternative to the help line.

Lately I want to learn how to build a multi-language site with Kirby. And I realized that I can not take my previous GUI design for technical reasons to a multi-language site.

Even though I do not understand why you do not want to follow my idea, I stick to my suggestion.

I’m excited to see how @bastianallgeier will decide this.


I wish all readers peaceful Christmas!
HeinerEF

I changed the topic to “Suggestion”. Let’s see if there are any more comments from other users and from Bastian on this. :smile:

Not sure if this should go here (into the forum) or on github, anyway:

I don’t think it is a good idea to hide this information, why would you want to have a help Text on the Title?

  • Enforcing a certain way to write the Headline (e.g. “Write in 3rd Person Singular”, “use imperative, present tense”)
  • The Headline has side effects - if changed something elsewhere might break

Also the help-text shows up if you don’t use a multilanguage setup - so this is bug as far as I’m concerned. Where the help text is placed on a title field might be another discussion.

Has been fixed on the develop branch and will be included in the next release.

1 Like