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.
Hey Jonatan_Torreblanca,
I just build a quick plugin for that. As soon as it gets approved I will let you know.
2 Likes
Wonderful! Let me know! We need it on october
1 Like
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!
1 Like
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.
1 Like
@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!
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.
1 Like
Looking for feedback on a quick UI-Draft… would this cover the things you mentioned before?
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!