Problem/Motivation

Follow-up from #2107427: Regression: Language names should display in their native names in the language switcher block.

Language manager interface specifies implementation details for getLanguage on the interface.

Proposed resolution

  1. Update the docs on the method on the interface to remove implementation details.
  2. Update the docs on the implementation putting the implementation details there.

Remaining tasks

User interface changes

None.

API changes

None.

Comments

holly.ross.drupal’s picture

Status: Needs review » Active

I'm sprinting at NYCCamp and going to work on this patch right now.

holly.ross.drupal’s picture

Title: Language manager interface should not specify implementation details for getLanguage on the interface » Language manager interface should not specify implementation details for getLanguages on the interface
holly.ross.drupal’s picture

Status: Active » Needs review
StatusFileSize
new707 bytes

Updated docs in LanguageManagerInterface to remove reference to sort method. Did not update LangauageManager.php with sort method because the implementation is only for sites that are language unaware...so the way the language array is built to return is to get the site default, then adds special system languages. THEN, no sort is applied.

tstoeckler’s picture

Status: Needs review » Needs work

So I found this code in ConfigurableLanguageManager:

      // Sort the language list by weight.
      Language::sort($this->languages);

So we should probably update that comment to mention that it sorts by title as well. (It does :-))

holly.ross.drupal’s picture

Status: Needs work » Needs review
StatusFileSize
new1.41 KB
new735 bytes

Updated ConfigurableLanguageManager.php with sort description.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Yay, awesome! Thanks for the interdiff, very helpful.

yesct’s picture

looks good to me too. I think that *is* really where the sort happens.

(also setting the author back to alimac. seems there is a d.o bug where if someone with admin priv uses the node edit to comment on an issue, that it changes the *author* of the issue to be the person commenting/editing)

  • Commit e0a47b4 on 8.x by webchick:
    Issue #2239407 by holly.ross.drupal, YesCT, tstoeckler, alimac: Language...

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: juanca.patch, failed testing.

webchick’s picture

Status: Needs work » Fixed

Oops. Forgot to set the issue fixed the other day in all the excitement. :D

Committed and pushed to 8.x. Thanks!

gábor hojtsy’s picture

Issue tags: -sprint

Superb, thanks all. Removing from the D8MI sprint too.

gábor hojtsy’s picture

Issue tags: -Configuration context

Status: Fixed » Closed (fixed)

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