Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
language.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2014 at 11:52 UTC
Updated:
20 Feb 2015 at 12:44 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #1
plachBetter waiting for #2143729: Entity definitions miss a language entity key to be committed, as it will provide a way to code a cleaner solution.
Comment #2
plachThis is the draft patch provided in #2230637-88: Create a Language field widget and the related formatter.
Comment #3
plachNow for reals :)
Comment #4
plachWe will need to check that the
langcodeentity key is defined. Adding an API function/method to do that would be nice.Comment #5
plachFixed beta-phase evaluation.
Comment #6
plachComment #7
gábor hojtsyI'd much rather display N/A in place of the checkbox instead of messing with where the columns are. We worked so hard on lining up the columns so you can take a quick look and see what is going on. Not including the translatable column for some while including for others seems to be a problem to me.
Comment #8
plachWell, that was a very raw draft: we could also add some CSS styling to align columns again, actually this is what I'd do if I didn't read #7, but no strong preference really.
Comment #9
gábor hojtsyOne thing I would clearly avoid is using disabled checkboxes, that would be a disaster. Disabled checkboxes are in most cases impossible to tell apart from enabled checkboxes on many systems.
Comment #10
plachAgreed :)
Comment #11
alexpottI agree with the beta evaluation - reducing fragility and making things less hacky for contrib should be permitted if the disruption is minimal.
Comment #12
plach@alexpott:
Thanks for the feedback! I'd leave this postponed on #2143729: Entity definitions miss a language entity key, so we can rely on the
langcodeentity key to determine whether an entity type is language-aware.Comment #13
plachForgot to change status...
Comment #14
penyaskito#2143729: Entity definitions miss a language entity key landed.
Comment #15
plachWe have a patch, so setting NR for the bot, but it's NW actually.
Comment #16
plachGreen, nice :)
Comment #17
gábor hojtsySo looks like this will need to be updated for the langcode key. @plach / @penyaskito? :)
Comment #18
penyaskitoLike this?
Comment #19
kristen polShould there be parantheses? e.g.
Comment #20
kristen polI do see the Aggregator and File entities in the list.
I don't know how to test the File (I didn't see an edit form for File) but I see language selector on the Aggregator Feed:
Comment #21
gábor hojtsyAs discussed before this does away with all our work to line up things... See #7. I think we should display 'N/A' for translatable when it is not applicable or something similar. Code-wise it looks good.
Comment #22
plachOr using a multiple colspan.
Comment #23
gábor hojtsy@penyaskito: can you bring this forward?
Comment #24
penyaskitoAdded N/A.
Comment #25
penyaskitoComment #26
gábor hojtsyYay, looks great, thanks @penyaskito.
We use the same N/A in the language summary table for English if English is not possible to translate. So this is very consistent. Needs tests to ensure that eg. File appears on
admin/config/regional/content-languageboth before content translation module and after and then it does not have a checkbox.Comment #27
plachYep, looks great, @penyaskito++
Comment #28
gábor hojtsyNeeds works for tests only then :)
Comment #29
plachWe should alse revert the changes introduced in the aggregator feed (or item?) form in #2230637: Create a Language field widget and the related formatter.
Comment #30
gábor hojtsyI digged that up to make it easy. Looks like the whole method can go away now.
Comment #31
andypostis this used?
moved for no reason
use $entity->haskey()
Comment #32
gábor hojtsyResolving #29/30 and #31. Still needs tests, feel free to work on that. ContentTranslationSettingsTest can be extended to test that the file entity appears for example. and has no checkbox for translation.
Comment #34
gábor hojtsySo FeedLanguageTest fails on no langcode field where expected...
Comment #35
gábor hojtsy@penyaskito: wanna keep this going? :)
Comment #36
penyaskitoBack to green.
Comment #38
penyaskitoThis should be enough, easier than I thought.
Comment #41
gábor hojtsyRetirled as a bug. Adding updated screenshots to summary, and updated summary in general.
Comment #42
gábor hojtsyLooks good, except this tiny thing:
This is precisely NOT translation but language selection, right? :)
Comment #43
penyaskitoRight, the comment was wrong.
Comment #44
gábor hojtsyYay, thanks!
Comment #45
alexpottNice patch, nice test, nice screenshots. Committed a85e59d and pushed to 8.0.x. Thanks!
Thanks for including the beta evaluation in the issue summary.
Comment #47
plachWoot
Comment #48
gábor hojtsyAmazing, thanks all for your great work.