Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Oct 2018 at 09:54 UTC
Updated:
1 Nov 2021 at 16:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jncrucesI think that the following patch I think that will resolve the problem.
Comment #3
jncrucesI found that a rewritten field linked to a url can't be translatable too.
I think that these are two issues relationed. The next patch resolve the previous reported issue and this too.
Comment #4
jncrucesSorry the previous patch was from another issue. Correcting with the correct patch.
Comment #5
jncrucesComment #8
kristen polSounds like a bug if you can't translate. Patch applies cleanly to 9.1.
Comment #9
kristen polThe patch is straightforward but this needs tests and manual testing. Back to needs work for tests.
Comment #11
mohit_aghera commentedHi @Kristen Pol @larowlan
I've added the test cases for verification.
Currently, I've implemented functional test cases and on views translation page, I am checking if fields exist or not.
Any thoughts if we can achieve this using Kernel tests? I didn't found any specific schema tests in config_translation module.
Comment #13
mohit_aghera commentedComment #14
kristen pol@mohit_aghera Thanks for the tests :) I didn't find any kernel tests for similar things, but maybe I missed them. I see tests for
link_urlin:and for
Views config_translationin:Maybe it makes sense to move your tests to
TranslatedViewTest?Comment #15
mohit_aghera commentedSure, let me refactor the tests today and move to appropriate places.
Comment #16
mohit_aghera commentedRefactoring test cases.
Please ignore this comment due to incorrect diff with 9.2.x HEAD
Comment #17
mohit_aghera commentedRe-uploading the patch.
By mistake, I took incorrect diff with older 9.2.x HEAD
Comment #18
kristen polThanks for moving the test code. This still needs manual testing. Let me see if anyone on the bugsmash team has time to do that.
Comment #20
lendudeLooking good already. Just nits.
Can we not add the new test assertions to \Drupal\Tests\views_ui\Functional\TranslatedViewTest::testTranslatedStrings directly and use the views.view.files view like that does? Seems like a bit of a waste to do a new test and add a whole new view.
Comment #21
mohit_aghera commented@Lendude,
I've updated patch and removed the custom view.
However, the process was little tricky and I had to add the "block" in files view.
Because we don't get "More link" option with custom link on general views.
I had performed other changes as well.
Comment #22
lendude@mohit_aghera great cleanup, makes it much easier to follow.
Manually tested this and the translation does indeed show up.
Updated the IS a bit, and added that we don't normally have update hooks for these.
Comment #23
chetanbharambe commentedVerified and tested patch #21.
Patch applied successfully and looks good to me.
Testing Steps:
# Goto: Extend -> Enable Content translation and configuration translation
# Add any multiple languages -> admin/config/regional/language
# Goto: admin/structure/views/view/content
# Click on +Add link to add one block
# Click on "Content: Title (Title)"
# Click on Rewrite results
# Enable the checkbox for "Output this field as a custom link"
# Apply it
# Click on Translate View
# Click on add for respective language
# Click on: DEFAULT DISPLAY SETTINGS
# Click on: TITLE VIEWS ENTITY FIELD HANDLER
# Click on: REWRITE RESULTS
# User is not able to see Link path and link URL
Expected Results: The link URL in views must be translatable.
Actual Results: Currently The link URL in views is not translatable.
Please refer attached screenshots for the same.
Looks good to me.
Can be a move to RTBC.
Comment #24
alexpottCommitted db660b7 and pushed to 9.3.x. Thanks!
ONly committed to 9.3.x as this requires a cache flush to work. We have an update function for the user module so a cache flsuh is already guaranteed for sites going to 9.3.0 so we don't need to add an empty post update here.