Add Translation context fallback for 'From', 'To'

Created on 6 November 2023, about 1 year ago

Problem/Motivation

In #3072953: Add translation context to table headers to make them easier to localize , a Translation context was added for better translations for 'From' and 'To'.
However, this context translation is not always provided in each language.

Steps to reproduce

Create an entity type with office_hours field
Set the language to non-English (German, Dutch)
Create/Edit a node.
See that 'From' and 'To' on Weekdays and Season headers are not translated.

Check page /admin/config/regional/translate , and see that the strings 'From' and 'To' appear twice and have no context dependent translation.

Proposed resolution

Add a fallback.

Add the following message "In order to get a proper user experience in the Office Hours widget,
please check User interface translation page
for the strings %from and %to in Context 'A point in time'
to get proper translations for each of the installed languages
for content editors.",
On the following pages:
- manage fields
- manage form display
- edit node (but only when permission 'translate interface' is set for user)

🐛 Bug report
Status

Fixed

Version

1.12

Component

User interface

Created by

🇳🇱Netherlands johnv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024