joystick
joystick copied to clipboard
Automatically track translations to add
Just realized this is possible while working on an i18n email. If i18n() is called with a string, it should check all of the provided i18n files and see if they exist. If they don't, it should assign that key to all translations files. For example, consider you start with this en-US.js file:
export default {
"existing_translation_key": "The thing to say"
}
If we had a call like i18n('another_translation_key'), Joystick could automatically append a placeholder to the above file so a dev doesn't have to do it manually. The end result would be:
export default {
"existing_translation_key": "The thing to say",
"another_translation_key": ""
}
The advantage is that a developer could easily put i18n() calls in the code before translations are available and just hand off the file to a translator after they're implemented. Much smoother process.