Crowdin Open Graphie
This browser plugin simplifies editing of Graphie images. It opens a preloaded Graphie link in the Graphie editor 3 directly from a Crowdin window.
(only available in Chrome)
Context: Why do we need a new plugin?
Some of the graphie images must be localized manually in the Graphie editor at graphie-to-png.kasandbox.org.
For a translator, this means:
- Selecting a Graphie link from a Crowdin string. (painful if embedded in text)
- Opening the
- Copy and paste into the “Load rendered image” field
- Click “Load”
This plugin reduces this process to a single click or keyboard shortcut.
The code mimics the Khan Academy Dots 1 plugin. After installatino, it creates a new button in a Crowdin window. You can trigger the plugin by clicking or “Alt+G/Cmd+G” keyboard shortcut.
The code tries to find a graphie link and opens it in
graphie-to-png editor. It uses the following rules, in that order:
- It tries to find a link in the translated string. If you already translated the graphie link, it will open the translated version.
- If the translated string is empty or does not contain a link, it will search for the link in the original English string
- If there’s more than one Graphie link, it will open only the first one.
(we debated whether it should open all of them, but there are some strings with lots of graphie links and opening bambilion new tabs isn’t very friendly)
Feedback and suggestions are very much appreciated.
Here’s the source code for those who are interested: