Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Allow translateOrDefault to user app locale #496

Merged
merged 2 commits into from
Jul 24, 2018

Conversation

rhwilr
Copy link

@rhwilr rhwilr commented Jul 13, 2018

Currently the translateOrDefault method requires a local parameter.
This PR adds a default value of null to the locale parameter.

This way the locale defaults to the current app.locale. It also adds consistency with the translate method.

@Gummibeer
Copy link
Collaborator

Hey,
Looks good! Could you add this feature also to translateOrNew() ? To have this consistency over all translate...() methods.

@rhwilr
Copy link
Author

rhwilr commented Jul 13, 2018

Done.
I also had to make a change to getTranslationOrNew for this to work.

@Gummibeer
Copy link
Collaborator

Thanks - good job! I will keep it open for next release. 😊

@Gummibeer Gummibeer changed the base branch from master to next-release July 24, 2018 12:31
@Gummibeer Gummibeer closed this Jul 24, 2018
@Gummibeer Gummibeer changed the base branch from next-release to pr-496 July 24, 2018 12:33
@Gummibeer Gummibeer reopened this Jul 24, 2018
@Gummibeer Gummibeer merged commit f2e3a7f into dimsav:pr-496 Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants