- π³πΏNew Zealand quietone New Zealand
There is a later issue that for fixing this is more cases. That issue has more discussion of the problem so I am closing this as a duplicate.
Question of the century - What is wrong in this code for sure?
/**
* {@inheritdoc}
*/
public function getTitle() {
$options = array();
if (!empty($this->pluginDefinition['title_context'])) {
$options['context'] = $this->pluginDefinition['title_context'];
}
// Take custom 'config_translation_plugin_id' plugin definition key to
// retrieve title. We need to retrieve a runtime title (as opposed to
// storing the title on the plugin definition for the link) because
// it contains translated parts that we need in the runtime language.
$type_name = Unicode::strtolower($this->mapperManager()->createInstance($this->pluginDefinition['config_translation_plugin_id'])->getTypeLabel());
return $this->t($this->pluginDefinition['title'], array('@type_name' => $type_name), $options);
}
Yeah... translatable strings will never changed in capitalization via code. This must be done by the translator and nobody else.
WRONG:
$type_name = Unicode::strtolower($this->mapperManager()->createInstance($this->pluginDefinition['config_translation_plugin_id'])->getTypeLabel());
CORRECT:
$type_name = $this->mapperManager()->createInstance($this->pluginDefinition['config_translation_plugin_id'])->getTypeLabel();
However this is still not the title
string configured in google_analytics.config_translation.yml
. There is one more bug.
Closed: duplicate
9.5
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
There is a later issue that for fixing this is more cases. That issue has more discussion of the problem so I am closing this as a duplicate.