Postponed on #2420737: Differences in dynamic language names are confusing in views, content, etc..

Here's the definition of LANGUAGE_TYPE_URL in locale_language_types_info() (see: http://api.drupal.org/api/drupal/modules!locale!locale.module/function/locale_language_types_info/7)

    LANGUAGE_TYPE_URL => array(
      'fixed' => array(LOCALE_LANGUAGE_NEGOTIATION_URL, LOCALE_LANGUAGE_NEGOTIATION_URL_FALLBACK),
    ),

Is there a particular reason why it doesn't have a name and description? This is a problem whenever someone wants to make this language type configurable.

Files: 
CommentFileSizeAuthor
#11 language-type-url-1994292-11-D7.patch658 bytesDavid_Rothstein
PASSED: [[SimpleTest]]: [MySQL] 41,482 pass(es). View
#4 Monosnap 2015-03-02 12-04-24.png135.27 KBGábor Hojtsy
#1 language-type-url-1994292-2-D8.patch689 bytesDavid_Rothstein
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 95,087 pass(es). View
#1 language-type-url-1994292-2-D7-do-not-test.patch658 bytesDavid_Rothstein

Comments

a.ross’s picture

Issue summary: View changes

Add anchor

a.ross’s picture

Issue summary: View changes

*sigh*

David_Rothstein’s picture

Title: LANGUAGE_TYPE_URL has no name and description. » LanguageInterface::TYPE_URL (D8) and LANGUAGE_TYPE_URL (D7) have no name or description
Version: 7.x-dev » 8.0.x-dev
Issue summary: View changes
Status: Active » Needs review
Issue tags: +needs backport to D7
FileSize
658 bytes
689 bytes
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 95,087 pass(es). View

Yes, this leads to PHP notices/etc in that case. Since 'name' and 'description' are required, core should be providing them even if it does not make this language type configurable by default.

Here are patches for Drupal 7 and 8.

David_Rothstein’s picture

Since 'name' and 'description' are required

Actually the hook documentation isn't quite clear about whether they're required or not, but either way it seems like they should be provided.

Fabianx’s picture

Status: Needs review » Reviewed & tested by the community

RTBC, makes sense.

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs review
Issue tags: +D8MI, +language-base, +sprint
FileSize
135.27 KB

This will make the URL method available in views as well, probably confusing users (because you cannot configure this one and URL language does not appear anywhere else but in views then). See #2420737: Differences in dynamic language names are confusing in views, content, etc. for the issue discussing whether to display non-configurable language types in views and the reasons we do so now and distinguish between types with and without names instead. I think #2420737: Differences in dynamic language names are confusing in views, content, etc. would ideally be resolved sooner or elevated in priority if this one is committed.

Screenshot with this patch:

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Needs review » Postponed

I think we have a workable idea at #2420737: Differences in dynamic language names are confusing in views, content, etc., can you help implement?

Gábor Hojtsy’s picture

Status: Postponed » Needs review
Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

I manually tested and this still applied and did not affect the views language list negatively anymore (thanks to #2420737: Differences in dynamic language names are confusing in views, content, etc.), so should be good to go. Yay!

alexpott’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed c13aadd and pushed to 8.0.x. Thanks!

  • alexpott committed c13aadd on 8.0.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...
Gábor Hojtsy’s picture

Issue tags: -sprint

Superb :) Thanks all!

David_Rothstein’s picture

Status: Patch (to be ported) » Needs review
FileSize
658 bytes
PASSED: [[SimpleTest]]: [MySQL] 41,482 pass(es). View

Reuploading the Drupal 7 patch from #2, with the do-not-text prefix removed.

Not sure if there is a similar issue with Views in Drupal 7 as there was in Drupal 8....

Fabianx’s picture

Issue tags: +Needs manual testing

Except for needing to check that, this is RTBC.

  • alexpott committed c13aadd on 8.1.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...

  • alexpott committed c13aadd on 8.3.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...

  • alexpott committed c13aadd on 8.3.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...

  • alexpott committed c13aadd on 8.4.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...

  • alexpott committed c13aadd on 8.4.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...