The attached patch is one of the results of #1222106: Unify language negotiation APIs, declutter terminology, where we are discussing cleaning up and unifying naming conventions for negotiation functions and paths. The attached patch makes the following changes:

Function/path before Function/path after
admin/config/regional/language/configure admin/config/regional/language/detection
admin/config/regional/language/configure/session admin/config/regional/language/detection/session
admin/config/regional/language/configure/url admin/config/regional/language/detection/url
locale_languages_configure_form language_negotiation_configure_form
locale_languages_configure_form_submit language_negotiation_configure_form_submit
_locale_languages_configure_form_language_table language_negotiation_configure_form_table
theme_locale_languages_configure_form theme_language_negotiation_configure_form
locale_language_providers_url_form language_negotiation_configure_url_form
locale_language_providers_url_form_validate language_negotiation_configure_url_form_validate
locale_language_providers_url_form_submit language_negotiation_configure_url_form_submit
locale_language_providers_session_form language_negotiation_configure_session_form
locale_language_providers_url_form language_negotiation_configure_url_form

Emphasized the changes for even more clarity. I believe none of these paths or function names are cached in the database or stored in variables, so we don't need an update function. Also, there is no new functionality whatsoever, so existing tests should suffice. I ran the locale tests on my machine with this patch and they ran through all fine.

All-in-all hope this is good.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Issue tags: +sprint

Also note that I used the language_* prefix because we are planning to move these to language module pretty soon. So the locale module would implement this in a non-matching namespace after this patch but it is moving to language module soon, so we don't need to change function names again when we do that.

plach’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
24.71 KB

Also note that I used the language_* prefix because we are planning to move these to language module pretty soon. [...]

Sounds sensible.

Rerolled the patch with the stupid fix below. This should be RTBC now.

+++ b/core/modules/locale/locale.admin.inc
@@ -6,21 +6,21 @@
+ * Builds configuration form for language negotiation.

Missing "the" in the PHP doc.

21 days to next Drupal core point release.

Dries’s picture

This looks good to me. I'll give it another day so people can comment on it, if they'd like.

Dries’s picture

Status: Reviewed & tested by the community » Needs work

This patch no longer applies and will need a re-roll.

Gábor Hojtsy’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
24.69 KB

Interesting, applied for me with offsets. Rerolled patch that should apply cleanly. Wait for tests pass before commit though, just to be sure.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, language_negotiation-1430986-4.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
1.11 KB
25.62 KB

Tests were failing due to the recently committed #1250800: Language domain should work regardless of ports or protocols patch that added new tests and used the same path two times that we are modifying here. It is a trivial change, so I think this should be back to RTBC. Interdiff attached.

catch’s picture

Priority: Normal » Critical
Status: Reviewed & tested by the community » Active

Committed/pushed to 8.x

This will need a change notification for the changed paths.

catch’s picture

Title: Clean up naming for language negotiation configuration functions/paths » Change notification for: Clean up naming for language negotiation configuration functions/paths
Gábor Hojtsy’s picture

Priority: Critical » Normal
Status: Active » Fixed
Issue tags: -sprint
Gábor Hojtsy’s picture

Title: Change notification for: Clean up naming for language negotiation configuration functions/paths » Clean up naming for language negotiation configuration functions/paths

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