Skip to main content
Jonatan_Torreblanca
September 19, 2024
Solved

Text Variables connecting Matching Texts Plugin

  • September 19, 2024
  • 8 replies
  • 474 views

Hi! I am on a project right now where my team has a lot of mobile screens designed and we want to match all the texts to text variables.

Is there any way to connect Text Variables to text fields that contain exactly the same text? A plugin or something?

Example: Having a Text Variable “Log in”, Find all the “Log in” texts, and connect them to it.

This topic has been closed for replies.
Best answer by RobinSchreiner

You can find the plugin here: Auto Replace Text with Variables. It does what it says… it scans all text layers, compares them with existing text variables. If there is a match, the layer value is bound to the variable.

Feel free to try it out and see if it fits your use case. Check out the showcase file and test it on sample files or separate branches before using it on production files.

Let me know if anything is missing or if you encounter any unexpected behavior.

Cheers!

8 replies

RobinSchreiner
New Participant
September 23, 2024

Hey Jonatan_Torreblanca,
I just build a quick plugin for that. As soon as it gets approved I will let you know.

Jonatan_Torreblanca
September 24, 2024

Wonderful! Let me know! We need it on october 🙂

RobinSchreiner
New Participant
September 27, 2024

You can find the plugin here: Auto Replace Text with Variables. It does what it says… it scans all text layers, compares them with existing text variables. If there is a match, the layer value is bound to the variable.

Feel free to try it out and see if it fits your use case. Check out the showcase file and test it on sample files or separate branches before using it on production files.

Let me know if anything is missing or if you encounter any unexpected behavior.

Cheers!

Jonatan_Torreblanca
September 30, 2024

Thanks for taking the time to make this plugin, it is exactly what we were looking for! I’ll update soon if I get any feedback on it.

Jonatan_Torreblanca
September 30, 2024

@RobinSchreiner I have some questions & feedback about the plugin:

  • The plugin search for all the texts available, or only those that are not connected to variables? Some components come from a Design System which has its own variables, and I think the plugin overwrite those when possible.
  • Looks like it doesn’t search on connected libraries variables. It would be cool!
  • Would be nice a future version with a previous UI to play with all these conditionals (which libraries to look, overwrite connected variables or not, etc)

Thanks again!

RobinSchreiner
New Participant
September 30, 2024

Great, thanks for the feedback!

The plugin search for all the texts available, or only those that are not connected to variables? Some components come from a Design System which has its own variables, and I think the plugin overwrite those when possible.

Yeah thats the case in the current version. In the current version it searches for all Textlayers inside the current page.

I can implement a check if a textlayer has already an assigned variable but not sure right now how the value would be interpreted there. Will come back here when i have more information.

Looks like it doesn’t search on connected libraries variables. It would be cool!

Do i get it right, that you have various variable collections, some coming from external libraries? I would have to look into it but should be possible to choose from collections to match with (thinking of a ui where on can checkbox the different collections)
Can you give me a more detailed description?

I’ve already preparing a first draft of the next version with UI that has some more controlls.
The next iteration would be to choose if ALL text layers or only those inside a specific selection should be used to search for matches.

RobinSchreiner
New Participant
October 2, 2024

Looking for feedback on a quick UI-Draft… would this cover the things you mentioned before?
Auto-Replace Text with Variables

Jonatan_Torreblanca
October 8, 2024

Hello @RobinSchreiner , thanks for this fasts updates!

This is totally game changer, and this solves most of the cases.
The only question that comes to my mind is, are this collection checkboxes including collections from imported libraries? (we are doing this with our Design System)

But i think this new interface would be amazing, we’ll be waiting!