Skip to main content

3 translation issues and 2 (old) bugs – FluentCommunity 2.13.0

I maintain the German catalogues for FluentCommunity, FluentCommunity Pro and
FluentMessaging and went through 2.13.0 after updating. Three points from
earlier posts are still there, and two are new. Everything below was checked
against the shipped 2.13.0 code.

New in 2.13.0

1. "This %s is unpublished" gets an English word for %s

The moderation notice on a post or comment is built as

$t("This %s is unpublished", type)
$t("This %s has been flagged automatically by the site rule.", type)
$t("This %1$s has been flagged with %2$s reports", type, reports_count)

and type is the literal "post" or "comment" that the caller passes in
(type:"post" / type:"comment" in app.js). The word never goes through
$t(), so every translation shows it in English. In German the notice reads
"post wurde zurΓΌckgezogen". The "unpublished" notice is new in 2.13.0, the
"flagged" ones have the same problem.

A noun inside a sentence also needs grammatical gender and case in many
languages, so translating the word on its own would not be enough. Separate
strings work in every language:

"This post is unpublished"      "This comment is unpublished"
"This post has been flagged …"  "This comment has been flagged …"

2. Certificate starter designs split one sentence over fixed lines

The starter designs in TemplatesList-*.js stack separate text elements:

"This is to certify that"
{{student.full_name}}
"has successfully completed"
{{course.title}}

Each line is translated on its own, so the English word order is fixed. In
German the verb belongs at the end ("…, dass Anna Beispiel den Kurs X
erfolgreich abgeschlossen hat"), which cannot be built from these pieces. The
German catalogue works around it with lines that stand alone ("Hiermit wird
bestΓ€tigt:" / name / "hat erfolgreich abgeschlossen" / course), which reads
like a form rather than a certificate. Languages with other word orders run
into the same wall.

The editor already supports dynamic fields inside a text element. One
translatable string per sentence would let every language order it freely:

"This is to certify that {{student.full_name}} has successfully completed {{course.title}}."

Alternatively, the starter designs could keep one text element per sentence
instead of one per line.

3. "Reports" means two different things

Reports in the text domain fluent-community is one key for two unrelated
things:

  • the heading of the admin menu section that links to Insights
    (admin_app.js: h4 with $t("Reports"), followed by the link to the
    route insights), where it means analytics;
  • the reports members file against a post or comment: the heading
    Reports (n), the tab Reports n in the moderation view and the column in
    the moderation table, where it means flags.

German has two different words for these ("Berichte" and "Meldungen"), so one
of the two places is always wrong. A separate key for the menu heading, for
example Insights & Reports or Analytics, fixes it.

4. Bug: An admin can edit a member's notification preferences but not save them

Unchanged since my post of 18 September. In 2.13.0:

  • ProfileController::getNotificationPreferance() (line 766) loads through
    verifyAndGetProfile(), which admits super admins;
  • ProfileController::saveNotificationPreferance() (line 952) saves through
    verifyAndGetOwnProfile(), which admits only the owner;
  • in app.js the save block still renders only for isOwn, while the
    component loads the preferences for a super admin.

An admin gets an editable form with no save button, and the changes are gone
after the next navigation. Read path, write path and UI should agree, in
either direction.

5. Bug: Announcement emails still follow the mention setting

Unchanged since my post of 4 September:

  • Utility::hasEmailAnnouncementEnabled() (line 566) still reads
    mention_mail, so switching announcement emails off site-wide also switches
    off mention emails;
  • emailNotifyUsersForEveryoneTag() in EmailNotificationHandler.php still
    filters recipients by event_key = 'mention' only. A member who set
    "Email Disabled" for a space still gets announcement emails from it.

The smallest fix is still the one from that post: a separate setting key for
announcement emails, defaulting to the current mention_mail value so nothing
changes on update.

Happy to test fixes for any of these on our staging site before release.

Raiyan Marzan

Peter Claus LamprechtΒ I will have a look into it. Thanks for the details report!

No. 1, 2, and 3 are in the review phase, I worked on these. 4 and 5, I've forwarded the post to my team, if I get any update, I will let you know.

Tawsif Ahmed Riyad, thank you very much, indeed.