Problem
Currently to check whether an bundle is enabled for translation we have first to call entity_translation_enabled()
and only then entity_translation_enabled_bundle()
. This is a cumbersome DX and often leads to missing bundle-level translatability checks.
Proposed solution
We should merge the two functions and specify the entity bundle as an optional second parameter of entity_translation_enabled()
. This is a non-backward compatible API change but a quick check on drupalcode.org revealed that no one is using the $skip_handler
parameter outside ET.
Comment | File | Size | Author |
---|---|---|---|
#6 | et-bundle_check-1947764-6.patch | 10.46 KB | plach |
#5 | et-bundle_check-1947764-5.patch | 0 bytes | plach |
#3 | et-bundle_check-1947764-2.patch | 10.46 KB | plach |
#1 | et-bundle_check-1947764-1.patch | 10.49 KB | plach |
Comments
Comment #1
plachComment #3
plachSmall improvement in the views translate link hunk.
Comment #5
plachThis one should work.
Comment #6
plach(sigh)
Comment #7
plachI'm going to commit this soon.
Comment #8
plachCommitted and pushed.