- Issue created by @joachim namyslo
- 🇩🇪Germany jurgenhaas Gottmadingen
@jeeva r this MR is not doing what @joachim namyslo is asking for. We don't want to make technical database fields translatable. What the requirement is, that usages of e.g.
$this->t('Event')
get some context so that translation knows whether the term "event" is an event like a record in a calendar, or an event like here in DANSE, where event refers to a technical term.So, that would e.g. the annotation of the file
src/Entity/Event.php
which containslabel = @Translation("Event")
. That string "Event" needs the context information. And we need to make sure that we alter all relevant places in the code, where this and similar things are happening. - 🇮🇳India jeeva r
@jurgenhaas, I got the issue, thanks.. I had raised the new MR, please review that..
- 🇩🇪Germany jurgenhaas Gottmadingen
Wow, that was quick, thank you @jeeva r
When it comes to "Notification" and "Notification action", we probably don't require context, as they seem to be distinct in their meaning. @joachim namyslo how do you feel about that?
Regarding "Event", that is certainly not distinct, but the context is certainly not calendar here. So, here are a couple of questions:
- What's the correct context for event here, is it "technical" or is it more specific like "danse"?
- Is that event string in the entity annotation covering all occurrences?
- Are there other terms that need to be addressed?
I guess, most of this requires expert feedback like from @joachim namyslo, and all of it will then also require testing.
Leaving this at NR for now, until we got more feedback to see which direction this should take.
- 🇩🇪Germany joachim namyslo Kulmbach 🇩🇪 🇪🇺
Hello Jürgen,
Hello Jeeva,that's a very good question.
Event
In the case of the word “event,” the context is definitely technical, as in “logging event.” This is because, in simple terms, Danse actually logs everything first in order to inform users about an event that has occurred. This is not specific to Danse.
Background Information
However, it is important to know that Drupal uses the wrong word whenever there is no context.
This is because Drupal tries to use as few translations as possible so as not to bloat the websites' databases with strings translated into languages other than English. So we don't just have reusable fields in Drupal, we actually have reusable translation strings. Wherever this resampling doesn't work, a translation context is needed.
Of course, you both know this, but you never know who might stumble across this issue one day.
Nootification and Notification action
In the case of Notification and Notification action, I didn't find any cases when searching the translation server that would lead me to conclude that we need context here. A notification is always a notification, and a notification action is always something you do with a notification, for example:
Edit a notification
Delete a notification
Create a notification
etc.None of the modules for which there are currently translations on the Drupal translation server use notification action in a different sense, so we don't need any context here.
- 🇮🇳India jeeva r
@joachim namyslo, thanks for your information.. I will update the changes..