From dc665385f528af7a28b343cfcb9b26153cb32d41 Mon Sep 17 00:00:00 2001 From: Roy Wetherall Date: Tue, 13 Dec 2011 01:18:31 +0000 Subject: [PATCH] ALF-11463: Dutch - Localised Templates * Dutch email templates added * Patch added git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32715 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../notification/wf-email.html_nl.ftl | 164 ++++++++++++++++++ .../workflow-email-notification.xml | 27 ++- .../messages/bootstrap-spaces.properties | 1 + .../messages/patch-service.properties | 4 + .../alfresco/patch/patch-services-context.xml | 13 ++ .../templates/activities-email-templates.xml | 16 ++ .../activities-email_nl.ftl | 134 ++++++++++++++ .../templates/following-email-templates.xml | 15 ++ .../following-email.html_nl.ftl | 76 ++++++++ .../templates/invite-email-templates.xml | 26 ++- ...l_de.html.ftl => invite-email.html_de.ftl} | 0 ...l_es.html.ftl => invite-email.html_es.ftl} | 0 ...l_fr.html.ftl => invite-email.html_fr.ftl} | 0 ...l_it.html.ftl => invite-email.html_it.ftl} | 0 ...l_ja.html.ftl => invite-email.html_ja.ftl} | 0 .../invite-email.html_nl.ftl | 109 ++++++++++++ .../alfresco/templates/new-user-templates.xml | 16 ++ .../new-user-templates/new-user-email_nl.html | 96 ++++++++++ .../templates/notify_email_templates.xml | 15 ++ .../notify_email_templates/notify_nl.htm | 80 +++++++++ config/alfresco/version.properties | 2 +- .../impl/AddDutchEmailTemplatesPatch.java | 121 +++++++++++++ .../impl/GenericEMailTemplateUpdatePatch.java | 59 +++++-- .../UpdateFollowingEmailTemplatesPatch.java | 8 + ...ateWorkflowNotificationTemplatesPatch.java | 7 + 25 files changed, 964 insertions(+), 25 deletions(-) create mode 100644 config/alfresco/bootstrap/notification/wf-email.html_nl.ftl create mode 100644 config/alfresco/templates/activities-email-templates/activities-email_nl.ftl create mode 100644 config/alfresco/templates/following-email-templates/following-email.html_nl.ftl rename config/alfresco/templates/invite-email-templates/{invite-email_de.html.ftl => invite-email.html_de.ftl} (100%) rename config/alfresco/templates/invite-email-templates/{invite-email_es.html.ftl => invite-email.html_es.ftl} (100%) rename config/alfresco/templates/invite-email-templates/{invite-email_fr.html.ftl => invite-email.html_fr.ftl} (100%) rename config/alfresco/templates/invite-email-templates/{invite-email_it.html.ftl => invite-email.html_it.ftl} (100%) rename config/alfresco/templates/invite-email-templates/{invite-email_ja.html.ftl => invite-email.html_ja.ftl} (100%) create mode 100644 config/alfresco/templates/invite-email-templates/invite-email.html_nl.ftl create mode 100644 config/alfresco/templates/new-user-templates/new-user-email_nl.html create mode 100644 config/alfresco/templates/notify_email_templates/notify_nl.htm create mode 100644 source/java/org/alfresco/repo/admin/patch/impl/AddDutchEmailTemplatesPatch.java diff --git a/config/alfresco/bootstrap/notification/wf-email.html_nl.ftl b/config/alfresco/bootstrap/notification/wf-email.html_nl.ftl new file mode 100644 index 0000000000..5e0b6617c2 --- /dev/null +++ b/config/alfresco/bootstrap/notification/wf-email.html_nl.ftl @@ -0,0 +1,164 @@ + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + +
+ + +
+ <#if args.workflowPooled == true> + Nieuwe gepoolde taak + <#else> + Er is een taak aan u toegewezen + +
+
+ ${date?datetime?string.full} +
+
+
+

Hi,

+ +

+ <#if args.workflowPooled == true> + De volgende gepoolde taak is beschikbaar om te worden opgehaald: + <#else> + De volgende taak is aan u toegewezen: + +

+ +

"${args.workflowTitle}"

+ + <#if (args.workflowDescription)??> +

${args.workflowDescription}

+ + +

+ <#if (args.workflowDueDate)??>Due:  ${args.workflowDueDate?date?string.full}
+ <#if (args.workflowPriority)??> + Prioriteit:   + + <#if args.workflowPriority == 3> + Laag + <#elseif args.workflowPriority == 2> + Gemiddeld + <#else> + Hoog + + + +

