Closed (fixed)
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jan 2018 at 13:49 UTC
Updated:
20 Aug 2024 at 22:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
miro_dietikerFrom my test, the paragraphs library always seem to display its label in the source language, even if we are in a translation context.
This might affect all entity reference labels and it seems to be a Paragraphs issue, not Collection.
Comment #3
berdirYes, it is.
Comment #4
kala4ekNot sure about "library", but that simple patch works well for default entity reference fields.
Seems that it needs to use a current paragraph language (so content language) instead of current interface language.
Comment #5
kala4ekAlso would be good to cover that issue by test.
Comment #6
hchonovWe are observing the issue with the Paragraph's widget when displaying the summary that is generated by the referenced entities. In this case
$this->activeLangcodehas the value ofLanguageInterface::LANGCODE_DEFAULTsince I am not on a translated page, but I am only referencing translated entities in the language of my current page.The solution is that the language ID should be retrieved from the language object.
There are however two places that need to be updated and not just one, which is why I am uploading an updated patch.
Since I am not sure if it is worth it to spend the time on a test for this I would go and set it as RTBC, but the maintainers can decide if they want to delay it on test coverage :).
P.S.
I've also opened an MR.
Comment #8
urvashi_vora commentedHi,
Unfortunately the MR contains no change, moving it to needs work.
Comment #9
urvashi_vora commentedCommitted the changes.
Comment #10
amaisano commentedFYI - this patch does NOT fix the From Library paragraph type label. It continues to be in the content's language (FR), even though we've set our preferences to use EN for all UI.
Add [FR word] is on the dropdown, and the [FR word] is shown to the left of the summary, instead of "From Library" on /fr/node/2/edit with ALL other UI elements being in EN.
All other Paragraph type bundle labels are correctly shown in the UI context of EN, not the node context of FR. The drop down is:
Comment #12
berdirMerged, #10 sounds like a different issue.