Do you hate wrapping your content with i18n tags? Yeah me too, however your editor might do this much easier for you. Here’s a quick tip on how you can create a shortcut to add e.g. a Django trans template tag around a string in Sublime Text:
1. Open your keymap preferences: Sublime Text → Preferences → Key Bindings (User)
2. Add the following snippet there:
{ "keys" : ["ctrl+shift+g"], "command" : "insert_snippet", "args": { "contents": "{% trans \"${0:$SELECTION}\" %}" } }
Now when you select the text and hit ctrl+shift+g, it wraps the text with Django’s i18n template tag like this:
{% trans "Continue" %}
If you have any other tips how to do i18n easily, let us know in the comments below.