+ + <#if (args.workflowDocuments)??> + + <#list args.workflowDocuments as doc> + + + + <#if doc_has_next> + + + +
+ + + + + +
+ + + + + + + + + + + + +
${doc.name}
Klik op deze koppeling om het document te downloaden:
+ + ${shareUrl}/proxy/alfresco/api/node/content/workspace/SpacesStore/${doc.id}/${doc.name}?a=true +
+
+
+ + + <#if args.workflowPooled == true> +

Klik op deze koppeling om de taak te bekijken:

+

${shareUrl}/page/task-details?taskId=${args.workflowId} + <#else> +

Klik op deze koppeling om de taak te bewerken:

+

${shareUrl}/page/task-edit?taskId=${args.workflowId} + + +

Hoogachtend,
+ Alfresco ${productName!""}

+
+
+
+
 
+
+ Ga voor meer informatie over Alfresco ${productName!""} naar http://www.alfresco.com +
+
 
+
+ +
+
+
+ + \ No newline at end of file diff --git a/config/alfresco/bootstrap/notification/workflow-email-notification.xml b/config/alfresco/bootstrap/notification/workflow-email-notification.xml index 852a026e6f..3efe544e50 100644 --- a/config/alfresco/bootstrap/notification/workflow-email-notification.xml +++ b/config/alfresco/bootstrap/notification/workflow-email-notification.xml @@ -30,7 +30,7 @@ wf-email.html.ftl wf-email.html.ftl ${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default} - contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html.ftl|mimetype=text/plain|size=1455|encoding=UTF-8 + contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html.ftl|mimetype=text/plain|encoding=UTF-8 @@ -45,7 +45,7 @@ wf-email.html_de.ftl wf-email.html_de.ftl ${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default} - contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_de.ftl|mimetype=text/plain|size=1455|encoding=UTF-8 + contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_de.ftl|mimetype=text/plain|encoding=UTF-8 @@ -60,7 +60,7 @@ wf-email.html_es.ftl wf-email.html_es.ftl ${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default} - contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_es.ftl|mimetype=text/plain|size=1455|encoding=UTF-8 + contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_es.ftl|mimetype=text/plain|encoding=UTF-8 @@ -75,7 +75,7 @@ wf-email.html_fr.ftl wf-email.html_fr.ftl ${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default} - contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_fr.ftl|mimetype=text/plain|size=1455|encoding=UTF-8 + contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_fr.ftl|mimetype=text/plain|encoding=UTF-8 @@ -90,7 +90,7 @@ wf-email.html_it.ftl wf-email.html_it.ftl ${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default} - contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_it.ftl|mimetype=text/plain|size=1455|encoding=UTF-8 + contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_it.ftl|mimetype=text/plain|encoding=UTF-8 @@ -105,7 +105,22 @@ wf-email.html_ja.ftl wf-email.html_ja.ftl ${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default} - contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_ja.ftl|mimetype=text/plain|size=1455|encoding=UTF-8 + contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_ja.ftl|mimetype=text/plain|encoding=UTF-8 + + + + + + + + + + + true + wf-email.html_nl.ftl + wf-email.html_nl.ftl + ${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default} + contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html_nl.ftl|mimetype=text/plain|encoding=UTF-8 diff --git a/config/alfresco/messages/bootstrap-spaces.properties b/config/alfresco/messages/bootstrap-spaces.properties index 0785c22613..b37313b9eb 100644 --- a/config/alfresco/messages/bootstrap-spaces.properties +++ b/config/alfresco/messages/bootstrap-spaces.properties @@ -113,6 +113,7 @@ version.german=German version version.italian=Italian version version.japanese=Japanese version version.spanish=Spanish version +version.dutch=Dutch version spaces.web.client.extension.name=Web Client Extension spaces.web.client.extension.title=Customized Web Client diff --git a/config/alfresco/messages/patch-service.properties b/config/alfresco/messages/patch-service.properties index f64f5553db..e3c32f2055 100644 --- a/config/alfresco/messages/patch-service.properties +++ b/config/alfresco/messages/patch-service.properties @@ -446,3 +446,7 @@ patch.updateWorkflowNotificationTemplates.result=Workflow Notification Templates patch.updateFollowingEmailTemplatesPatch.description=Patch to update the following notification email templates. patch.updateFollowingEmailTemplatesPatch.result=Following notification email templates successfully updated. patch.updateFollowingEmailTemplatesPatch.error=Error retrieving base template when trying to patch the following email templates. + +patch.addDutchEmailTemplatesPatch.description=Patch to add Dutch email templates. +patch.addDutchEmailTemplatesPatch.result=Dutch email templates have been successfully added. +patch.addDutchEmailTemplatesPatch.error=Error retrieving base template when trying to add Dutch email templates. \ No newline at end of file diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml index 76c44b35cc..73a0ae96ab 100644 --- a/config/alfresco/patch/patch-services-context.xml +++ b/config/alfresco/patch/patch-services-context.xml @@ -2990,4 +2990,17 @@ + + patch.addDutchEmailTemplatesPatch + patch.addDutchEmailTemplatesPatch.description + 0 + 5023 + 5024 + true + true + + + + + diff --git a/config/alfresco/templates/activities-email-templates.xml b/config/alfresco/templates/activities-email-templates.xml index 1f52fd207f..e38712f0dd 100644 --- a/config/alfresco/templates/activities-email-templates.xml +++ b/config/alfresco/templates/activities-email-templates.xml @@ -116,6 +116,22 @@ ${spaces.templates.email.generate_the_activities_email.description} - ${version.japanese} + + + + + + + + + true + contentUrl=classpath:alfresco/templates/activities-email-templates/activities-email_nl.ftl|mimetype=text/plain|size=8884|encoding=UTF-8 + + activities-email_nl.ftl + activities-email_nl.ftl + ${spaces.templates.email.generate_the_activities_email.description} - ${version.dutch} + + diff --git a/config/alfresco/templates/activities-email-templates/activities-email_nl.ftl b/config/alfresco/templates/activities-email-templates/activities-email_nl.ftl new file mode 100644 index 0000000000..0dfd9a99b8 --- /dev/null +++ b/config/alfresco/templates/activities-email-templates/activities-email_nl.ftl @@ -0,0 +1,134 @@ + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +
+ + + + +
+
+ Recente activiteiten +
+
+ ${date?datetime?string.full} +
+
+ <#if activities?exists && activities?size > 0> + <#list activities as activity> + <#assign userLink="${activity.activitySummary.firstName!\"\"} ${activity.activitySummary.lastName!\"\"}"> + <#assign secondUserLink=""> + <#assign itemLink="${activity.activitySummary.title!\"\"}"> + <#assign siteLink="${siteTitles[activity.siteNetwork]!activity.siteNetwork?html}"> + + <#assign suppressSite=false> + + <#switch activity.activityType> + <#case "org.alfresco.site.user-joined"> + <#case "org.alfresco.site.user-left"> + <#assign suppressSite=true> + <#case "org.alfresco.site.user-role-changed"> + <#assign custom0=message("role."+activity.activitySummary.role)!""> + <#assign userLink="${activity.activitySummary.memberFirstName!\"\"} ${activity.activitySummary.memberLastName!\"\"}"> + <#break> + <#case "org.alfresco.site.group-added"> + <#case "org.alfresco.site.group-removed"> + <#assign suppressSite=true> + <#case "org.alfresco.site.group-role-changed"> + <#assign custom0=message("role."+activity.activitySummary.role)!""> + <#assign userLink=activity.activitySummary.groupName?replace("GROUP_", "")> + <#break> + <#case "org.alfresco.subscriptions.followed"> + <#assign userLink="${activity.activitySummary.followerFirstName!\"\"} ${activity.activitySummary.followerLastName!\"\"}"> + <#assign secondUserLink="${activity.activitySummary.userFirstName!\"\"} ${activity.activitySummary.userLastName!\"\"}"> + <#assign suppressSite=true> + <#break> + <#case "org.alfresco.subscriptions.subscribed"> + <#assign userLink="${activity.activitySummary.subscriberFirstName!\"\"} ${activity.activitySummary.subscriberLastName!\"\"}"> + <#assign custom0=(activity.activitySummary.node!"")?html> + <#assign suppressSite=true> + <#break> + <#case "org.alfresco.profile.status-changed"> + <#assign custom0=(activity.activitySummary.status!"")?html> + <#assign suppressSite=true> + <#break> + <#default> + + + <#assign detail=message(activity.activityType?html, itemLink, userLink, custom0, activity.activitySummary.custom1!"", siteLink, secondUserLink)!""> + +
+ <#if suppressSite>${detail}<#else>${message("in.site", detail, siteLink)} +
+
+ ${activity.postDate?datetime?string.medium} +
+ + +
+
+
+
 
