vscode, sublime text configs

This commit is contained in:
2025-07-28 01:30:05 +03:00
parent 4f22c005b7
commit 5c141d3f23
17 changed files with 128 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import sublime
import sublime_plugin
class WrapInDjangoTranslateCommand(sublime_plugin.TextCommand):
def run(self, edit):
for region in self.view.sel():
if not region.empty():
# Get the selected text
selected_text = self.view.substr(region)
# Create the translated text
translated_text = '{{% translate "{}" %}}'.format(selected_text)
# Replace the selection with the translated text
self.view.replace(edit, region, translated_text)