sketch-i18n icon indicating copy to clipboard operation
sketch-i18n copied to clipboard

textlayer names instead of textlayer content as key in JSON

Open awt2542 opened this issue 9 years ago • 3 comments

Hi! It would be nice if you could use the text layers name as a key when exporting the .json object - not just the text's content. That way, the keys in your JSON will always remain the same when you re-import/export changes. This helps when working with translation services like PhraseApp.

I can help with a PR if this sounds like a good addition to the plugin.

awt2542 avatar Sep 24 '15 08:09 awt2542

Hi @awt2542, I was thinking about how we could best introduce this 'feature', since I don't want it to break the current flow. Maybe we could best introduce this as an option while exporting/importing, as in 'Use value as key' and 'Use name of layer as key'. What do you think?

kristof avatar Oct 21 '15 20:10 kristof

@awt2542 & @kristof Nice idea! 👍

kevinbaes avatar Oct 21 '15 20:10 kevinbaes

@kristof sounds like a great approach!

awt2542 avatar Oct 22 '15 07:10 awt2542