+
+ U kunt meldingen uitschakelen door op deze koppeling te klikken:
+
${shareUrl}/page/user/${personProps["cm:userName"]}/user-notifications +
+
 
+
+ +
+
+
+ + diff --git a/config/alfresco/templates/following-email-templates.xml b/config/alfresco/templates/following-email-templates.xml index 224e560691..7ad80c5f5f 100644 --- a/config/alfresco/templates/following-email-templates.xml +++ b/config/alfresco/templates/following-email-templates.xml @@ -99,6 +99,21 @@ contentUrl=classpath:alfresco/templates/following-email-templates/following-email.html_ja.ftl|mimetype=text/plain|size=3688|encoding=UTF-8 + + + + + + + + + true + following-email.html_nl.ftl + following-email.html_nl.ftl + ${email.templates.email_template_for_following_notifications} - ${version.default} + contentUrl=classpath:alfresco/templates/following-email-templates/following-email.html_nl.ftl|mimetype=text/plain|size=3688|encoding=UTF-8 + + diff --git a/config/alfresco/templates/following-email-templates/following-email.html_nl.ftl b/config/alfresco/templates/following-email-templates/following-email.html_nl.ftl new file mode 100644 index 0000000000..91cdbdcedc --- /dev/null +++ b/config/alfresco/templates/following-email-templates/following-email.html_nl.ftl @@ -0,0 +1,76 @@ + + <#assign followerFullName>${followerFirstName} ${followerLastName} + <#assign followerLink>${(followerFullName?trim)?html} + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + +
+ + + + +
+ + + + + +
+ + +
+ ${followerLink} volgt u nu. +
+
+ <#if followerJobTitle??>${followerJobTitle?html}
+
+
+ <#if followingCount > 0>U volgt${followingCount} anderen. U hebt${followerCount} volgers. +
+
+
+
+
 
