Problem/Motivation
Drupal 8 has a nice in-place editing interface where you can click into any content and start editing. This works very well with translations. However, when you need to create a translation, you need to first go to a separate screen (the translate tab) and add the translation there. Then you get to a content backend form, where you can edit the entity. If you save the yet untranslated entity there, then you can go back to the frontend and use the frontend in-place editing feature to translate the entity. Given that translation is a native feature of entities, it would be nice to somehow reflect that in the in-place editing user inteface as well, and make the two compatible.
Proposed resolution
Figure out the best UX to create translations in-place. Either make it easy to create a translation and then edit with the current in-place editing or introduce a sidebar pattern where the translation can be edited in a form while the original content is shown (effectively implementing a two column layout on screens that are wide enough). Smaller screens need to be considered as well for proper user experience.
Remaining tasks
Brainstorm about possible user interfaces and interaction flows to make translation more in-place.
User interface changes
To be determined.
API changes
Unlikely.
Data model changes
Unlikely.
Comment | File | Size | Author |
---|---|---|---|
#6 | inPlaceEditingTranslationInInterface1.png | 40.52 KB | prabhu9484 |
#5 | inPlaceEditingTranslationInInterface2.png | 58.38 KB | prabhu9484 |
Comments
Comment #2
cosmicdreams CreditAttribution: cosmicdreams commentedI love brainstorms!
Here's a story:
As a content creator, when I see a page on my website, I want the ability to view it with different languages.
So we need a way to switch the language of a specific page and see how everything on that page looks like when that culture context has been applied. That probably means that a content editor needs the ability to group a set of changes for specific fields and then save them all with the same language culture.
Comment #3
Gábor HojtsyWell, there is the language switcher block which content authors can use in an in-place editing context. The thing is your site will display in Chinese, you can in-place edit the Chinese display but it will not create a Chinese translation, it will edit the one that was actually displayed as a fallback (unless you already have a Chinese translation which this issue does not really cater for :D).
Comment #4
Wim Leers+1 for this feature overall — speaking as one of the maintainers of
quickedit
.Comment #5
prabhu9484 CreditAttribution: prabhu9484 commentedThanks Drupalers - I have visualized the UX like the 2 images attached:
1. In the In-place editing block there will be the language link eg हिंदी
2. On clicking हिंदी the in-place editing of that language will appear on the right side
Please review.
Comment #6
prabhu9484 CreditAttribution: prabhu9484 commentedSorry the flow is the following image order:
Comment #7
lomasr CreditAttribution: lomasr at gai Technologies Pvt Ltd commented#5 seems a good idea . In the case of more than one alternate languages, only one langauge should be displayed on the right side in quick edit...
Comment #8
Gábor HojtsySo as per the first image, language links would be displayed along the title of the entity? How does this scale to N number of languages? I am also thinking about the flow of how this would work. The content is full width on the first screen while it would somehow shrink down (and adapt?) in the second?
Comment #9
andypostI'd prefer to edit only one (current language)
But mark untranslatable fields somehow or just add current language hint in quickedit for language specific fields
Comment #10
prabhu9484 CreditAttribution: prabhu9484 commented@Gabor Hojtsy - Many thanks
1. yes - in case of N number of languages, the links will populate on the right side.
2. yes - to fit max 2 translation "quick editors" the "default" will shrink to make space for max 1 more "quick editor", so a user can have both open simultaneously
Comment #11
yoroy CreditAttribution: yoroy at Roy Scholten commentedAs for the scaling to multiple languages: instead of showing actual languages we could maybe show a "Translate…" link somewhere that then would list available languages to choose from.
The power of quick edit is that you can change things on a per-field basis. Right now the proposal is to show 2 translations of the entity side by side. Would there be a way to click and activate translations on a per-field basis? So that you show 2 fields together instead of the full entity?
Comment #12
Kristen PolI feel like the side-by-side forms might be cumbersome since there are tabs in addition to the main form fields.
So, it seems to me that using one form and toggling makes the most sense and I like the suggestion from @yoroy in #11 where, instead of listing each language (which is cumbersome as the number goes up), there would be something like "Translate..." which can be clicked and then the language can be chosen.
But, even with this, there could be a large number of enabled languages. Should this be a select list like in the installer and add language form? Autocomplete? For simplicity, the select list probably is best and is consistent with the usage in other places.
Comment #13
Gábor HojtsySo apparently I was not successful enough to gather interest in this. Well, well. Removing from sprint now.