You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/12/19 21:12:48 UTC

[sling-org-apache-sling-app-cms] 01/01: SLING-8930 - Updating to fix the reload issue in i18n

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch SLING-8930-i18n-not-reloading
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 45cb96f24449944c8324bfe41d7cd1594f2fbe73
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Dec 19 16:12:33 2019 -0500

    SLING-8930 - Updating to fix the reload issue in i18n
---
 .../sling-cms/components/cms/i18ncontainer/i18ncontainer.jsp  | 11 +++++------
 .../jcr_root/libs/sling-cms/content/i18n/entry/create.json    |  8 ++++----
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/i18ncontainer/i18ncontainer.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/i18ncontainer/i18ncontainer.jsp
index 70829c1..55e1112 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/i18ncontainer/i18ncontainer.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/i18ncontainer/i18ncontainer.jsp
@@ -17,7 +17,7 @@
  * under the License.
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
-<div class="scroll-container">
+<div class="scroll-container reload-container" data-path="${resource.path}.html${slingRequest.requestPathInfo.suffix}">
     <sling:include path="${resource.path}" resourceType="sling-cms/components/general/container" />
     <c:forEach var="language" items="${sling:listChildren(slingRequest.requestPathInfo.suffixResource)}">
         <c:if test="${firstChild == null && not empty language.valueMap['jcr:language']}">
@@ -71,10 +71,9 @@
                                             </c:if>
                                         </c:forEach>
                                         <c:if test="${keyfound == 'false'}">
-                                            <c:set var="rand" value="${helper.random}" />
-                                            <input name="${language.name}/entry_${rand}/sling:message" class="input" type="text" value="" />
-                                            <input name="${language.name}/entry_${rand}/sling:key" type="hidden" value="${key}" />
-                                            <input name="${language.name}/entry_${rand}/jcr:primaryType" type="hidden" value="sling:MessageEntry" />
+                                            <input name="${language.name}/${key}/sling:message" class="input" type="text" value="" />
+                                            <input name="${language.name}/${key}/sling:key" type="hidden" value="${key}" />
+                                            <input name="${language.name}/${key}/jcr:primaryType" type="hidden" value="sling:MessageEntry" />
                                         </c:if>
                                     </td>
                                 </c:if>
@@ -86,4 +85,4 @@
             <button class="button is-primary">Save i18n Dictionary</button>
         </fieldset>
     </form>
-</div>
\ No newline at end of file
+</div>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/entry/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/entry/create.json
index 895641f..c4bb6bb 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/entry/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/i18n/entry/create.json
@@ -31,11 +31,11 @@
                         "name": "sling:message",
                         "value": ""
                     },
-                    "nameHint": {
+                    "nameParam": {
                         "jcr:primaryType": "nt:unstructured",
                         "sling:resourceType": "sling-cms/components/editor/fields/hidden",
-                        "value": "entry",
-                        "name": ":nameHint"
+                        "name": ":nameParam",
+                        "value": "sling:key"
                     },
                     "primaryType": {
                         "jcr:primaryType": "nt:unstructured",
@@ -47,4 +47,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}