+
+ +
+
+
+ + \ No newline at end of file diff --git a/config/alfresco/templates/invite-email-templates.xml b/config/alfresco/templates/invite-email-templates.xml index 3c9355d587..89c8719290 100644 --- a/config/alfresco/templates/invite-email-templates.xml +++ b/config/alfresco/templates/invite-email-templates.xml @@ -31,7 +31,7 @@ invite-email_fr.html.ftl invite-email_fr.html.ftl ${spaces.templates.email.generate_the_invite_email.description} - ${version.french} - contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email_fr.html.ftl|mimetype=text/plain|size=1601|encoding=UTF-8 + contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email.html_fr.ftl|mimetype=text/plain|size=1601|encoding=UTF-8 @@ -47,7 +47,7 @@ invite-email_es.html.ftl invite-email_es.html.ftl ${spaces.templates.email.generate_the_invite_email.description} - ${version.spanish} - contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email_es.html.ftl|mimetype=text/plain|size=1584|encoding=UTF-8 + contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email.html_es.ftl|mimetype=text/plain|size=1584|encoding=UTF-8 @@ -63,7 +63,7 @@ invite-email_de.html.ftl invite-email_de.html.ftl ${spaces.templates.email.generate_the_invite_email.description} - ${version.german} - contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email_de.html.ftl|mimetype=text/plain|size=1583|encoding=UTF-8 + contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email.html_de.ftl|mimetype=text/plain|size=1583|encoding=UTF-8 @@ -79,7 +79,7 @@ invite-email_it.html.ftl invite-email_it.html.ftl ${spaces.templates.email.generate_the_invite_email.description} - ${version.italian} - contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email_it.html.ftl|mimetype=text/plain|size=1565|encoding=UTF-8 + contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email.html_it.ftl|mimetype=text/plain|size=1565|encoding=UTF-8 @@ -95,7 +95,23 @@ invite-email_ja.html.ftl invite-email_ja.html.ftl ${spaces.templates.email.generate_the_invite_email.description} - ${version.japanese} - contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email_ja.html.ftl|mimetype=text/plain|size=1807|encoding=UTF-8 + contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email.html_ja.ftl|mimetype=text/plain|size=1807|encoding=UTF-8 + + + + + + + + + + + + true + invite-email_nl.html.ftl + invite-email_nl.html.ftl + ${spaces.templates.email.generate_the_invite_email.description} - ${version.dutch} + contentUrl=classpath:alfresco/templates/invite-email-templates/invite-email.html_nl.ftl|mimetype=text/plain|size=1807|encoding=UTF-8 diff --git a/config/alfresco/templates/invite-email-templates/invite-email_de.html.ftl b/config/alfresco/templates/invite-email-templates/invite-email.html_de.ftl similarity index 100% rename from config/alfresco/templates/invite-email-templates/invite-email_de.html.ftl rename to config/alfresco/templates/invite-email-templates/invite-email.html_de.ftl diff --git a/config/alfresco/templates/invite-email-templates/invite-email_es.html.ftl b/config/alfresco/templates/invite-email-templates/invite-email.html_es.ftl similarity index 100% rename from config/alfresco/templates/invite-email-templates/invite-email_es.html.ftl rename to config/alfresco/templates/invite-email-templates/invite-email.html_es.ftl diff --git a/config/alfresco/templates/invite-email-templates/invite-email_fr.html.ftl b/config/alfresco/templates/invite-email-templates/invite-email.html_fr.ftl similarity index 100% rename from config/alfresco/templates/invite-email-templates/invite-email_fr.html.ftl rename to config/alfresco/templates/invite-email-templates/invite-email.html_fr.ftl diff --git a/config/alfresco/templates/invite-email-templates/invite-email_it.html.ftl b/config/alfresco/templates/invite-email-templates/invite-email.html_it.ftl similarity index 100% rename from config/alfresco/templates/invite-email-templates/invite-email_it.html.ftl rename to config/alfresco/templates/invite-email-templates/invite-email.html_it.ftl diff --git a/config/alfresco/templates/invite-email-templates/invite-email_ja.html.ftl b/config/alfresco/templates/invite-email-templates/invite-email.html_ja.ftl similarity index 100% rename from config/alfresco/templates/invite-email-templates/invite-email_ja.html.ftl rename to config/alfresco/templates/invite-email-templates/invite-email.html_ja.ftl diff --git a/config/alfresco/templates/invite-email-templates/invite-email.html_nl.ftl b/config/alfresco/templates/invite-email-templates/invite-email.html_nl.ftl new file mode 100644 index 0000000000..79a755505b --- /dev/null +++ b/config/alfresco/templates/invite-email-templates/invite-email.html_nl.ftl @@ -0,0 +1,109 @@ + + <#assign inviterPersonRef=args["inviterPersonRef"]/> + <#assign inviterPerson=companyhome.nodeByReference[inviterPersonRef]/> + <#assign inviteePersonRef=args["inviteePersonRef"]/> + <#assign inviteePerson=companyhome.nodeByReference[inviteePersonRef]/> + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + +
+ + +
+ U bent uitgenodigd voor de site '${args["siteName"]}' +
+
+ ${date?datetime?string.full} +
+
+
+

Hi ${inviteePerson.properties["cm:firstName"]!""},

+ +

${inviterPerson.properties["cm:firstName"]!""} ${inviterPerson.properties["cm:lastName"]!""} + heeft u uitgenodigd voor de site ${args["siteName"]} met de rol van ${args["inviteeSiteRole"]}.

+ +

Klik op deze koppeling om de uitnodiging van ${inviterPerson.properties["cm:firstName"]!""} te accepteren:
+
${args["acceptLink"]}

+ + <#if args["inviteeGenPassword"]?exists> +

Er is een account voor u gemaakt met deze aanmeldingsgegevens:
+
Gebruikersnaam: ${args["inviteeUserName"]} +
Wachtwoord: ${args["inviteeGenPassword"]} +

+ +

U wordt geadviseerd het wachtwoord te wijzigen wanneer u zich voor de eerste keer aanmeldt.
+ U kunt dit doen door naar Mijn profiel te gaan en Wachtwoord wijzigen te selecteren.

+ + +

Klik op deze koppeling als u de uitnodiging van ${inviterPerson.properties["cm:firstName"]!""}, wilt afwijzen:
+
${args["rejectLink"]}

+ +

Hoogachtend,
+ Alfresco ${productName!""}

+
+
+
+
 
+
+ Ga voor meer informatie over Alfresco ${productName!""} naar http://www.alfresco.com +
+
 
+
+ +
+
+
+ + \ No newline at end of file diff --git a/config/alfresco/templates/new-user-templates.xml b/config/alfresco/templates/new-user-templates.xml index 1fa56af7ff..2bd4c2217b 100644 --- a/config/alfresco/templates/new-user-templates.xml +++ b/config/alfresco/templates/new-user-templates.xml @@ -98,4 +98,20 @@ contentUrl=classpath:alfresco/templates/new-user-templates/new-user-email_ja.html|mimetype=text/plain|size=805|encoding=UTF-8 + + + + + + + + + + true + new-user-email_nl.html.ftl + new-user-email_nl.html.ftl + ${email.templates.email_template_for_notifying_new_users} - ${version.dutch} + contentUrl=classpath:alfresco/templates/new-user-templates/new-user-email_nl.html|mimetype=text/plain|size=805|encoding=UTF-8 + + diff --git a/config/alfresco/templates/new-user-templates/new-user-email_nl.html b/config/alfresco/templates/new-user-templates/new-user-email_nl.html new file mode 100644 index 0000000000..ae4ebf4bb4 --- /dev/null +++ b/config/alfresco/templates/new-user-templates/new-user-email_nl.html @@ -0,0 +1,96 @@ + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + +
+ + +
+ Uw nieuwe Alfresco ${productName!""}-account +
+
${date?datetime?string.full} +
+
+
+

Hallo ${firstname},

+ +

${creator.firstname} ${creator.lastname} heeft een Alfresco ${productName!""}-account voor u gemaakt.

+ +

Klik op deze koppeling om u aan te melden:
+
${shareUrl}

+ +

Uw aanmeldingsgegevens zijn:
+
Gebruikersnaam: ${username} +
Wachtwoord: ${password} +

+ +

U wordt geadviseerd het wachtwoord te wijzigen wanneer u zich voor de eerste keer aanmeldt.
+ U kunt dit doen door naar Mijn profiel te gaan en Wachtwoord wijzigen te selecteren.

+ +

Hoogachtend,
+ Alfresco ${productName!""}

+
+
+
+
 
+
+ Ga voor meer informatie over Alfresco ${productName!""} naar http://www.alfresco.com +
+
 
+
+
+
+
+ + diff --git a/config/alfresco/templates/notify_email_templates.xml b/config/alfresco/templates/notify_email_templates.xml index 94e6b1b16d..bae5de53d2 100644 --- a/config/alfresco/templates/notify_email_templates.xml +++ b/config/alfresco/templates/notify_email_templates.xml @@ -89,4 +89,19 @@ + + + + + + + + true + ${email.template.email_template_for_notifying_users} - ${version.dutch} + notify_user_email_nl.html.ftl + contentUrl=classpath:alfresco/templates/notify_email_templates/notify_nl.htm|mimetype=text/plain|size=585|encoding=UTF-8 + notify_user_email_nl.html.ftl + + + \ No newline at end of file diff --git a/config/alfresco/templates/notify_email_templates/notify_nl.htm b/config/alfresco/templates/notify_email_templates/notify_nl.htm new file mode 100644 index 0000000000..5b9dd311a4 --- /dev/null +++ b/config/alfresco/templates/notify_email_templates/notify_nl.htm @@ -0,0 +1,80 @@ + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + +
+ + + + +
+ + + + + +
+ + +
${person.properties.firstName} <#if person.properties.lastName?exists> ${person.properties.lastName} heeft een nieuw contentobject, ${document.name}, toegevoegd op de ${document.siteShortName!""}-site +
+
${date?datetime?string.full} +
+
+
+

Hallo,

+ +

${person.properties.firstName} + <#if person.properties.lastName?exists> ${person.properties.lastName} + heeft een nieuw contentobject, ${document.name}, toegevoegd op de ${document.siteShortName!""}-site. + +

Klik op deze koppeling om het object te bekijken:
+
${document.shareUrl}

+ +

Hoogachtend,
+ Alfresco

+
+
+
+
 
