Translation texts with namespaces#82
Open
KuceraMartin wants to merge 6 commits intonextras:masterfrom
Open
Conversation
…o prevent collisions
Contributor
Author
|
ping @JanTvrdik |
hrach
reviewed
Jul 4, 2017
| @@ -256,10 +262,9 @@ public function getTranslator() | |||
|
|
|||
| public function translate($s, $count = null) | |||
src/Datagrid.php
Outdated
| public function __construct() | ||
| { | ||
| parent::__construct(); | ||
| $this->translator = new DefaultTranslator(DefaultTranslator::LANG_EN); |
Member
There was a problem hiding this comment.
what about making this lazy by getTranslator()
src/Datagrid.php
Outdated
| if ($this->translator) { | ||
| $form->setTranslator($this->translator); | ||
| } | ||
| $form->setTranslator($this->translator); |
Member
There was a problem hiding this comment.
if the translator would be lazy, we would probably set it only for render, eg. in render method.
| const LANG_CS = 'cs'; | ||
|
|
||
| const TRANSLATIONS = [ | ||
| self::LANG_EN => [ |
Member
There was a problem hiding this comment.
Not sure I want support more langs :|
Member
There was a problem hiding this comment.
Well, czech is quite popular language, I've heard =)
simPod
suggested changes
Aug 21, 2017
| @@ -0,0 +1,20 @@ | |||
| <?php | |||
Contributor
There was a problem hiding this comment.
IMO it's more appropriate to split these into single files
Contributor
|
Just a question, do we have a roadmap for this PR? :) Are there any edits needed to be made or is this necessary to be reworked completely? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is