Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a get_current_language() helper function #7561

Merged

Conversation

lazka
Copy link
Contributor

@lazka lazka commented Jul 11, 2019

Description

This can be used instead of accessing the global "current_language" variable.

Replace various accesses to the "authenticated_user_language" session var
with a call to get_current_language().

Adds some basic unit tests.

Motivation and Context

@gymad suggested not accessing the global "current_language" in another PR, so I looked into providing a function for this instead and found lots of duplicated code that could be replaced with it.

How To Test This

Run the unit tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

This can be used instead of accessing the global "current_language" variable.

Replace various accesses to the "authenticated_user_language" session var
with a call to get_current_language().

Adds some basic unit tests.
@Mac-Rae
Copy link
Contributor

Mac-Rae commented Jul 12, 2019

Assessed by Travis 👍

@Mac-Rae Mac-Rae added the Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member label Jul 12, 2019
@Dillon-Brown Dillon-Brown merged commit d67ceab into salesagility:hotfix-7.10.x Jul 15, 2019
@Dillon-Brown Dillon-Brown added the PR:Community Contribution These are contribution made by the community label Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:Community Contribution These are contribution made by the community Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants