Jump to content

Fluency - The complete translation enhancement suite for ProcessWire


FireWire

Recommended Posts

Hm. Really appreciate your work on this! Thank you very much. But as much as I understand and agree with this:

  On 3/29/2025 at 6:29 PM, FireWire said:

I like this implementation because it will provide a good location for possible future features as well without crowding UI for fields.

Expand  

I really don't think that it is intuitive for users to look for the "wipe all" at the opposite direction of the button that does the same thing when filling fields ("translate to all").

My point is: We all understand the necessity of deleting all fields. And we might think of it when we need to reset a field. But the average user? Do you really think he/she will clear the text field, then head over to the translation icon, then click clear all?

I think what will happen is that he/she clears the field (deletes "Home" in your screenshot), hit's save and doesn't even think of deleting it in other languages. Maybe if he/she does, then I think it's more likely that he/she will look for it where he/she always looks for it. Below the field where it says "translate to all". In our project that's what everybody really got used to. Fill in the field, hit translate, hit save.

I honestly and strongly think that the "delete all" feature/button should be close to the "translate all" button.

I get your point about a cluttered UI, but what if a button to "delete all" only appeared if one of the non-default languages are filled and the default language get's cleared out? It would not clutter the UI, it would appear as the user clears the default language value and it would probably remind the user to also clear the other language's values.

What I could also think of is something like this:

JP16815.png

Here I'd see the challenge to differentiate between users that case where someone wants to only delete this languages value or all languages values.

Another idea would be to instead of this:

  On 3/29/2025 at 6:29 PM, FireWire said:

image.png.2ec792a5e78513fe9a72a41aa02dd6af.png

Expand  

Show a popup as soon as the default language value gets deleted that shows something like: "Delete the content of all other languages as well? Cancel / OK"

Please don't hurry with a solution and take your time 🙂 I think a big part of making this feature as useful as possible is not only about providing a way to do it but also about showing/reminding the user that going this way might be necessary (to not end up with orphaned content).

  • Like 1
Link to comment
Share on other sites

  On 3/30/2025 at 1:30 PM, bernhard said:

Please don't hurry with a solution and take your time

Expand  

I sketched my ideas to come back and share them with the people who suggested the feature and I haven't worked on any true implementation yet.  I can assure you there's no rush, I wanted to get some feedback before diving in and coding everything. If I had made a decision in private, programmed everything, then come back and announced the new changes it would be far more work to change my approach if it had a negative reception.

Luckily the custom header actions are 20 lines of code and aren't a commitment.

  • Like 1
Link to comment
Share on other sites

@bernhard I wasn't able to provide a more robust response above but I wanted to mention that my concept wasn't an impulsive decision. I think my language in the confirmation popup should be changed. The "clear all" feature is a shortcut to clear all content in all languages including the default language so that it has one purpose.

One of the things that I first had to consider was how often the feature gets used. Fluency has been available for over 5 years and this feature absolutely has great value but hasn't been mentioned before. I haven't heard about users/devs expressing a need to clear all content from multilanguage fields, and the general practice has been in my experience that if content changes then it would involve entering new content and re-translating. I thought about weighing how often the feature would be used compared to translation and it seemed like much less often, but I didn't have experience to go on.

I also wondered if this was a feature that was use most during the initial build and population of content vs. ongoing content management. I think that was another area where the use of the feature may change over time as far as how often it's used, but again I haven't had the need so my understanding may be limited there.

I'm not against the concept of a always-visible button or icon. Throughout the admin UI the trash icon is, as far as I can tell, mainly implemented for block, group, or object deletion rather than field contents. This is where the use of the trash icon without a label to explain the difference between what it means when used specifically for a field could be confusing because it does break from what it signifies elsewhere.

image.png.f93120a3ee9dc3217128c77d59fa9120.png

image.png.9f8512fc16b10eaa9d865f695481042f.png

image.png.88e565291ba531a3e76ef21624f05603.png

image.png.7fdbedc4f963ea44f7522d409c1de1b1.png

image.png.02111df0ba2c83ae5375445cf8d95a92.png

The position of the translation action menu to the right as a clickable option felt natural with destructive actions located elsewhere. Placing it under a dedicated language icon menu seemed like it would strongly associate the action exclusively with multilanguage field features.

Each field can have translation disabled, so there would have to be a decision whether to include just a trash icon even if there is no translation enabled for consistency when working with multilanguage fields. I think this could be a great convenience enhancement even if it steps outside of Fluency's current purpose and may be even be necessary for consistency.

image.png.7e42c69b8efebaa72e2541d36d1e9eff.png

  On 3/30/2025 at 1:30 PM, bernhard said:

Show a popup as soon as the default language value gets deleted that shows something like: "Delete the content of all other languages as well? Cancel / OK"

Expand  

This may present another challenge because only multilanguage fields would provide the ability to delete content from the primary field that is visible where all other fields that only have primary content would need to manually be deleted. It's a step that may push a little further into ProcessWire's core behavior because some fields enable you to delete content for the default language alone, but other fields that are not multi-lingual still require a select-all-then-delete action by the user. If the trash icon is not present on all fields, would it seem like an oversight?

image.thumb.png.0714cdf978e9709ac050abebe2db7c8a.png

Another thing that comes to mind is whether a multilanguage field with translation disabled were next to a single language field. On the left you can delete the primary content without deleting any other language, but on the right you can't delete the primary content with one click. The tabs hint that it's related to language fields, but non-language fields aren't afforded the same convenience even though they are visually similar to the end user.

image.png.9cf743cc7a5ba71d10a9904866143d45.png

  On 3/30/2025 at 1:30 PM, bernhard said:

Do you really think he/she will clear the text field, then head over to the translation icon, then click clear all?

Expand  

The intention is to have the clear all button clear everything in one action, so if the user is aware of the feature then they wouldn't clear any text to begin with. I think the language I used in my original "confirm" example may not have been as descriptive as it should be. It's an all-or-nothing action. The wording you used: "Are you sure you want to clear content in all languages for this field?" is much better and communicates clearly.

So my approach was placing the option under an action menu since it felt natural to group secondary behaviors. The button that opens the translator is secondary and the ability to delete content in all languages is secondary compared to the primary feature of translation.

I like the ideas and want to take the best approach, and I'm not against any specific implementation. Thinking through this though when you originally mentioned stepping into "core" behavior may be more impactful than it seemed when putting all different types of fields into the mix.

  • Like 2
Link to comment
Share on other sites

  On 3/30/2025 at 4:32 PM, FireWire said:

I sketched my ideas to come back and share them with the people who suggested the feature and I haven't worked on any true implementation yet.  I can assure you there's no rush, I wanted to get some feedback before diving in and coding everything. If I had made a decision in private, programmed everything, then come back and announced the new changes it would be far more work to change my approach if it had a negative reception.

Luckily the custom header actions are 20 lines of code and aren't a commitment.

Expand  

Thx. No offence. Just tried to say no hurry from my side for a solution. Thx for considering it seriously.

  On 3/31/2025 at 12:36 AM, FireWire said:

One of the things that I first had to consider was how often the feature gets used. Fluency has been available for over 5 years and this feature absolutely has great value but hasn't been mentioned before.

Expand  

My guess is that

  1. Many don't provide feedback
  2. Many didn't even realise
  3. If they did, they didn't think of accusing the UI for it but thought, "oh, I need to remember next time to wipe all fields"

Just guesses, of course.

In my project we have a multisite setup where we clone one site and then change the content afterwards. This might have made the issue more obvious, but I think it does not mean that it's not an issue on regular sites. Another detail why it popped up now is that the client was doing all the content editing on her own. If I had been the one to edit the site, the issue might have never popped up, because I would have thought (3) from above.

The reason why I reported it as issue is because my project will hopefully be used by other clients as well and every detail matters, because when done wrong it either means bad results on the frontend (content showing up on a different language that should not be there) or more support from my side.

  On 3/31/2025 at 12:36 AM, FireWire said:

This may present another challenge because only multilanguage fields would provide the ability to delete content from the primary field that is visible where all other fields that only have primary content would need to manually be deleted.

Expand  

True, but I really don't see a problem here. My main point is to make the user not forget to wipe the translations as well. On a single-language field it's totally fine to just delete the content and save.

  On 3/31/2025 at 12:36 AM, FireWire said:

The intention is to have the clear all button clear everything in one action, so if the user is aware of the feature then they wouldn't clear any text to begin with. I think the language I used in my original "confirm" example may not have been as descriptive as it should be. It's an all-or-nothing action. The wording you used: "Are you sure you want to clear content in all languages for this field?" is much better and communicates clearly.

Expand  

Same as above: If the user thinks of it, no problem. But I doubt he/she does.

I also thought that it might be good to have another indicator on the language tabs to show when they are filled while the default tab is empty. Maybe in red? Color blind people wouldn't be able to see it though. Maybe something like this:

Field when empty:

S9hWyfw.png

Field when filled in all languages and the default language gets cleared out:

LSvejmI.png

Non-default language tab with an empty default language tab:

0ZeCszL.png

Or maybe a bit more compact using a tooltip:

b1cbBA0.png

It's a tabler trash icon which looks a bit different than the regular fontawesome trash icon anywhere else in the admin:

<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Tabler Icons by Paweł Kuna - https://github.com/tabler/tabler-icons/blob/master/LICENSE --><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7h16M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3m-5 5l4 4m0-4l-4 4"/></svg>

The orange warning could pop up whenever the main language value is cleared out. Then the user can decide to either

  • enter the new field value and hit "translate to all".
    In that case the warning would also be beneficial as it reminds the user of hitting "translate to all" after entering the new text as well. win win
  • hit "clear content for non-default languages"

PS: I think it should probably be a core feature...

PPS: I think it would also be good to remind the user of translating the content if he/she entered/changed the content of the main language. Something like this: 

qHXwnUU.png

Ok now I realise that the user might also want to change the main language and then wipe all other languages, so the "clear content of non-default languages" should maybe appear whenever the main language was changed (either to empty or something else) and any other language is not empty

Link to comment
Share on other sites

I feel like this is something the editor should know / be told about — the same way editing a page’s title doesn’t automatically update its name — and not something so prominently shown (adding a new button).

At first I was thinking of a hook checking for a change in the main language and then adding a message to the Inputfield indicating they might want to update the other languages as well, something like this:

812361307_Screenshot2025-03-31at10_47_30.thumb.png.0185ed108dc461bcc70157c693289695.png

But then I thought it could be more subtle / embedded within Fluency’s UI, maybe the button’s text could be "Translation Available" when idle, "Translate to all languages" when main language is changed (non-empty) and "Clear all languages" when the main language is cleared / empty AND the other languages have a value (otherwise, default to "Translation Available"):

890379148_Screenshot2025-03-31at10_48_45.thumb.png.6bb9094b9816ff01a689e767542b5b68.png

  • Like 1
Link to comment
Share on other sites

  On 3/31/2025 at 8:54 AM, monollonom said:

I feel like this is something the editor should know / be told about — the same way editing a page’s title doesn’t automatically update its name — and not something so prominently shown (adding a new button).

Expand  

I'm almost always configuring my templates to automatically update the page name based on the title 😉 

  On 3/31/2025 at 8:54 AM, monollonom said:

890379148_Screenshot2025-03-31at10_48_45.thumb.png.6bb9094b9816ff01a689e767542b5b68.png

Expand  

Yeah, nice! But still, my point is to make it more obvious to the user to not forget to translate. I always test these things with my mother and this is eye-opening from time to time! 😄 She can not type blindly. So she types, then looks up on the screen. I bet a lot that she would not realise the change from "translate to all languages" to "clear all languages" after she typed or hit backspace.

I updated my post with some new screenshots of mockups. 

  On 3/31/2025 at 8:54 AM, monollonom said:

812361307_Screenshot2025-03-31at10_47_30.thumb.png.0185ed108dc461bcc70157c693289695.png

Expand  

I like it because it would be obvious but it would also cause the UI to jump around because it moves the input down. I tried to avoid that with where I placed the ui elements.

  • Like 1
Link to comment
Share on other sites

  On 3/31/2025 at 9:03 AM, bernhard said:

I always test these things with my mother and this is eye-opening from time to time!

Expand  

Mothers are the best beta-testers haha.

Maybe the change in the copy is indeed too subtle, but in that case maybe I’d go with your proposal of the Trash icon and the tooltip, shown when you cleared the main language. But like you said in this case this is more related to core than Fluency.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...