- Status changed to Needs work
over 1 year ago 11:44pm 24 February 2023 - ๐บ๐ธUnited States smustgrave
Moving to NW for the issue summary update. Specifically what's the proposed solution for this?
- ๐ฎ๐ณIndia ankithashetty Karnataka, India
Let's take a simple example:
We have a module calledtest
, which gets installed during profile installation. It has a configuration for both default language (EN) and another language (for ex: AR)test/config/install/test.settings.yml
=> EN versiontitle: 'Contact us' // 'title' and 'description' is a scalar value. settings: confirmation_message: 'Thanks for contacting us!' .... // 'settings' is an array.
test/config/install/language/ar/test.settings.yml
=> AR versiontitle: 'ุงุชุตู ุจูุง' settings: confirmation_message: 'ุดูุฑุง ูุฅุชุตุงูู ุจูุง. ุณูููู ุจุงูุฑุฏ ุนููู ูู ุฃูุฑุจ ููุช ู ู ูู!' ....
During profile installation, when the
test
is getting installed, the config translations are also imported. But noticed that the scalar values of the config (i.e.,title
in the above example) are skipped and only array values are considered (likesettings
)
So after installation, try doingdrsuh cget test.settings
for both language, you would notice:- Both 'title' and 'settings' in EN version (works fine)
- Only 'settings' in AR version (issue here)
Code for ref: https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/locale/src/LocaleConfigManager.php#L636
Proposed solution (just a suggestion):
With the patch in #51, we are trying to process all the config values ('array' and 'string').As I raised in #43, I still don't get why 'scalar' values are ignored.
I might be missing wrong here, but the issue is valid๐คThanks!
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - Status changed to Needs review
over 1 year ago 12:47pm 14 August 2023 - last update
over 1 year ago 29,959 pass - Status changed to Needs work
over 1 year ago 5:16pm 17 August 2023 - ๐บ๐ธUnited States smustgrave
#53 made some suggestions that I think may be worth responding.
Issue summary still needs to be updated.
- Status changed to Needs review
about 1 year ago 2:51pm 29 September 2023 - last update
about 1 year ago Custom Commands Failed - ๐ท๐บRussia ilya.no
I'm not sure in what way should we update summary, because for me it looks clear. Should we just add text from comment #24 ๐ Process translation config files for custom modules Needs work ?
I'm attaching draft patch, which fixes the case, when we install module on already existing site. So current patch fixes 3/4 cases. Need to fix the case, when module is enabled during site installation.
I've noticed, that ConfigInstaller manages all available collections, when installs default config, but when it comes to optional config, then only default collection is used. So, I've added code to use all available collections.
- Status changed to Needs work
about 1 year ago 8:28pm 29 September 2023 - ๐บ๐ธUnited States smustgrave
CC failure in #57
Issue summary states the problem but doesn't clearly states the solution to the problem.
Is this changing the API or Data model? If not could leave those sections blank or put NA
- ๐ฎ๐ณIndia gauravvvv Delhi, India
Fixed CC failure. Attached interdiff for same.
Leaving NW for summary update. - last update
about 1 year ago Custom Commands Failed - ๐ฎ๐ณIndia gauravvvv Delhi, India
Fixed failures, attached interdiff for same
- last update
about 1 year ago 30,384 pass - Status changed to Needs review
about 1 year ago 2:25pm 16 October 2023 - last update
about 1 year ago 30,411 pass - ๐ท๐บRussia ilya.no
Attaching the patch which fixes all 4 cases for me. I test with custom module, which has settings config in install folder and view config in optional folder. For both cases there are translations in language/fr folder.
Also updated summary. - Status changed to Needs work
about 1 year ago 7:21pm 30 October 2023 - ๐บ๐ธUnited States smustgrave
Issue summary updated in #61
think we need a test case
If those translations are placed in config/[install | optional]/language/[language-code], then they should be pulled into the system when the module is enabled
From what I can tell the current test changes don't cover that.
- Status changed to Needs review
12 months ago 9:08am 6 December 2023 - ๐ท๐บRussia ilya.no
Attaching patch with test. Not sure, what is the best place for it, so I've chosen locale module, because I haven't found tests for `ConfigInstaller`.
- last update
12 months ago 30,679 pass, 6 fail - Status changed to Needs work
12 months ago 9:26am 6 December 2023 The Needs Review Queue Bot โ tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request โ . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Status changed to Needs review
11 months ago 10:55am 15 December 2023 - ๐ท๐บRussia ilya.no
I've found, that my new test module's name is already occupied, so I've renamed and relocated it from locale to config_translation module.
- last update
11 months ago 30,772 pass - Status changed to Needs work
11 months ago 1:50am 27 December 2023 - ๐บ๐ธUnited States smustgrave
New tests should have typehints and returns
May need a CR for installOptionalConfig, just to announce the new parameter.
Can this be converted to an MR for quicker/easier reviews.
- Status changed to Needs review
10 months ago 10:37am 15 January 2024 - ๐ท๐บRussia ilya.no
I've created MR and added typehints. I'm not sure about CR, because I have no feedback about my suggestion so far.
- Status changed to Needs work
10 months ago 11:00am 30 January 2024 The Needs Review Queue Bot โ tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- Status changed to Needs review
9 months ago 7:20am 12 February 2024 - ๐ซ๐ทFrance andypost
Not sure the new method is the best solution but it will need CR anyway
- Status changed to Needs work
9 months ago 4:36pm 16 February 2024 - Status changed to Needs review
6 months ago 12:49pm 22 May 2024 - ๐ท๐บRussia ilya.no
I've added draft CR https://www.drupal.org/node/3449092 โ and rebased MR.
- Status changed to Needs work
6 months ago 9:48pm 22 May 2024 The Needs Review Queue Bot โ tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- Status changed to Needs review
6 months ago 9:47am 31 May 2024 - ๐ท๐บRussia ilya.no
I've fixed tests errors, so pipeline for the MR is fine now.
- Status changed to RTBC
6 months ago 8:58am 1 June 2024 - Status changed to Needs work
6 months ago 4:08am 3 June 2024 The Needs Review Queue Bot โ tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- Status changed to RTBC
5 months ago 1:19pm 9 July 2024 - ๐ท๐บRussia ilya.no
Restoring previous status, as MR is rebased and pipeline is green.
- Status changed to Needs work
4 months ago 9:10am 10 July 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
I've added some comments to the MR that need addressing.
- Status changed to Needs review
3 months ago 1:48pm 3 September 2024 - ๐ท๐บRussia ilya.no
Sending issue back to review, as I've added changes for MR's comments and pipeline is green.
- ๐บ๐ธUnited States smustgrave
Question on the test changes. Are we losing coverage to get the tests to pass?
- ๐ท๐บRussia ilya.no
I've only added new test, because I haven't found any existing test for core/lib/Drupal/Core/Config/ConfigInstaller.php.
Concerning changing of existing tests, I find comments #47 ๐ Process translation config files for custom modules Needs work and #49 ๐ Process translation config files for custom modules Needs work explanatory, but maybe I haven't delved enough into them.