From bf4095fbdc51f61a0d61aa6e0b9ecc850318bedb Mon Sep 17 00:00:00 2001 From: zmsdev Date: Thu, 5 Dec 2024 16:49:16 +0100 Subject: [PATCH] added lang for tags --- Products/zms/rest_api.py | 2 ++ Products/zms/zpt/versionmanager/manage_undoversionform.zpt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Products/zms/rest_api.py b/Products/zms/rest_api.py index ab7fd3e73..f54e736aa 100644 --- a/Products/zms/rest_api.py +++ b/Products/zms/rest_api.py @@ -324,6 +324,7 @@ def get_tags(self, context): @api(tag="version", pattern="/{path}/get_tag", method="GET", content_type="application/json") def get_tag(self, context): request = _get_request(context) + lang = request.get('lang') tag = request.get('tag').split(",") dt = tag[0] data = [] @@ -348,6 +349,7 @@ def get_tag(self, context): @api(tag="version", pattern="/{path}/body_content", method="GET", content_type="text/html") def body_content(self, context): request = _get_request(context) + lang = request.get('lang') tag = request.get('tag').split(",") dt = tag[0] html = [] diff --git a/Products/zms/zpt/versionmanager/manage_undoversionform.zpt b/Products/zms/zpt/versionmanager/manage_undoversionform.zpt index 7d7f6cb86..52e76fdf6 100644 --- a/Products/zms/zpt/versionmanager/manage_undoversionform.zpt +++ b/Products/zms/zpt/versionmanager/manage_undoversionform.zpt @@ -202,7 +202,7 @@ $(function() { $.get($ZMI.get_rest_api_url(href)+"/body_content", {tag:tag,lang:getZMILang()}, function(html) { html = remove_curly_braces(html); $html.html(html); - $.get($ZMI.get_rest_api_url(href)+"/get_tag",{tag:tag},function(json) { + $.get($ZMI.get_rest_api_url(href)+"/get_tag",{tag:tag,lang:getZMILang()},function(json) { let str = JSON.stringify(json, null, 4) $json.text(str); console.log("Loaded " + tag + " for " + id);