After we have the basic function in T206721: Create the code to process SVG file to workable data and back into SVG file, we should also have a way for the interface JS to read and accept available translations, as well as send the new translations in so the system can create a new SVG.
We might need this mid-translation so we can do a "preview" (the JS will send an AJAX request to the server to get the new SVG based on the translations currently in memory).
Open questions:
- What is the best structure to hand off to the JS? JSON blob that includes what data?
- Should we always send the entire structure of the image to the JS so it's all in memory, or should we request per-language data when requested. This means that if a user initially starts with language X and then switches to language Y to translate -- would the information already by in memory in JS (quick switch) or would we need to send a request to the server, get the data, and load existing translations (or empty if they don't exist) into the interface.