Problem/Motivation

install.core.inc users a string literal for the locale server_pattern. That constant is also defined in the locale.module, so we should use that constant instead.

The below works as expected. Configuration is applied in the last step.
In addition to this, when installing Drupal from an existing configuration folder, locale config is completely ignored (ie: import_enabled or use_source).

The two things are connected because install.core.inc is hardcoding the values and not reading them from other places.

Steps to reproduce

Proposed resolution

Use locale.module constant instead of hardcoding the value.

Remaining tasks

MR

CommentFileSizeAuthor
#5 3477277-nr-bot.txt90 bytesneeds-review-queue-bot

Issue fork drupal-3477277

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Title: Locale settings not respected when installing via existing configuration » Do not hardcode URL in two places, use constant instead
Issue summary: View changes
Status: Active » Needs review

The configuration part is a non-issue, as it is applied later in the process, so the only issue is just duplicating the constant in code.

This can be either a really easy fix or a won't fix, but I'll put it for review in any case.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems straight forward enough.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new90 bytes

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.

fjgarlin’s picture

Status: Needs work » Reviewed & tested by the community

Just did a rebase. Back to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Let's move the constant. This is something we need earlier than the module system being available because we download translations in the very very early installer. Therefore let's deprecate LOCALE_TRANSLATION_DEFAULT_SERVER_PATTERN and move the constant to \Drupal::TRANSLATION_DEFAULT_SERVER_PATTERN or somewhere else. Including all the locale module code throughout the installation process doesn't feel the correct approach.

arunkumark made their first commit to this issue’s fork.

sourav_paul’s picture

Status: Needs work » Needs review
fjgarlin’s picture

Status: Needs review » Needs work

I made a comment in the MR, it still needs some minor clean up.

fjgarlin’s picture

I made MR suggestions for the code to address my feedback and @alexpott's feedback.

fjgarlin’s picture

The @deprecate tag seems to require a change record node to be created.

fjgarlin’s picture

Change record created, I'm not sure if this is the expected format: https://www.drupal.org/node/3488133

arunkumark’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

Most likely missed 11.1 window mind updating for 11.2, @fjgarlin feel free to ping me to re-look at quicker for you.

fjgarlin changed the visibility of the branch 11.x to hidden.

fjgarlin changed the visibility of the branch 3477277-locale-settings-not to hidden.

fjgarlin’s picture

Status: Needs work » Needs review

When rebasing, it was getting a conflict on files that were not modified by this MR, so rather than going into a rabbit hole, I created a new branch/MR with the same changes: https://git.drupalcode.org/project/drupal/-/merge_requests/10419 (old MR for reference)

As per #15, I'll ping @smustgrave for review.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Manually updated deprecation for 11.2 but rest seems good.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 95cfe64 and pushed to 11.x. Thanks!

  • alexpott committed 95cfe641 on 11.x
    Issue #3477277 by fjgarlin, arunkumark, smustgrave, alexpott: Do not...

Status: Fixed » Closed (fixed)

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