Double files of solo config files in config folder.

Created on 7 October 2024, about 2 months ago

Problem/Motivation

The folder where the configuration is saved has several files in double.
One in the root folder and one in the folder named after the translation language.
All files reference the solo theme.

Steps to reproduce

Enable the solo theme and download the translation files from the user interface.

For example: the block.block.solo_account_menu file in my nl(dutch) folder has this contents:
settings:
label: 'User account menu'

The same file in the root folder has this contents:

uuid: 1ad84fc9-1533-45fb-954d-3febec793045
langcode: nl
status: true
dependencies:
config:
- system.menu.account
module:
- system
theme:
- scv_solo
_core:
default_config_hash: gmxYWWHmgbe0Pnv8y48ZLSLH5mEHejOjAP6RLxUfdzU
id: scv_solo_account_menu
theme: scv_solo
region: footer_menu
weight: -12
provider: null
plugin: 'system_menu_block:account'
settings:
id: 'system_menu_block:account'
label: Gebruikersmenu
label_display: '0'
provider: system
level: 1
depth: 1
expand_all_items: false
visibility: { }

So as a result:
- the file in the nl folder has the original English label
- the file in the root folder has the translated label

As a result: I'm getting the original English label in stead of the translated Dutch words.
My drupal core is 10.3.5

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

1.0

Component

User interface

Created by

🇧🇪Belgium ericvl

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

Comments & Activities

  • Issue created by @ericvl
  • 🇺🇸United States flashwebcenter Austin TX

    Hello,

    It looks like the issue you’re encountering is due to configuration file duplication between the root and language-specific folders. This duplication doesn’t seem to be directly related to the Solo theme itself, as it doesn’t include any specific settings. Instead, it appears to be a configuration management issue within Drupal, particularly regarding how translations are handled for configuration items like blocks.

    In your case, the root configuration file contains the translated label, while the file in the language-specific folder still has the English label. This discrepancy is causing inconsistencies in displaying content across different languages, as the translated content is not consistently applied.

    Here are some steps to help address this issue:

    1. Check Configuration Translation Synchronization
      Drupal stores configuration translations separately, and these can sometimes become out of sync. You can force synchronization by exporting and re-importing the configuration:
      • Export Configuration:
        • Go to Configuration > Development > Configuration Synchronization.
        • Export either the specific configuration items affected or the entire site configuration.
      • Edit Translations:
        • In the exported .yml files, verify if the files in the translation folders contain the correct language labels.
        • If any translation labels are missing, manually update these files to ensure accuracy.
      • Import Configuration:
        • Import the updated configuration back into Drupal to synchronize the settings with the correct labels.


    2. Update Translation Strings
      If specific labels aren’t translating correctly:
      • Go to Configuration > Regional and language > User interface translation.
      • Search for the untranslated label (e.g., 'User account menu') and translate it directly. This can sometimes force the translation to take effect in the configuration.


    3. Clear Cache
      After making any changes, clear the Drupal cache by going to Configuration > Performance > Clear all caches. This ensures the new translations are applied.

    4. Review Language Settings for Block Configuration
      Language-specific block settings may override the default configuration:
      • Go to Structure > Block Layout and find the block for the User Account Menu.
      • Verify that the block is set to be visible for the appropriate languages and is configured correctly for each one.

    Best wishes,
    Alaa

  • 🇺🇸United States flashwebcenter Austin TX
  • 🇧🇪Belgium ericvl

    @flashwebcenter
    Sorry, I wasn't able to contact you earlier.
    Thank you for all your suggestions. It seems that it my problem is solved now.
    I tought that this problem came from the solo theme because it was the only module or theme that had a separate "language/nl" folder under the "sync" folder.
    I do not know why this is nessecary but this is irrelevant here. I can look it up in the documentation of configuration in core (if I can find it).

    Thank you again for your time.
    Greetings

  • 🇺🇸United States flashwebcenter Austin TX

    No worries! I’m glad to hear the issue is resolved.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024