Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Even if Umami isn't a multilingual distribution demo (yet), we should make sure that if people evaluating it adds languages, the content that they will see it's what they would expect.
Proposed resolution
Add content language filter to views.
Remaining tasks
Patch.
User interface changes
Content is filtered by language if more languages are added.
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#5 | 2999893-umami-views-content-language-5.patch | 9.63 KB | penyaskito |
Comments
Comment #2
penyaskitoEdited views for adding the negotiated content language filter.
Comment #3
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedHi @penyaskito,
Thanks for working on this. I've given it a manual test and found a regression in the
admin/structure/views/view/promoted_items/edit/block_1
view. At the moment, the main block (top left on the homepage) is supposed to be the latest article, and the two beside it are supposed to be recipes.Your patch seems to allow Articles and Recipes in the first/left block.
Comment #4
mpp CreditAttribution: mpp at AmeXio for District09 commentedIndeed, the patch removes the filter for block_1:
Also, shouldn't we use interface language as opposed to content language?
Comment #5
penyaskitoDon't know how that happened, this one should be good.
Also updated some views I skipped.
@mpp: It needs to be content language, as what we are showing on those views is content. Usually content negotiated language and user interface negotiated language are the same, and will probably always be the same in Umami, but there are use cases where people want to show the UI in one language and the content in other.
Comment #7
penyaskitoQA testbot failure.
Comment #8
Gábor HojtsyThe config changes now look fine. Tests are not possible to add without multilingual content first, so needs manual testing for now.
Comment #9
penyaskitoMaybe the lack of reviews is because of the missing tag.
Comment #10
shaalComment #11
shaalWe should be able to test this issue's view settings by applying the following patch first #3037111: Import multilingual content into Umami
It includes all the config needed for multilingual + importing sample Spanish content.
Comment #13
penyaskitoAny chance this can be RTBCed? I've been using this patch for 6 months for multilingual demos now.
Comment #14
mpp CreditAttribution: mpp at AmeXio for District09 commentedComment #15
shaalAs part of the work being done on #3037111: Import multilingual content into Umami
I spoke with @smaz yesterday.
We are missing in this patch:
Searching content in Umami
/search
should return results only in the current language.Comment #16
Gábor HojtsyIs that even configurable? Hm.
Comment #17
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedI think I'd like to see this at rtbc and a follow up created for the search issue (if it's possible to configure it).
Comment #18
shaalIt's true, search in core doesn't provide an option to search in the current language only.
RTBC - patch #5 is doing exactly what it suppose to do.
Homepage, Articles, and Recipes pages are showing results in the current language only which is great!
(tested with multilingual content provided by #3037111: Import multilingual content into Umami)
Comment #20
Gábor HojtsySuperb, thanks all!