Skip to main content

The profile bio field has no placeholder of its own (FluentCommunity 2.8.1 ff)

Posting this as a translator again. Same setup as last time: I maintain the
German catalogues for FluentCommunity, FluentCommunity Pro, FluentMessaging and
FluentPlayer, around 5,000 strings.

This is not a bug in the sense that something breaks. It is a string that cannot
be translated correctly, because one source string has to serve several places
at once.


What happens

In the profile editor, the Short Bio field is a markdown editor without a
placeholder prop. The editor component falls back to its generic default:

placeholder: {
    text: this.placeholder || this.$t('Type your message here!'),
    mode: 'doc'
}

So the bio field prompts the member with Type your message here! – the same
sentence the editor shows everywhere else it is embedded without an explicit
placeholder.

The label above the field is fine: Short Bio, from
app/Services/TransStrings.php:1650. It is only the placeholder that is
borrowed.

Why it matters for translations

Type your message here! (app/Services/TransStrings.php:1892) is a single
catalogue entry shared by every editor instance that does not pass its own
placeholder. A translator therefore has exactly two options, and both are wrong
somewhere:

  • translate it generically, and the bio field gives the member no hint what the
    field is for, or
  • translate it for the field where it is most visible, and the same sentence
    turns up misplaced in the next editor.

Our German catalogue went through both. It used to read write your welcome
message here
– correct where a translator had seen it, wrong the moment the
same string appeared over the profile bio. It now reads generically again.

The profile form is a good candidate for its own placeholder, because it is the
one editor where members are least likely to know what is expected: a headline
of up to 60 characters sits directly above it, and without a prompt the
difference between the two fields is not obvious.

Suggestion

Give the bio editor an explicit placeholder, e.g.

'A sentence or two about yourself' => __('A sentence or two about yourself', 'fluent-community'),

and pass it as the placeholder prop on the profile editor instance. That
leaves Type your message here! for what it is, a generic default, and gives
translators a string they can render for its actual context.

The same pattern, second case

Username (app/Services/TransStrings.php:1973, Modules/Auth/AuthHelper.php:187)
serves three different places at once:

  • the field label in the signup form,
  • the placeholder of the username field in the profile editor, and
  • a column header in the CSV import preview, where the column is 110px wide.

Whatever a translator writes there has to fit a form label, a placeholder and a
narrow table header at the same time. Splitting the table column into its own
string would be enough; the signup form already has its own placeholder string
(No space or special characters), which is exactly the right shape.

Anything else on the fallback

The same applies to any other editor instance that currently relies on the
fallback – the welcome banner editor is the one we noticed.

Happy to send a PR if that is easier for you.