How do you translate the tokenized string?

Created on 24 April 2025, 23 days ago

I have "@minutes min read" configured to show to the end user in the field formatter.
But I cannot figure out how to get this translated.
Am I missing something obvious here? Or is this not possible?

πŸ’¬ Support request
Status

Active

Version

1.2

Component

User interface

Created by

πŸ‡§πŸ‡ͺBelgium weseze

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

Merge Requests

Comments & Activities

  • Issue created by @weseze
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States mtalt Maryland

    @weseze, Can you test the MR that I just created? Please clear your cache after applying the patch and then you should see the field formatter settings display in the configuration translation for the entity view display (/admin/config/regional/config-translation/node_view_display for nodes).

  • πŸ‡§πŸ‡ͺBelgium weseze

    I only get a fatal error at "/admin/config/regional/config-translation/node_view_display".

    [Thu Apr 24 17:04:01.371371 2025] [php:notice] [pid 56946] [client 127.0.0.1:59229] Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "node_view_display" plugin does not exist. Valid plugin IDs for Drupal\\config_translation\\ConfigMapperManager are: easy_breadcrumb.general_settings_form, system.site_maintenance_mode, system.site_information_settings, system.rss_feeds_settings, entity.user.admin_form, webform.config, extlink.settings, block_content_fields, media_fields, node_fields, taxonomy_term_fields, user_fields, paragraph_fields, block, block_content_type, config_split, crop_type, entity_browser, filter_format, image_style, imageapi_optimize_pipeline, configurable_language, linkit_profile, login_destination, media_type, metatag_defaults, node_type, search_api_server, search_api_index, solr_field_type, simple_sitemap_type, simple_sitemap, mailer_transport, mailer_policy, menu, taxonomy_vocabulary, user_role, webform_options, webform, workflow, pathauto_pattern, view, paragraphs_type, date_format, entity_view_mode, entity_form_mode" at /.../core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 53
    

    Seems like this has nothing to do with the issue here?

  • πŸ‡ΊπŸ‡ΈUnited States mtalt Maryland

    I'm not sure if the route has changed in Drupal, but go to where you translate configuration on your site. With the updated code, you should be able to translate the entity view display configuration for the entity you have the estimated read time field formatter displayed.

  • πŸ‡§πŸ‡ͺBelgium weseze

    I cannot find any interface for translating the config for field formatters on a view mode...
    Maybe this is not available in Drupal 10? Or I need to install a module to do this?

  • πŸ‡ΊπŸ‡ΈUnited States mtalt Maryland

    Translating configuration is core functionality from the Configuration Translation module. Do you have that enabled? After enabling, there should be a Region and Language > Configuration translation menu item available. On that page, navigate to "Content view display" if it is a content type and then select your view display.

  • πŸ‡§πŸ‡ͺBelgium weseze

    Configuration Translation module is enable yes.
    "Region and Language > Configuration translation" is available.
    But there is no "Content view display" available on that page.

  • πŸ‡ΊπŸ‡ΈUnited States mtalt Maryland

    @weseze I took a look at my code that adds the Content view display rows to the list and saw that I had a class that is not in Core. The missing class is being added by a patch that I had forgotten about. Please take a look at https://www.drupal.org/project/drupal/issues/2546212 πŸ› Entity view/form mode formatter/widget settings have no translation UI Needs review , which will add the ability to translate entity view displays from the config translation UI.

  • πŸ‡ΊπŸ‡ΈUnited States mtalt Maryland
Production build 0.71.5 2024