Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
language system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Aug 2012 at 17:39 UTC
Updated:
29 Jul 2014 at 20:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pp commentedComment #2
pp commentedfirst try
Comment #4
penyaskitoNeeds to declare that will "use \Drupal\Core\Language", so test fails.
Comment #5
pp commented@penyaskito thank's
I rerolled the patch.
Comment #6
pp commentedthe patch is wrong
Comment #7
pp commentedreroll the patch
Comment #9
pp commentedtricky custom language... ehh..
Comment #11
pp commentedIf name isn't present, it set to English... eh..
Comment #12
zserno commentedNice patch. My remarks:
LANGUAGE_LTR should be used instead of 0 for better readability.
Similarly, LANGUAGE_LTR should be used here too.
Also note that #1280996: New language_select element type for form API got committed in the meantime which added a few occurrences of the old stdObj instances. A quick
git grep 'language = (object) array' reveals those.Comment #13
pp commentedThank you for your review! I totally agree with you.
I rerolled the patch.
Comment #15
pp commented#13: 1739994_use_Language_object-13.patch queued for re-testing.
Comment #16
das-peter commentedI just gave this a review. There where two cases where the replacement ended up in
new Language((object) array(- that's fixed in the new patch.Further I found other locations on which I think the replacement was missing.
Please see the interdiff to just see the changes between the patches #13 & #16.
Comment #18
das-peter commentedOuch, looks like
use Drupal\Core\Language\Language;was missing on two locations.Updated patch attached.
Comment #19
pp commentedIt isn't correct, because you not set the name property, but test run well and Language class will be refactored.
Thank's for your update. I think it is good for committing.
Comment #20
das-peter commentedI'm still working on some enhancements Gábor an I have discussed.
Comment #21
das-peter commentedMoved some logic from
language_save()into theLanguageconstructor.It takes now care of adding sane default properties if such are missing.
Helped to clean up some code and makes the usage of the language object easier.
Comment #22
pp commentedIt is looking good for me.
Comment #23
pp commentedPlease check this before commit
#1658846: Add language support to node access grants and records
http://drupal.org/node/1658846#comment-6387730
Comment #24
das-peter commentedGábor and I just had another discussion about the possibility of having a complete empty
Languageobject by default.Earlier this wasn't possible due some needs from the dependency injection container. But since this uses now the
LanguageHandlerthe need for having English as predefined properties of theLanguageobject is obsolete:The
LanguageHandleralways sets appropriate properties - thus we can get rid of the currently set defaults. :)Summary: Another change to the patch...
Comment #25
pp commentedoh, yes 'English' and 'en' must be deleted here.
I think about to use
$langcode = NULLinstead of$langcode = ''but I think it isn't necessary.The patch is good.
Comment #26
pp commentedtests run well.
Comment #27
webchickWow, great work! This is so much easier to read now.
Unfortunately it no longer applies. :( Can we get a quick re-roll?
Comment #28
gábor hojtsyQuick reroll. Also the part that did not apply in interdiff form.
Comment #29
gábor hojtsyComment #30
webchickHooray!! Thanks a ton!
Committed and pushed to 8.x.
Comment #31
gábor hojtsyAdded a change notice node for this at http://drupal.org/node/1776678 - don't think it merits a changelog.txt entry, so moving off of sprint.
Comment #32.0
(not verified) commentedupdating summary