kristof / sketch-i18n

Translate pages in Sketch
172 stars 25 forks source link

textlayer names instead of textlayer content as key in JSON #2

Open awt2542 opened 8 years ago

awt2542 commented 8 years ago

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.

kristof commented 8 years ago

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?

kevinbaes commented 8 years ago

@awt2542 & @kristof Nice idea! 👍

awt2542 commented 8 years ago

@kristof sounds like a great approach!