Skip to content

Translation fixes#809

Merged
fubhy merged 1 commit into
drupal-graphql:8.x-3.xfrom
chindris:translation-fixes
Jun 15, 2019
Merged

Translation fixes#809
fubhy merged 1 commit into
drupal-graphql:8.x-3.xfrom
chindris:translation-fixes

Conversation

@chindris

Copy link
Copy Markdown
Contributor

Fixes included in this PR:

  • the menu link description and label are now language aware (have the interface language in response cache context)
  • the proper language is set for using the translation system, when executing a callable in a language context.
  • the config override language is set, when executing a callable in a language context, so that config entities (like menus) are loaded using the proper translation.

This should fix: #773

…ation language for the language manager when executing a callable in a language context.
@codecov

codecov Bot commented Jun 13, 2019

Copy link
Copy Markdown

Codecov Report

Merging #809 into 8.x-3.x will increase coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##             8.x-3.x     #809      +/-   ##
=============================================
+ Coverage      79.46%   79.57%   +0.11%     
+ Complexity      1280     1277       -3     
=============================================
  Files            192      192              
  Lines           3170     3178       +8     
=============================================
+ Hits            2519     2529      +10     
+ Misses           651      649       -2
Impacted Files Coverage Δ Complexity Δ
...c/Plugin/GraphQL/Fields/MenuLink/MenuLinkLabel.php 100% <ø> (ø) 2 <0> (ø) ⬇️
...core/src/Plugin/GraphQL/Fields/Menu/MenuByName.php 100% <ø> (+16.66%) 4 <0> (-5) ⬇️
...in/GraphQL/Fields/MenuLink/MenuLinkDescription.php 0% <ø> (ø) 2 <0> (ø) ⬇️
src/GraphQLLanguageContext.php 90% <100%> (+5.78%) 8 <1> (+2) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb3bcc8...54607d5. Read the comment docs.

@fubhy fubhy merged commit b8749e3 into drupal-graphql:8.x-3.x Jun 15, 2019
@JohnAlbin

Copy link
Copy Markdown

Works great! 🎆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

menuByName() does not return translated text

3 participants