diff --git a/lua/django/mappings.lua b/lua/django/mappings.lua index b35eab4..b93c65b 100644 --- a/lua/django/mappings.lua +++ b/lua/django/mappings.lua @@ -64,6 +64,19 @@ local mappings = { end, desc = "run celery", }, + ["jl"] = { desc = "Language" }, + ["jlc"] = { + function() + django.compile_messages() + end, + desc = "Compile messages", + }, + ["jlm"] = { + function() + django.make_messages() + end, + desc = "Make messages", + }, }, } diff --git a/lua/django/utils.lua b/lua/django/utils.lua index c5acac7..5b73cf4 100644 --- a/lua/django/utils.lua +++ b/lua/django/utils.lua @@ -273,4 +273,15 @@ function M.run_celery() end end +function M.make_messages() + local term_num = 11 + toggleterm.exec("./manage.py makemessages -a", term_num, 100, ".", "float", "make_messages", false) +end + +function M.compile_messages() + local term_num = 12 + toggleterm.exec("./manage.py compilemessages", term_num, 100, ".", "float", "compile_messages", false) +end + + return M