+
+ +
+
+
+ + \ No newline at end of file diff --git a/config/alfresco/version.properties b/config/alfresco/version.properties index 31914a944c..cae3dcda32 100644 --- a/config/alfresco/version.properties +++ b/config/alfresco/version.properties @@ -19,4 +19,4 @@ version.build=@build-number@ # Schema number -version.schema=5023 +version.schema=5024 diff --git a/source/java/org/alfresco/repo/admin/patch/impl/AddDutchEmailTemplatesPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/AddDutchEmailTemplatesPatch.java new file mode 100644 index 0000000000..c10a49d293 --- /dev/null +++ b/source/java/org/alfresco/repo/admin/patch/impl/AddDutchEmailTemplatesPatch.java @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.repo.admin.patch.impl; + +import java.util.List; + +import org.alfresco.error.AlfrescoRuntimeException; +import org.alfresco.repo.model.Repository; +import org.alfresco.service.cmr.repository.NodeRef; +import org.springframework.extensions.surf.util.I18NUtil; + +/** + * Update workflow notification templates patch + * + * @author Roy Wetherall + */ +public class AddDutchEmailTemplatesPatch extends GenericEMailTemplateUpdatePatch +{ + private static final String[] LOCALES = new String[] {"nl"}; + private static final String[] PATHS = new String[] + { + "alfresco/templates/activities-email-templates/", + "alfresco/bootstrap/notification/", + "alfresco/templates/notify_email_templates/", + "alfresco/templates/new-user-templates/", + "alfresco/templates/invite-email-templates/", + "alfresco/templates/following-email-templates/" + }; + private static final String[] BASE_FILES = new String[] + { + "activities-email.ftl", + "wf-email.html.ftl", + "notify.htm", + "new-user-email.html", + "invite-email.html.ftl", + "following-email.html.ftl" + }; + private static final String[] XPATHS = new String[] + { + "/app:company_home/app:dictionary/app:email_templates/cm:activities/cm:activities-email.ftl", + "/app:company_home/app:dictionary/app:email_templates/cm:workflownotification/cm:invite-email.html.ftl", + "/app:company_home/app:dictionary/app:email_templates/app:notify_email_templates/cm:notify_user_email.html.ftl", + "/app:company_home/app:dictionary/app:email_templates/cm:invite/cm:new-user-email.html.ftl", + "/app:company_home/app:dictionary/app:email_templates/cm:invite/cm:invite-email.html.ftl", + "/app:company_home/app:dictionary/app:email_templates/app:following/cm:following-email.html.ftl" + }; + + private int currentIndex = 0; + + private Repository repository; + + public void setRepository(Repository repository) + { + this.repository = repository; + } + + @Override + protected String getPath() + { + return PATHS[currentIndex]; + } + + @Override + protected String getBaseFileName() + { + return BASE_FILES[currentIndex]; + } + + @Override + protected String[] getLocales() + { + return LOCALES; + } + + @Override + protected NodeRef getBaseTemplate() + { + List refs = searchService.selectNodes( + repository.getRootHome(), + XPATHS[currentIndex], + null, + namespaceService, + false); + if (refs.size() != 1) + { + throw new AlfrescoRuntimeException(I18NUtil.getMessage("patch.addDutchEmailTemplatesPatch.error")); + } + return refs.get(0); + } + + /** + * @see org.alfresco.repo.admin.patch.AbstractPatch#applyInternal() + */ + @Override + protected String applyInternal() throws Exception + { + while (currentIndex < BASE_FILES.length) + { + updateTemplates(); + currentIndex ++; + } + + return I18NUtil.getMessage("patch.addDutchEmailTemplatesPatch.result"); + } +} diff --git a/source/java/org/alfresco/repo/admin/patch/impl/GenericEMailTemplateUpdatePatch.java b/source/java/org/alfresco/repo/admin/patch/impl/GenericEMailTemplateUpdatePatch.java index 5e54adfd3a..df1e593137 100644 --- a/source/java/org/alfresco/repo/admin/patch/impl/GenericEMailTemplateUpdatePatch.java +++ b/source/java/org/alfresco/repo/admin/patch/impl/GenericEMailTemplateUpdatePatch.java @@ -24,45 +24,76 @@ import java.util.List; import org.alfresco.model.ContentModel; import org.alfresco.repo.admin.patch.AbstractPatch; +import org.alfresco.repo.content.MimetypeMap; import org.alfresco.service.cmr.model.FileFolderService; import org.alfresco.service.cmr.repository.ContentService; import org.alfresco.service.cmr.repository.ContentWriter; import org.alfresco.service.cmr.repository.NodeRef; /** + * Helper generic patch useful when updating email templates. + * * @author Roy Wetherall */ public abstract class GenericEMailTemplateUpdatePatch extends AbstractPatch { - protected static final String[] LOCALES = new String[] {"de", "es", "fr", "it", "ja"}; - - protected ContentService contentService; + /** Content service */ + protected ContentService contentService; + /** File folder service */ protected FileFolderService fileFolderService; + /** Indicates whether to update the base file or not */ + private boolean updateBaseFile = true; + + /** Indicates whether to create a sibling if it's missing (rather than just update) */ private boolean createSiblingIfMissing = true; + /** + * @param contentService content service + */ public void setContentService(ContentService contentService) { this.contentService = contentService; } + /** + * @param fileFolderService file folder service + */ public void setFileFolderService(FileFolderService fileFolderService) { this.fileFolderService = fileFolderService; } + /** + * @param createSiblingIfMissing + */ public void setCreateSiblingIfMissing(boolean createSiblingIfMissing) { this.createSiblingIfMissing = createSiblingIfMissing; } + + /** + * @param updateBaseFile + */ + public void setUpdateBaseFile(boolean updateBaseFile) + { + this.updateBaseFile = updateBaseFile; + } + /** + * + * @throws Exception + */ protected void updateTemplates() throws Exception { NodeRef baseTemplate = getBaseTemplate(); if (nodeService.exists(baseTemplate) == true) { - updateContent(baseTemplate, getPath(), getBaseFileName()); + if (updateBaseFile == true) + { + updateContent(baseTemplate, getPath(), getBaseFileName(), false); + } for (String siblingFile : getSiblingFiles()) { @@ -77,15 +108,12 @@ public abstract class GenericEMailTemplateUpdatePatch extends AbstractPatch protected abstract String getBaseFileName(); - protected String[] getLocales() - { - return LOCALES; - } + protected abstract String[] getLocales(); protected List getSiblingFiles() { - List siblingFiles = new ArrayList(LOCALES.length); - for (String locale : LOCALES) + List siblingFiles = new ArrayList(getLocales().length); + for (String locale : getLocales()) { siblingFiles.add(makeSiblingFileName(getBaseFileName(), locale)); } @@ -111,17 +139,17 @@ public abstract class GenericEMailTemplateUpdatePatch extends AbstractPatch NodeRef sibling = fileFolderService.searchSimple(parent, fileName); if (sibling != null) { - updateContent(sibling, path, fileName); + updateContent(sibling, path, fileName, false); } else if (createSiblingIfMissing == true) { sibling = fileFolderService.create(parent, fileName, ContentModel.TYPE_CONTENT).getNodeRef(); - updateContent(sibling, path, fileName); + updateContent(sibling, path, fileName, true); } } } - private void updateContent(NodeRef nodeRef, String path, String fileName) + private void updateContent(NodeRef nodeRef, String path, String fileName, boolean newFile) { // Make versionable nodeService.addAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE, null); @@ -131,6 +159,11 @@ public abstract class GenericEMailTemplateUpdatePatch extends AbstractPatch if (is != null) { ContentWriter contentWriter = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true); + if (newFile == true) + { + contentWriter.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN); + contentWriter.setEncoding("UTF-8"); + } contentWriter.putContent(is); } } diff --git a/source/java/org/alfresco/repo/admin/patch/impl/UpdateFollowingEmailTemplatesPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/UpdateFollowingEmailTemplatesPatch.java index c6ac0166ec..e47e6614dd 100644 --- a/source/java/org/alfresco/repo/admin/patch/impl/UpdateFollowingEmailTemplatesPatch.java +++ b/source/java/org/alfresco/repo/admin/patch/impl/UpdateFollowingEmailTemplatesPatch.java @@ -34,6 +34,8 @@ public class UpdateFollowingEmailTemplatesPatch extends GenericEMailTemplateUpda { private Repository repository; + protected static final String[] LOCALES = new String[] {"de", "es", "fr", "it", "ja"}; + private static final String PATH = "alfresco/templates/following-email-templates/"; private static final String BASE_FILE = "following-email.html.ftl"; private static final String XPATH = "/app:company_home/app:dictionary/app:email_templates/app:following/cm:following-email.html.ftl"; @@ -55,6 +57,12 @@ public class UpdateFollowingEmailTemplatesPatch extends GenericEMailTemplateUpda return BASE_FILE; } + @Override + protected String[] getLocales() + { + return LOCALES; + } + @Override protected NodeRef getBaseTemplate() { diff --git a/source/java/org/alfresco/repo/admin/patch/impl/UpdateWorkflowNotificationTemplatesPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/UpdateWorkflowNotificationTemplatesPatch.java index d0a4a42e62..afef4fe681 100644 --- a/source/java/org/alfresco/repo/admin/patch/impl/UpdateWorkflowNotificationTemplatesPatch.java +++ b/source/java/org/alfresco/repo/admin/patch/impl/UpdateWorkflowNotificationTemplatesPatch.java @@ -29,6 +29,7 @@ import org.springframework.extensions.surf.util.I18NUtil; */ public class UpdateWorkflowNotificationTemplatesPatch extends GenericEMailTemplateUpdatePatch { + private static final String[] LOCALES = new String[] {"de", "es", "fr", "it", "ja"}; private static final String PATH = "alfresco/bootstrap/notification/"; private static final String BASE_FILE = "wf-email.html.ftl"; @@ -44,6 +45,12 @@ public class UpdateWorkflowNotificationTemplatesPatch extends GenericEMailTempla return BASE_FILE; } + @Override + protected String[] getLocales() + { + return LOCALES; + } + @Override protected NodeRef getBaseTemplate() {