From 1256638ec0bbdce4bb57141abdf23577b40b7cb0 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sun, 12 Apr 2020 18:20:52 +0100 Subject: [PATCH] Add base infrastructure for switch to using GOV.UK Notify --- config/locales/notify.cy-GB.yml | 35 ++++++++++ config/locales/notify.en-GB.yml | 35 ++++++++++ features/support/custom_env.rb | 1 + features/support/hooks.rb | 4 ++ lib/notify_mock.rb | 67 +++++++++++++++++++ lib/tasks/notify.rake | 29 ++++++++ .../085e81e4-5ced-4cfe-b142-a03f8b5ffb08.yml | 39 +++++++++++ .../0a9de360-8eab-4e81-946b-7fe2146b6b1e.yml | 45 +++++++++++++ .../0e81b36b-9e52-445c-8984-0ee9d89399fe.yml | 39 +++++++++++ .../0e9af1c3-17b2-4af6-9440-5fce1f5eb7bb.yml | 49 ++++++++++++++ .../0f912b39-37e2-4de0-886a-28c3e529d139.yml | 33 +++++++++ .../1a52a93e-808a-4ce4-9b24-2d165aaaef4b.yml | 65 ++++++++++++++++++ .../262dc874-cba2-4aef-888d-b6fcd23401a8.yml | 55 +++++++++++++++ .../29b774ac-7852-4657-9b7d-c0395e7f890c.yml | 31 +++++++++ .../2d864e9a-275b-41ea-90c9-92b93da8c48a.yml | 51 ++++++++++++++ .../32eabf04-06e7-4e80-9be4-f425321419c1.yml | 31 +++++++++ .../3e283d4a-7b74-4a96-8431-857e3b3bfc89.yml | 39 +++++++++++ .../41021e4a-70d7-43ec-b98e-14ca5e8e0835.yml | 39 +++++++++++ .../4254e36c-b0bc-48ad-9a8c-62d59d16d0ce.yml | 47 +++++++++++++ .../46f90a8f-eb76-4ed7-b24f-c657560c5c41.yml | 31 +++++++++ .../4bda6753-3639-4bad-94a2-b1b1596222b9.yml | 47 +++++++++++++ .../50d84545-2438-478d-9838-d61fc2467efd.yml | 35 ++++++++++ .../5920b765-6921-4537-9e01-d8b1338b1071.yml | 65 ++++++++++++++++++ .../59dad299-5c03-48b9-be2b-37b90a7701fe.yml | 49 ++++++++++++++ .../5aa3434b-0530-4655-a2d2-318fd3668568.yml | 33 +++++++++ .../5b75b985-fc6e-4473-8b51-0958818bea63.yml | 33 +++++++++ .../61cd5971-7bc7-4a1e-b30b-d799a36bff5c.yml | 47 +++++++++++++ .../68009505-3bc4-49b6-b1b5-c3f36967f9b4.yml | 18 +++++ .../69e7f6e1-da4c-4b1e-95d5-e687a62c2cc7.yml | 39 +++++++++++ .../6c9730a2-e31d-4c15-9c05-e96ef5cb8ff4.yml | 65 ++++++++++++++++++ .../6fbe2afa-0ee5-4dec-adab-1a7518cbee33.yml | 35 ++++++++++ .../71d0736e-ff45-43d5-b083-c78f04d2b02c.yml | 55 +++++++++++++++ .../7e098470-4a73-435c-bd8c-9f0d9d9ba010.yml | 65 ++++++++++++++++++ .../824662f6-2cb1-4da8-b65d-6b071c569d0e.yml | 39 +++++++++++ .../865e3a66-6b98-406d-8883-04dd7d35a580.yml | 39 +++++++++++ .../86b5dee8-ca22-45be-af00-d74d601e656d.yml | 33 +++++++++ .../8766cdb6-19cb-4eab-a2ba-1af7643f66ee.yml | 35 ++++++++++ .../8d63e92e-1591-420d-a8ec-1df6ecf6a34c.yml | 23 +++++++ .../929f4523-ee7d-4895-a9e5-32f9fff0c41a.yml | 47 +++++++++++++ .../939413df-ec0d-4898-acb2-46a63ea3d42f.yml | 39 +++++++++++ .../9bcdcefd-60a3-4698-85c7-5b4246745b43.yml | 45 +++++++++++++ .../a33e91d1-808a-4a85-abcc-8a4c62266789.yml | 25 +++++++ .../a8557cbf-a889-4392-88a1-988634169d69.yml | 31 +++++++++ .../b0bbd8f3-ad81-4095-a01d-68d979775418.yml | 35 ++++++++++ .../c93ca86b-b508-417c-a4b5-28ec33047b2e.yml | 65 ++++++++++++++++++ .../cf28ed24-3710-4843-bc35-0ec157adb9ca.yml | 39 +++++++++++ .../d97d154f-cdb8-4273-b6cb-d5f89479efba.yml | 39 +++++++++++ .../dc337901-65b0-4e76-b1d5-b14b90e7ee3e.yml | 51 ++++++++++++++ .../de60bc30-2d7b-4a71-851f-0ac357af048f.yml | 25 +++++++ .../e4beb5af-0db1-406b-9c03-a8c8b65f27fd.yml | 23 +++++++ .../ed21ff1d-b718-4cef-9491-451f443f9a1d.yml | 65 ++++++++++++++++++ .../f10ca6dd-4f07-479c-a588-a3abbafe2c55.yml | 33 +++++++++ .../f6ea7df0-9cb1-4895-941a-183ddd0e79db.yml | 35 ++++++++++ .../f7965a34-6f8e-4aa3-97fe-51e8f465d264.yml | 65 ++++++++++++++++++ .../fb8c5cee-8fb1-46f3-8818-58f3c4311c2b.yml | 65 ++++++++++++++++++ .../fdc05cf0-81d1-4a28-933c-65b8e10666dd.yml | 33 +++++++++ .../fffa81d1-0625-44a1-af7b-780dd27a7719.yml | 35 ++++++++++ spec/support/notify.rb | 9 +++ 58 files changed, 2324 insertions(+) create mode 100644 config/locales/notify.cy-GB.yml create mode 100644 config/locales/notify.en-GB.yml create mode 100644 lib/notify_mock.rb create mode 100644 lib/tasks/notify.rake create mode 100644 spec/fixtures/notify/085e81e4-5ced-4cfe-b142-a03f8b5ffb08.yml create mode 100644 spec/fixtures/notify/0a9de360-8eab-4e81-946b-7fe2146b6b1e.yml create mode 100644 spec/fixtures/notify/0e81b36b-9e52-445c-8984-0ee9d89399fe.yml create mode 100644 spec/fixtures/notify/0e9af1c3-17b2-4af6-9440-5fce1f5eb7bb.yml create mode 100644 spec/fixtures/notify/0f912b39-37e2-4de0-886a-28c3e529d139.yml create mode 100644 spec/fixtures/notify/1a52a93e-808a-4ce4-9b24-2d165aaaef4b.yml create mode 100644 spec/fixtures/notify/262dc874-cba2-4aef-888d-b6fcd23401a8.yml create mode 100644 spec/fixtures/notify/29b774ac-7852-4657-9b7d-c0395e7f890c.yml create mode 100644 spec/fixtures/notify/2d864e9a-275b-41ea-90c9-92b93da8c48a.yml create mode 100644 spec/fixtures/notify/32eabf04-06e7-4e80-9be4-f425321419c1.yml create mode 100644 spec/fixtures/notify/3e283d4a-7b74-4a96-8431-857e3b3bfc89.yml create mode 100644 spec/fixtures/notify/41021e4a-70d7-43ec-b98e-14ca5e8e0835.yml create mode 100644 spec/fixtures/notify/4254e36c-b0bc-48ad-9a8c-62d59d16d0ce.yml create mode 100644 spec/fixtures/notify/46f90a8f-eb76-4ed7-b24f-c657560c5c41.yml create mode 100644 spec/fixtures/notify/4bda6753-3639-4bad-94a2-b1b1596222b9.yml create mode 100644 spec/fixtures/notify/50d84545-2438-478d-9838-d61fc2467efd.yml create mode 100644 spec/fixtures/notify/5920b765-6921-4537-9e01-d8b1338b1071.yml create mode 100644 spec/fixtures/notify/59dad299-5c03-48b9-be2b-37b90a7701fe.yml create mode 100644 spec/fixtures/notify/5aa3434b-0530-4655-a2d2-318fd3668568.yml create mode 100644 spec/fixtures/notify/5b75b985-fc6e-4473-8b51-0958818bea63.yml create mode 100644 spec/fixtures/notify/61cd5971-7bc7-4a1e-b30b-d799a36bff5c.yml create mode 100644 spec/fixtures/notify/68009505-3bc4-49b6-b1b5-c3f36967f9b4.yml create mode 100644 spec/fixtures/notify/69e7f6e1-da4c-4b1e-95d5-e687a62c2cc7.yml create mode 100644 spec/fixtures/notify/6c9730a2-e31d-4c15-9c05-e96ef5cb8ff4.yml create mode 100644 spec/fixtures/notify/6fbe2afa-0ee5-4dec-adab-1a7518cbee33.yml create mode 100644 spec/fixtures/notify/71d0736e-ff45-43d5-b083-c78f04d2b02c.yml create mode 100644 spec/fixtures/notify/7e098470-4a73-435c-bd8c-9f0d9d9ba010.yml create mode 100644 spec/fixtures/notify/824662f6-2cb1-4da8-b65d-6b071c569d0e.yml create mode 100644 spec/fixtures/notify/865e3a66-6b98-406d-8883-04dd7d35a580.yml create mode 100644 spec/fixtures/notify/86b5dee8-ca22-45be-af00-d74d601e656d.yml create mode 100644 spec/fixtures/notify/8766cdb6-19cb-4eab-a2ba-1af7643f66ee.yml create mode 100644 spec/fixtures/notify/8d63e92e-1591-420d-a8ec-1df6ecf6a34c.yml create mode 100644 spec/fixtures/notify/929f4523-ee7d-4895-a9e5-32f9fff0c41a.yml create mode 100644 spec/fixtures/notify/939413df-ec0d-4898-acb2-46a63ea3d42f.yml create mode 100644 spec/fixtures/notify/9bcdcefd-60a3-4698-85c7-5b4246745b43.yml create mode 100644 spec/fixtures/notify/a33e91d1-808a-4a85-abcc-8a4c62266789.yml create mode 100644 spec/fixtures/notify/a8557cbf-a889-4392-88a1-988634169d69.yml create mode 100644 spec/fixtures/notify/b0bbd8f3-ad81-4095-a01d-68d979775418.yml create mode 100644 spec/fixtures/notify/c93ca86b-b508-417c-a4b5-28ec33047b2e.yml create mode 100644 spec/fixtures/notify/cf28ed24-3710-4843-bc35-0ec157adb9ca.yml create mode 100644 spec/fixtures/notify/d97d154f-cdb8-4273-b6cb-d5f89479efba.yml create mode 100644 spec/fixtures/notify/dc337901-65b0-4e76-b1d5-b14b90e7ee3e.yml create mode 100644 spec/fixtures/notify/de60bc30-2d7b-4a71-851f-0ac357af048f.yml create mode 100644 spec/fixtures/notify/e4beb5af-0db1-406b-9c03-a8c8b65f27fd.yml create mode 100644 spec/fixtures/notify/ed21ff1d-b718-4cef-9491-451f443f9a1d.yml create mode 100644 spec/fixtures/notify/f10ca6dd-4f07-479c-a588-a3abbafe2c55.yml create mode 100644 spec/fixtures/notify/f6ea7df0-9cb1-4895-941a-183ddd0e79db.yml create mode 100644 spec/fixtures/notify/f7965a34-6f8e-4aa3-97fe-51e8f465d264.yml create mode 100644 spec/fixtures/notify/fb8c5cee-8fb1-46f3-8818-58f3c4311c2b.yml create mode 100644 spec/fixtures/notify/fdc05cf0-81d1-4a28-933c-65b8e10666dd.yml create mode 100644 spec/fixtures/notify/fffa81d1-0625-44a1-af7b-780dd27a7719.yml create mode 100644 spec/support/notify.rb diff --git a/config/locales/notify.cy-GB.yml b/config/locales/notify.cy-GB.yml new file mode 100644 index 000000000..06c924b5d --- /dev/null +++ b/config/locales/notify.cy-GB.yml @@ -0,0 +1,35 @@ +cy-GB: + notify: + templates: + email_confirmation_for_signer: "de60bc30-2d7b-4a71-851f-0ac357af048f" + email_creator_about_other_business: "86b5dee8-ca22-45be-af00-d74d601e656d" + email_duplicate_signatures: "8d63e92e-1591-420d-a8ec-1df6ecf6a34c" + email_signer_about_other_business: "5aa3434b-0530-4655-a2d2-318fd3668568" + gather_sponsors_for_petition_christmas: "6c9730a2-e31d-4c15-9c05-e96ef5cb8ff4" + gather_sponsors_for_petition_easter: "5920b765-6921-4537-9e01-d8b1338b1071" + gather_sponsors_for_petition_moderation_delay: "fb8c5cee-8fb1-46f3-8818-58f3c4311c2b" + gather_sponsors_for_petition: "1a52a93e-808a-4ce4-9b24-2d165aaaef4b" + notify_creator_of_debate_scheduled: "0e81b36b-9e52-445c-8984-0ee9d89399fe" + notify_creator_of_negative_debate_outcome: "3e283d4a-7b74-4a96-8431-857e3b3bfc89" + notify_creator_of_positive_debate_outcome: "4bda6753-3639-4bad-94a2-b1b1596222b9" + notify_creator_that_petition_is_published: "2d864e9a-275b-41ea-90c9-92b93da8c48a" + notify_creator_that_petition_was_rejected_hidden: "59dad299-5c03-48b9-be2b-37b90a7701fe" + notify_creator_that_petition_was_rejected: "71d0736e-ff45-43d5-b083-c78f04d2b02c" + notify_signer_of_debate_scheduled: "939413df-ec0d-4898-acb2-46a63ea3d42f" + notify_signer_of_negative_debate_outcome: "d97d154f-cdb8-4273-b6cb-d5f89479efba" + notify_signer_of_positive_debate_outcome: "61cd5971-7bc7-4a1e-b30b-d799a36bff5c" + notify_sponsor_that_petition_is_published: "46f90a8f-eb76-4ed7-b24f-c657560c5c41" + notify_sponsor_that_petition_was_rejected_hidden: "cf28ed24-3710-4843-bc35-0ec157adb9ca" + notify_sponsor_that_petition_was_rejected: "9bcdcefd-60a3-4698-85c7-5b4246745b43" + petition_and_email_confirmation_for_sponsor: "f10ca6dd-4f07-479c-a588-a3abbafe2c55" + sponsor_signed_email_below_threshold: "29b774ac-7852-4657-9b7d-c0395e7f890c" + sponsor_signed_email_on_threshold_christmas: "50d84545-2438-478d-9838-d61fc2467efd" + sponsor_signed_email_on_threshold_easter: "fffa81d1-0625-44a1-af7b-780dd27a7719" + sponsor_signed_email_on_threshold: "8766cdb6-19cb-4eab-a2ba-1af7643f66ee" + + strings: + sponsor_count: + zero: "Mae gennych chi 0 gefnogwr hyd yn hyn" + one: "Mae gennych chi 1 cefnogwr hyd yn hyn" + two: "Mae gennych chi 2 gefnogwr hyd yn hyn" + other: "Mae gennych chi %{count} chefnogwr hyd yn hyn" diff --git a/config/locales/notify.en-GB.yml b/config/locales/notify.en-GB.yml new file mode 100644 index 000000000..213f7f979 --- /dev/null +++ b/config/locales/notify.en-GB.yml @@ -0,0 +1,35 @@ +en-GB: + notify: + templates: + email_confirmation_for_signer: "a33e91d1-808a-4a85-abcc-8a4c62266789" + email_creator_about_other_business: "5b75b985-fc6e-4473-8b51-0958818bea63" + email_duplicate_signatures: "e4beb5af-0db1-406b-9c03-a8c8b65f27fd" + email_signer_about_other_business: "fdc05cf0-81d1-4a28-933c-65b8e10666dd" + gather_sponsors_for_petition_christmas: "f7965a34-6f8e-4aa3-97fe-51e8f465d264" + gather_sponsors_for_petition_easter: "ed21ff1d-b718-4cef-9491-451f443f9a1d" + gather_sponsors_for_petition_moderation_delay: "c93ca86b-b508-417c-a4b5-28ec33047b2e" + gather_sponsors_for_petition: "7e098470-4a73-435c-bd8c-9f0d9d9ba010" + notify_creator_of_debate_scheduled: "085e81e4-5ced-4cfe-b142-a03f8b5ffb08" + notify_creator_of_negative_debate_outcome: "41021e4a-70d7-43ec-b98e-14ca5e8e0835" + notify_creator_of_positive_debate_outcome: "929f4523-ee7d-4895-a9e5-32f9fff0c41a" + notify_creator_that_petition_is_published: "dc337901-65b0-4e76-b1d5-b14b90e7ee3e" + notify_creator_that_petition_was_rejected_hidden: "0e9af1c3-17b2-4af6-9440-5fce1f5eb7bb" + notify_creator_that_petition_was_rejected: "262dc874-cba2-4aef-888d-b6fcd23401a8" + notify_signer_of_debate_scheduled: "824662f6-2cb1-4da8-b65d-6b071c569d0e" + notify_signer_of_negative_debate_outcome: "865e3a66-6b98-406d-8883-04dd7d35a580" + notify_signer_of_positive_debate_outcome: "4254e36c-b0bc-48ad-9a8c-62d59d16d0ce" + notify_sponsor_that_petition_is_published: "a8557cbf-a889-4392-88a1-988634169d69" + notify_sponsor_that_petition_was_rejected_hidden: "69e7f6e1-da4c-4b1e-95d5-e687a62c2cc7" + notify_sponsor_that_petition_was_rejected: "0a9de360-8eab-4e81-946b-7fe2146b6b1e" + petition_and_email_confirmation_for_sponsor: "0f912b39-37e2-4de0-886a-28c3e529d139" + sponsor_signed_email_below_threshold: "32eabf04-06e7-4e80-9be4-f425321419c1" + sponsor_signed_email_on_threshold_christmas: "f6ea7df0-9cb1-4895-941a-183ddd0e79db" + sponsor_signed_email_on_threshold_easter: "6fbe2afa-0ee5-4dec-adab-1a7518cbee33" + sponsor_signed_email_on_threshold: "b0bbd8f3-ad81-4095-a01d-68d979775418" + + strings: + sponsor_count: + zero: "You have 0 supporters so far" + one: "You have 1 supporter so far" + two: "You have 2 supporters so far" + other: "You have %{count} supporters so far" diff --git a/features/support/custom_env.rb b/features/support/custom_env.rb index 5ac8b16cf..420ffe0f3 100644 --- a/features/support/custom_env.rb +++ b/features/support/custom_env.rb @@ -3,6 +3,7 @@ require 'rspec/mocks' require 'multi_test' require 'faker' +require 'notify_mock' MultiTest.disable_autorun diff --git a/features/support/hooks.rb b/features/support/hooks.rb index 6b25fab2a..793e8d69f 100644 --- a/features/support/hooks.rb +++ b/features/support/hooks.rb @@ -16,6 +16,10 @@ ) end +Before do + stub_request(:post, NotifyMock.url).to_rack(NotifyMock.app) +end + Before do ::RSpec::Mocks.setup end diff --git a/lib/notify_mock.rb b/lib/notify_mock.rb new file mode 100644 index 000000000..c494ac762 --- /dev/null +++ b/lib/notify_mock.rb @@ -0,0 +1,67 @@ +module NotifyMock + URL = "https://api.notifications.service.gov.uk/v2/notifications/email" + + APPLICATION = Module.new do + class << self + include MarkdownHelper + + def call(env) + params = JSON.parse(env["rack.input"].read) + template = templates.fetch(params["template_id"]) + + message = Mail::Message.new + subject = template["subject"].dup + body = template["body"].dup + + params["personalisation"].each do |key, value| + subject.gsub!("((#{key}))", value.to_s) + body.gsub!("((#{key}))", value.to_s) + end + + text_part = markdown_to_text(body) + html_part = markdown_to_html(body) + + message.message_id = "#{SecureRandom.uuid}@#{Site.host}" + message.from = Site.email_from + message.to = params["email_address"] + message.subject = subject + message.text_part = text_part + message.html_part = html_part + + ActionMailer::Base.deliveries << message + + [ 200, { "Content-Type" => "application/json" }, ["{}"] ] + end + + private + + def templates + @templates ||= load_templates + end + + def load_templates + template_files.each_with_object({}) do |file, hash| + hash[File.basename(file, ".yml")] = YAML.load_file(file) + end + end + + def template_files + Dir["#{template_dir}/*.yml"] + end + + def template_dir + Rails.root.join("spec", "fixtures", "notify") + end + end + end + + class << self + def url + URL + end + + def app + APPLICATION + end + end +end diff --git a/lib/tasks/notify.rake b/lib/tasks/notify.rake new file mode 100644 index 000000000..7028324c5 --- /dev/null +++ b/lib/tasks/notify.rake @@ -0,0 +1,29 @@ +require "notifications/client" +require "fileutils" + +namespace :notify do + task fetch_templates: :environment do + template_dir = Rails.root.join("spec", "fixtures", "notify") + client = Notifications::Client.new(ENV.fetch("NOTIFY_API_KEY")) + templates = client.get_all_templates(type: "email") + + FileUtils.rm_rf template_dir + FileUtils.mkdir_p template_dir + + templates.collection.each do |template| + template_path = template_dir.join("#{template.id}.yml") + + yaml = <<~YAML + id: "#{template.id}" + name: "#{template.name}" + subject: "#{template.subject}" + body: |- + #{template.body.split("\r\n").map { |l| " #{l}" }.join("\n")} + YAML + + File.write(template_path, yaml) + end + rescue Notifications::Client::RequestError => e + puts e.message + end +end diff --git a/spec/fixtures/notify/085e81e4-5ced-4cfe-b142-a03f8b5ffb08.yml b/spec/fixtures/notify/085e81e4-5ced-4cfe-b142-a03f8b5ffb08.yml new file mode 100644 index 000000000..996aa3eae --- /dev/null +++ b/spec/fixtures/notify/085e81e4-5ced-4cfe-b142-a03f8b5ffb08.yml @@ -0,0 +1,39 @@ +id: "085e81e4-5ced-4cfe-b142-a03f8b5ffb08" +name: "notify_creator_of_debate_scheduled_en" +subject: "Senedd will debate “((action_en))” | Bydd y Senedd yn trafod “((action_cy))”" +body: |- + Dear ((name)), + + Senedd is going to debate your petition – “((action_en))”. + + ((petition_url_en)) + + The debate is scheduled for ((debate_date_en)). + + Once the debate has happened, we’ll email you a video and transcript. + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you created this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) + + --- + + Annwyl ((name)), + + Mae'r Senedd yn mynd i drafod eich deiseb - “((action_cy))”. + + ((petition_url_cy)) + + Mae'r ddadl wedi'i hamserlennu ar gyfer ((debate_date_cy)). + + Ar ôl i'r ddadl ddigwydd, byddwn yn e-bostio fideo a thrawsgrifiad atoch. + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi greu'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) diff --git a/spec/fixtures/notify/0a9de360-8eab-4e81-946b-7fe2146b6b1e.yml b/spec/fixtures/notify/0a9de360-8eab-4e81-946b-7fe2146b6b1e.yml new file mode 100644 index 000000000..a3ee40b2f --- /dev/null +++ b/spec/fixtures/notify/0a9de360-8eab-4e81-946b-7fe2146b6b1e.yml @@ -0,0 +1,45 @@ +id: "0a9de360-8eab-4e81-946b-7fe2146b6b1e" +name: "notify_sponsor_that_petition_was_rejected_en" +subject: "We rejected the petition “((action))” that you supported | Gwrthodwyd y ddeiseb “((action))” y gwnaethoch chi ei chefnogi" +body: |- + Dear ((sponsor)), + + Thank you for supporting a petition. + + Before we can publish a petition on our website and it can begin to collect signatures, we need to ensure that it meets the petition rules. + + Unfortunately, we are not able to accept the proposed petition “((action))”. + + ((content_en)) + + Click this link to see the rejected petition: + ((url_en)) + + We only reject petitions that don’t meet the petition standards: + ((standards_url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((sponsor)), + + Diolch am gefnogi deiseb. + + Cyn cyhoeddi deiseb ar ein gwefan a dechrau casglu llofnodion, mae angen i ni sicrhau ei bod yn bodloni’r rheolau ar gyfer deisebau. + + Yn anffodus, ni allwn dderbyn y ddeiseb a gynigiwyd “((action))”. + + ((content_cy)) + + Cliciwch ar y linc i weld y ddeiseb a wrthodwyd: + ((url_cy)) + + Dim ond deisebau nad ydynt yn bodloni'r safonau y byddwn yn eu gwrthod: + ((standards_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/0e81b36b-9e52-445c-8984-0ee9d89399fe.yml b/spec/fixtures/notify/0e81b36b-9e52-445c-8984-0ee9d89399fe.yml new file mode 100644 index 000000000..f3c887baa --- /dev/null +++ b/spec/fixtures/notify/0e81b36b-9e52-445c-8984-0ee9d89399fe.yml @@ -0,0 +1,39 @@ +id: "0e81b36b-9e52-445c-8984-0ee9d89399fe" +name: "notify_creator_of_debate_scheduled_cy" +subject: "Bydd y Senedd yn trafod “((action_cy))” | Senedd will debate “((action_en))”" +body: |- + Annwyl ((name)), + + Mae'r Senedd yn mynd i drafod eich deiseb - “((action_cy))”. + + ((petition_url_cy)) + + Mae'r ddadl wedi'i hamserlennu ar gyfer ((debate_date_cy)). + + Ar ôl i'r ddadl ddigwydd, byddwn yn e-bostio fideo a thrawsgrifiad atoch. + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi greu'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) + + --- + + Dear ((name)), + + Senedd is going to debate your petition – “((action_en))”. + + ((petition_url_en)) + + The debate is scheduled for ((debate_date_en)). + + Once the debate has happened, we’ll email you a video and transcript. + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you created this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) diff --git a/spec/fixtures/notify/0e9af1c3-17b2-4af6-9440-5fce1f5eb7bb.yml b/spec/fixtures/notify/0e9af1c3-17b2-4af6-9440-5fce1f5eb7bb.yml new file mode 100644 index 000000000..309bcab11 --- /dev/null +++ b/spec/fixtures/notify/0e9af1c3-17b2-4af6-9440-5fce1f5eb7bb.yml @@ -0,0 +1,49 @@ +id: "0e9af1c3-17b2-4af6-9440-5fce1f5eb7bb" +name: "notify_creator_that_petition_was_rejected_hidden_en" +subject: "We rejected your petition “((action))” | Gwrthodwyd eich deiseb “((action))”" +body: |- + Dear ((creator)), + + Thank you for submitting a petition to the Senedd. + + Before we can publish a petition on our website and it can begin to collect signatures, we need to ensure that it meets the petition rules. + + Unfortunately, we are not able to accept your proposed petition “((action))”. + + ((content_en)) + + We only reject petitions that don’t meet the petition standards: + ((standards_url_en)) + + If you want to try again, click here to start a petition: + ((new_petition_url_en)) + + We’re sorry that we’re not able to take your petition forward on this occasion. + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((creator)), + + Diolch am gyflwyno deiseb i'r Senedd. + + Cyn cyhoeddi deiseb ar ein gwefan a dechrau casglu llofnodion, mae angen i ni sicrhau ei bod yn bodloni’r rheolau ar gyfer deisebau. + + Yn anffodus, ni allwn dderbyn y ddeiseb a gynigiwyd gennych “((action))”. + + ((content_cy)) + + Dim ond deisebau nad ydynt yn bodloni'r safonau y byddwn yn eu gwrthod: + ((standards_url_cy)) + + Os hoffech roi cynnig arall arni, cliciwch yma i ddechrau deiseb: + ((new_petition_url_cy)) + + Mae'n ddrwg gennym na allwn fwrw ymlaen â'ch deiseb y tro hwn. + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/0f912b39-37e2-4de0-886a-28c3e529d139.yml b/spec/fixtures/notify/0f912b39-37e2-4de0-886a-28c3e529d139.yml new file mode 100644 index 000000000..2890724a3 --- /dev/null +++ b/spec/fixtures/notify/0f912b39-37e2-4de0-886a-28c3e529d139.yml @@ -0,0 +1,33 @@ +id: "0f912b39-37e2-4de0-886a-28c3e529d139" +name: "petition_and_email_confirmation_for_sponsor_en" +subject: "Please confirm your email address | Cadarnhewch eich cyfeiriad e-bost" +body: |- + Click this link to sign the petition: + ((url_en)) + + ((creator))’s petition: + + # ((action)) + + ((content)) + + + Thanks, + The Petitions team + Senedd + + --- + + Cliciwch ar y linc i lofnodi’r ddeiseb: + ((url_cy)) + + Deiseb ((creator)) + + # ((action)) + + ((content)) + + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/1a52a93e-808a-4ce4-9b24-2d165aaaef4b.yml b/spec/fixtures/notify/1a52a93e-808a-4ce4-9b24-2d165aaaef4b.yml new file mode 100644 index 000000000..6ad7a6d3e --- /dev/null +++ b/spec/fixtures/notify/1a52a93e-808a-4ce4-9b24-2d165aaaef4b.yml @@ -0,0 +1,65 @@ +id: "1a52a93e-808a-4ce4-9b24-2d165aaaef4b" +name: "gather_sponsors_for_petition_cy" +subject: "Cam i'w gymryd: Deiseb “((action))” | Action required: Petition “((action))”" +body: |- + Annwyl ((creator)), + + Dydych chi ddim wedi gorffen eto! + + Anfonwch y neges e-bost isod ymlaen at eich darpar gefnogwyr. + + Mae angen I ((moderation_threshold)) berson glicio ar y linc a chadarnhau eu cefnogaeth er mwyn i ni gyhoeddi eich deiseb. + + Ar ôl i chi sicrhau’r nifer ofynnol o gefnogwyr, byddwn ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos. + + Diolch,
 + Tîm Deisebau + Y Senedd
 + + --- + + Rydw i wedi creu deiseb – a wnewch chi ei llofnodi? + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + Fy neiseb I: + + # ((action)) + + ((content)) + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + --- + + Dear ((creator)), + + You’re not done yet! + + Forward the email below to your potential supporters. + + ((moderation_threshold)) people need to click the link and confirm their support for us to publish your petition. + + Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less. + + Thanks,
 + The Petitions team + Senedd + + --- + + I’ve made a petition – will you sign it? + + Click this link to sign the petition:
 + ((url_en)) + + My petition: + + # ((action)) + + ((content)) + + Click this link to sign the petition: + ((url_en)) diff --git a/spec/fixtures/notify/262dc874-cba2-4aef-888d-b6fcd23401a8.yml b/spec/fixtures/notify/262dc874-cba2-4aef-888d-b6fcd23401a8.yml new file mode 100644 index 000000000..a240a6306 --- /dev/null +++ b/spec/fixtures/notify/262dc874-cba2-4aef-888d-b6fcd23401a8.yml @@ -0,0 +1,55 @@ +id: "262dc874-cba2-4aef-888d-b6fcd23401a8" +name: "notify_creator_that_petition_was_rejected_en" +subject: "We rejected your petition “((action))” | Gwrthodwyd eich deiseb “((action))”" +body: |- + Dear ((creator)), + + Thank you for submitting a petition to the Senedd. + + Before we can publish a petition on our website and it can begin to collect signatures, we need to ensure that it meets the petition rules. + + Unfortunately, we are not able to accept your proposed petition “((action))”. + + ((content_en)) + + Click this link to see your rejected petition: + ((url_en)) + + We only reject petitions that don’t meet the petition standards: + ((standards_url_en)) + + If you want to try again, click here to start a petition: + ((new_petition_url_en)) + + We’re sorry that we’re not able to take your petition forward on this occasion. + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((creator)), + + Diolch am gyflwyno deiseb i'r Senedd. + + Cyn cyhoeddi deiseb ar ein gwefan a dechrau casglu llofnodion, mae angen i ni sicrhau ei bod yn bodloni’r rheolau ar gyfer deisebau. + + Yn anffodus, ni allwn dderbyn y ddeiseb a gynigiwyd gennych “((action))”. + + ((content_cy)) + + Cliciwch ar y linc i weld y ddeiseb a wrthodwyd: + ((url_cy)) + + Dim ond deisebau nad ydynt yn bodloni'r safonau y byddwn yn eu gwrthod: + ((standards_url_cy)) + + Os hoffech roi cynnig arall arni, cliciwch yma i ddechrau deiseb: + ((new_petition_url_cy)) + + Mae'n ddrwg gennym na allwn fwrw ymlaen â'ch deiseb y tro hwn. + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/29b774ac-7852-4657-9b7d-c0395e7f890c.yml b/spec/fixtures/notify/29b774ac-7852-4657-9b7d-c0395e7f890c.yml new file mode 100644 index 000000000..d03df107b --- /dev/null +++ b/spec/fixtures/notify/29b774ac-7852-4657-9b7d-c0395e7f890c.yml @@ -0,0 +1,31 @@ +id: "29b774ac-7852-4657-9b7d-c0395e7f890c" +name: "sponsor_signed_email_below_threshold_cy" +subject: "Cefnogodd ((sponsor)) eich deiseb | ((sponsor)) supported your petition" +body: |- + Annwyl ((creator)), + + Cefnogodd ((sponsor)) eich deiseb - “((action))”. + + ((sponsor_count_cy)). Os bydd ((moderation_threshold)) berson yn cefnogi eich deiseb, byddwn ni’n ei gwirio i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. + + Dyma wybodaeth am sut rydym ni'n gwirio deisebau cyn eu cyhoeddi: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((creator)), + + ((sponsor)) supported your petition – “((action))”. + + ((sponsor_count_en)). If ((moderation_threshold)) people support your petition, we’ll check it to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. + + Find out how we check petitions before we publish them: + ((url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/2d864e9a-275b-41ea-90c9-92b93da8c48a.yml b/spec/fixtures/notify/2d864e9a-275b-41ea-90c9-92b93da8c48a.yml new file mode 100644 index 000000000..19273355f --- /dev/null +++ b/spec/fixtures/notify/2d864e9a-275b-41ea-90c9-92b93da8c48a.yml @@ -0,0 +1,51 @@ +id: "2d864e9a-275b-41ea-90c9-92b93da8c48a" +name: "notify_creator_that_petition_is_published_cy" +subject: "Cyhoeddwyd eich deiseb “((action_cy))” | We published your petition “((action_en))”" +body: |- + Annwyl ((creator)), + + Mae eich deiseb “((action_cy))” bellach wedi'i chyhoeddi ac yn barod i gasglu llofnodion. + + Cliciwch ar y linc i weld eich deiseb a dechrau ei rhannu: + ((url_cy)) + + Mae angen o leiaf ((referral_threshold)) llofnod ar ddeiseb er mwyn i'r Pwyllgor Deisebau ei hystyried. Ni fydd hyn yn digwydd tan ar ôl i'r ddeiseb orffen casglu llofnodion. Rhowch wybod i ni os hoffech newid dyddiad cau eich deiseb. + + Os bydd eich deiseb yn casglu mwy na ((debate_threshold)) llofnod, bydd y Pwyllgor yn ystyried ei chyfeirio ar gyfer dadl yn y Senedd. Wrth wneud hynny, bydd y Pwyllgor yn ystyried nifer o ffactorau gan gynnwys pwnc y ddeiseb a chanran y llofnodion a gasglwyd yng Nghymru. + + Os hoffech gasglu llofnodion ar bapur hefyd, gallwn ddarparu templed ar gais. + + Os bydd eich deiseb yn casglu ((referral_threshold)) llofnod gallwch drefnu dod i'r Senedd i gyflwyno'ch deiseb yn ffurfiol i'r Pwyllgor. Bydd hwn yn gyfle anffurfiol i drafod eich deiseb gyda’r Cadeirydd ac aelodau eraill y Pwyllgor. Mae'n gwbl ddewisol. + + Caiff deisebau eu cyflwyno am 12.30 ar ddydd Mawrth a dydd Mercher yn ystod tymor y Senedd ac mae’r broses yn para tua 10-15 munud. Mae pobl yn manteisio ar y cyfleoedd hyn yn gyflym fel arfer, felly cysylltwch â ni cyn gynted â phosibl os hoffech drefnu i gyflwyno deiseb. + + Yn olaf, mae croeso i chi gysylltu â ni os bydd angen rhagor o wybodaeth arnoch yn y cyfamser. + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((creator)), + + Your petition “((action_en))” is now published and ready to collect signatures. + + Click this link to see your petition and start sharing it: + ((url_en)) + + Petitions need to collect ((referral_threshold)) signatures in order to be considered by the Petitions Committee. This does not happen until after the petition has finished collecting signatures. Please let us know if you would like to change the closing date of your petition. + + If your petition collects more that ((debate_threshold)) signatures, the Committee will consider referring it for a debate in the Senedd. In doing so, the Committee will consider a range of factors including the subject-matter of the petition and the percentage of signatures gathered from within Wales. + + Should you also wish to collect signatures on paper, we can provide a template on request. + + If your petition collects ((referral_threshold)) signatures you can arrange to come to the Senedd to formally hand in your petition to the Committee. This is an informal opportunity to speak to the Chair and other Members of the Committee about your petition. It is entirely optional. + + Handovers take place at 12.30pm on Tuesdays and Wednesdays when the Senedd is sitting and last approximately 10 – 15 minutes. These opportunities are often taken up quickly, so please contact us at your earliest convenience if you would like to arrange one. + + Finally, should you require any further information in the meantime, please do not hesitate to contact us. + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/32eabf04-06e7-4e80-9be4-f425321419c1.yml b/spec/fixtures/notify/32eabf04-06e7-4e80-9be4-f425321419c1.yml new file mode 100644 index 000000000..b4c4d0f64 --- /dev/null +++ b/spec/fixtures/notify/32eabf04-06e7-4e80-9be4-f425321419c1.yml @@ -0,0 +1,31 @@ +id: "32eabf04-06e7-4e80-9be4-f425321419c1" +name: "sponsor_signed_email_below_threshold_en" +subject: "((sponsor)) supported your petition | Cefnogodd ((sponsor)) eich deiseb" +body: |- + Dear ((creator)), + + ((sponsor)) supported your petition – “((action))”. + + ((sponsor_count_en)). If ((moderation_threshold)) people support your petition, we’ll check it to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. + + Find out how we check petitions before we publish them: + ((url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((creator)), + + Cefnogodd ((sponsor)) eich deiseb - “((action))”. + + ((sponsor_count_cy)). Os bydd ((moderation_threshold)) berson yn cefnogi eich deiseb, byddwn ni’n ei gwirio i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. + + Dyma wybodaeth am sut rydym ni'n gwirio deisebau cyn eu cyhoeddi: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/3e283d4a-7b74-4a96-8431-857e3b3bfc89.yml b/spec/fixtures/notify/3e283d4a-7b74-4a96-8431-857e3b3bfc89.yml new file mode 100644 index 000000000..6b697b456 --- /dev/null +++ b/spec/fixtures/notify/3e283d4a-7b74-4a96-8431-857e3b3bfc89.yml @@ -0,0 +1,39 @@ +id: "3e283d4a-7b74-4a96-8431-857e3b3bfc89" +name: "notify_creator_of_negative_debate_outcome_cy" +subject: "Ni thrafododd y Senedd “((action_cy))” | Senedd didn’t debate “((action_en))”" +body: |- + Annwyl ((name)), + + Penderfynodd y Pwyllgor Deisebau beidio â thrafod eich deiseb - “((action_cy))” + + ((overview_cy)) + + Y ddeiseb: ((petition_url_cy)) + + Darganfyddwch fwy am y Pwyllgor Deisebau: ((petitions_committee_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi greu'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) + + --- + + Dear ((name)), + + The Petitions Committee decided not to debate your petition – “((action_en))” + + ((overview_en)) + + The petition: ((petition_url_en)) + + Find out more about the Petitions Committee: ((petitions_committee_url_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you created this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) diff --git a/spec/fixtures/notify/41021e4a-70d7-43ec-b98e-14ca5e8e0835.yml b/spec/fixtures/notify/41021e4a-70d7-43ec-b98e-14ca5e8e0835.yml new file mode 100644 index 000000000..64ff6af42 --- /dev/null +++ b/spec/fixtures/notify/41021e4a-70d7-43ec-b98e-14ca5e8e0835.yml @@ -0,0 +1,39 @@ +id: "41021e4a-70d7-43ec-b98e-14ca5e8e0835" +name: "notify_creator_of_negative_debate_outcome_en" +subject: "Senedd didn’t debate “((action_en))” | Ni thrafododd y Senedd “((action_cy))”" +body: |- + Dear ((name)), + + The Petitions Committee decided not to debate your petition – “((action_en))” + + ((overview_en)) + + The petition: ((petition_url_en)) + + Find out more about the Petitions Committee: ((petitions_committee_url_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you created this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) + + --- + + Annwyl ((name)), + + Penderfynodd y Pwyllgor Deisebau beidio â thrafod eich deiseb - “((action_cy))” + + ((overview_cy)) + + Y ddeiseb: ((petition_url_cy)) + + Darganfyddwch fwy am y Pwyllgor Deisebau: ((petitions_committee_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi greu'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) diff --git a/spec/fixtures/notify/4254e36c-b0bc-48ad-9a8c-62d59d16d0ce.yml b/spec/fixtures/notify/4254e36c-b0bc-48ad-9a8c-62d59d16d0ce.yml new file mode 100644 index 000000000..b6cc3d742 --- /dev/null +++ b/spec/fixtures/notify/4254e36c-b0bc-48ad-9a8c-62d59d16d0ce.yml @@ -0,0 +1,47 @@ +id: "4254e36c-b0bc-48ad-9a8c-62d59d16d0ce" +name: "notify_signer_of_positive_debate_outcome_en" +subject: "Senedd debated “((action_en))” | Trafododd y Senedd “((action_cy))”" +body: |- + Dear ((name)), + + Senedd debated the petition you signed – “((action_en))” + + ((overview_en)) + + Watch the debate: ((video_url_en)) + + Read the transcript: ((transcript_url_en)) + + Find details of the petition: ((debate_pack_url_en)) + + The petition: ((petition_url_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you signed this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) + + --- + + Annwyl ((name)), + + Trafododd y Senedd y ddeiseb a lofnodwyd gennych - “((action_cy))” + + ((overview_cy)) + + Gwyliwch y ddadl: ((video_url_cy)) + + Darllenwch y trawsgrifiad: ((transcript_url_cy)) + + Dewch o hyd i fanylion y ddeiseb: ((debate_pack_url_cy)) + + Y ddeiseb: ((petition_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi lofnodi'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) diff --git a/spec/fixtures/notify/46f90a8f-eb76-4ed7-b24f-c657560c5c41.yml b/spec/fixtures/notify/46f90a8f-eb76-4ed7-b24f-c657560c5c41.yml new file mode 100644 index 000000000..090eecc1d --- /dev/null +++ b/spec/fixtures/notify/46f90a8f-eb76-4ed7-b24f-c657560c5c41.yml @@ -0,0 +1,31 @@ +id: "46f90a8f-eb76-4ed7-b24f-c657560c5c41" +name: "notify_sponsor_that_petition_is_published_cy" +subject: "Cyhoeddwyd y ddeiseb “((action_cy))” y gwnaethoch chi ei chefnogi | We published the petition “((action_en))” that you supported" +body: |- + Annwyl ((sponsor)), + + Mae'r ddeiseb y gwnaethoch chi ei chefnogi – “((action_cy))”, bellach wedi ei chyhoeddi. + + Mae angen o leiaf ((referral_threshold)) llofnod ar ddeiseb er mwyn i'r Pwyllgor Deisebau ei hystyried. + + Cliciwch ar y linc i weld y ddeiseb a dechrau ei rhannu: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((sponsor)), + + The petition you supported – “((action_en))”, has now been published. + + Petitions need to collect ((referral_threshold)) signatures in order to be considered by the Petitions Committee. + + Click this link to see the petition and start sharing it: + ((url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/4bda6753-3639-4bad-94a2-b1b1596222b9.yml b/spec/fixtures/notify/4bda6753-3639-4bad-94a2-b1b1596222b9.yml new file mode 100644 index 000000000..9c9ab7407 --- /dev/null +++ b/spec/fixtures/notify/4bda6753-3639-4bad-94a2-b1b1596222b9.yml @@ -0,0 +1,47 @@ +id: "4bda6753-3639-4bad-94a2-b1b1596222b9" +name: "notify_creator_of_positive_debate_outcome_cy" +subject: "Trafododd y Senedd “((action_cy))” | Senedd debated “((action_en))”" +body: |- + Annwyl ((name)), + + Trafododd y Senedd eich deiseb - “((action_cy))” + + ((overview_cy)) + + Gwyliwch y ddadl: ((video_url_cy)) + + Darllenwch y trawsgrifiad: ((transcript_url_cy)) + + Dewch o hyd i fanylion y ddeiseb: ((debate_pack_url_cy)) + + Y ddeiseb: ((petition_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi greu'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) + + --- + + Dear ((name)), + + Senedd debated your petition – “((action_en))” + + ((overview_en)) + + Watch the debate: ((video_url_en)) + + Read the transcript: ((transcript_url_en)) + + Find details of the petition: ((debate_pack_url_en)) + + The petition: ((petition_url_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you created this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) diff --git a/spec/fixtures/notify/50d84545-2438-478d-9838-d61fc2467efd.yml b/spec/fixtures/notify/50d84545-2438-478d-9838-d61fc2467efd.yml new file mode 100644 index 000000000..5bdb074d1 --- /dev/null +++ b/spec/fixtures/notify/50d84545-2438-478d-9838-d61fc2467efd.yml @@ -0,0 +1,35 @@ +id: "50d84545-2438-478d-9838-d61fc2467efd" +name: "sponsor_signed_email_on_threshold_christmas_cy" +subject: "Rydym yn gwirio'ch deiseb | We’re checking your petition" +body: |- + Annwyl ((creator)), + + Mae eich deiseb bron yn barod. + + Cefnogodd ((sponsor)) eich deiseb - “((action))”. + + Mae ((moderation_threshold)) berson wedi cefnogi eich deiseb. Rydym ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos ond bydd yn cymryd ychydig mwy o amser nag arfer i ni dros gyfnod y Nadolig. Byddwn ni’n gwirio'ch deiseb cyn gynted ag y gallwn. + + Dyma wybodaeth am sut rydym ni’n gwirio deisebau cyn eu cyhoeddi: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((creator)), + + Your petition is nearly ready to go. + + ((sponsor)) supported your petition – “((action))”. + + ((moderation_threshold)) people have supported your petition. We’re checking your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less but over the Christmas period it will take us a little longer than usual. We’ll check your petition as quickly as we can. + + Find out how we check petitions before we publish them: + ((url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/5920b765-6921-4537-9e01-d8b1338b1071.yml b/spec/fixtures/notify/5920b765-6921-4537-9e01-d8b1338b1071.yml new file mode 100644 index 000000000..9d78e08e8 --- /dev/null +++ b/spec/fixtures/notify/5920b765-6921-4537-9e01-d8b1338b1071.yml @@ -0,0 +1,65 @@ +id: "5920b765-6921-4537-9e01-d8b1338b1071" +name: "gather_sponsors_for_petition_easter_cy" +subject: "Cam i'w gymryd: Deiseb “((action))” | Action required: Petition “((action))”" +body: |- + Annwyl ((creator)), + + Dydych chi ddim wedi gorffen eto! + + Anfonwch y neges e-bost isod ymlaen at eich darpar gefnogwyr. + + Mae angen I ((moderation_threshold)) berson glicio ar y linc a chadarnhau eu cefnogaeth er mwyn i ni gyhoeddi eich deiseb. + + Ar ôl i chi sicrhau’r nifer ofynnol o gefnogwyr, byddwn ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r safonau ar gyfer deisebau. Os felly, byddwn ni’n ei chyhoeddi. Mae hyn fel arfer yn cymryd hyd at wythnos ond bydd yn cymryd ychydig mwy o amser nag arfer i ni dros gyfnod y Pasg. Byddwn ni’n gwirio'ch deiseb cyn gynted ag y gallwn. + + Diolch,
 + Tîm Deisebau + Y Senedd
 + + --- + + Rydw i wedi creu deiseb – a wnewch chi ei llofnodi? + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + Fy neiseb I: + + # ((action)) + + ((content)) + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + --- + + Dear ((creator)), + + You’re not done yet! + + Forward the email below to your potential supporters. + + ((moderation_threshold)) people need to click the link and confirm their support for us to publish your petition. + + Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition standards. If it does we’ll publish it. This usually takes a week or less but over the Easter period it will take us a little longer than usual. We’ll check your petition as quickly as we can. + + Thanks,
 + The Petitions team + Senedd + + --- + + I’ve made a petition – will you sign it? + + Click this link to sign the petition:
 + ((url_en)) + + My petition: + + # ((action)) + + ((content)) + + Click this link to sign the petition: + ((url_en)) diff --git a/spec/fixtures/notify/59dad299-5c03-48b9-be2b-37b90a7701fe.yml b/spec/fixtures/notify/59dad299-5c03-48b9-be2b-37b90a7701fe.yml new file mode 100644 index 000000000..a6c9438f0 --- /dev/null +++ b/spec/fixtures/notify/59dad299-5c03-48b9-be2b-37b90a7701fe.yml @@ -0,0 +1,49 @@ +id: "59dad299-5c03-48b9-be2b-37b90a7701fe" +name: "notify_creator_that_petition_was_rejected_hidden_cy" +subject: "Gwrthodwyd eich deiseb “((action))” | We rejected your petition “((action))”" +body: |- + Annwyl ((creator)), + + Diolch am gyflwyno deiseb i'r Senedd. + + Cyn cyhoeddi deiseb ar ein gwefan a dechrau casglu llofnodion, mae angen i ni sicrhau ei bod yn bodloni’r rheolau ar gyfer deisebau. + + Yn anffodus, ni allwn dderbyn y ddeiseb a gynigiwyd gennych “((action))”. + + ((content_cy)) + + Dim ond deisebau nad ydynt yn bodloni'r safonau y byddwn yn eu gwrthod: + ((standards_url_cy)) + + Os hoffech roi cynnig arall arni, cliciwch yma i ddechrau deiseb: + ((new_petition_url_cy)) + + Mae'n ddrwg gennym na allwn fwrw ymlaen â'ch deiseb y tro hwn. + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((creator)), + + Thank you for submitting a petition to the Senedd. + + Before we can publish a petition on our website and it can begin to collect signatures, we need to ensure that it meets the petition rules. + + Unfortunately, we are not able to accept your proposed petition “((action))”. + + ((content_en)) + + We only reject petitions that don’t meet the petition standards: + ((standards_url_en)) + + If you want to try again, click here to start a petition: + ((new_petition_url_en)) + + We’re sorry that we’re not able to take your petition forward on this occasion. + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/5aa3434b-0530-4655-a2d2-318fd3668568.yml b/spec/fixtures/notify/5aa3434b-0530-4655-a2d2-318fd3668568.yml new file mode 100644 index 000000000..c89ad9fab --- /dev/null +++ b/spec/fixtures/notify/5aa3434b-0530-4655-a2d2-318fd3668568.yml @@ -0,0 +1,33 @@ +id: "5aa3434b-0530-4655-a2d2-318fd3668568" +name: "email_signer_about_other_business_cy" +subject: "((subject_cy)) | ((subject_en))" +body: |- + Annwyl ((name)), + + Yn ddiweddar gwnaethoch lofnodi'r ddeiseb “((action_cy))”: + ((petition_url_cy)) + + ((body_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi lofnodi'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) + + --- + + Dear ((name)), + + You recently signed the petition “((action_en))”: + ((petition_url_en)) + + ((body_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you signed this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) diff --git a/spec/fixtures/notify/5b75b985-fc6e-4473-8b51-0958818bea63.yml b/spec/fixtures/notify/5b75b985-fc6e-4473-8b51-0958818bea63.yml new file mode 100644 index 000000000..2964da9c1 --- /dev/null +++ b/spec/fixtures/notify/5b75b985-fc6e-4473-8b51-0958818bea63.yml @@ -0,0 +1,33 @@ +id: "5b75b985-fc6e-4473-8b51-0958818bea63" +name: "email_creator_about_other_business_en" +subject: "((subject_en)) | ((subject_cy))" +body: |- + Dear ((name)), + + You recently created the petition “((action_en))”: + ((petition_url_en)) + + ((body_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you created this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) + + --- + + Annwyl ((name)), + + Yn ddiweddar fe wnaethoch chi greu'r ddeiseb “((action_cy))”: + ((petition_url_cy)) + + ((body_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi greu'r ddeiseb hon: “((action_en))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) diff --git a/spec/fixtures/notify/61cd5971-7bc7-4a1e-b30b-d799a36bff5c.yml b/spec/fixtures/notify/61cd5971-7bc7-4a1e-b30b-d799a36bff5c.yml new file mode 100644 index 000000000..438bc105f --- /dev/null +++ b/spec/fixtures/notify/61cd5971-7bc7-4a1e-b30b-d799a36bff5c.yml @@ -0,0 +1,47 @@ +id: "61cd5971-7bc7-4a1e-b30b-d799a36bff5c" +name: "notify_signer_of_positive_debate_outcome_cy" +subject: "Trafododd y Senedd “((action_cy))” | Senedd debated “((action_en))”" +body: |- + Annwyl ((name)), + + Trafododd y Senedd y ddeiseb a lofnodwyd gennych - “((action_cy))” + + ((overview_cy)) + + Gwyliwch y ddadl: ((video_url_cy)) + + Darllenwch y trawsgrifiad: ((transcript_url_cy)) + + Dewch o hyd i fanylion y ddeiseb: ((debate_pack_url_cy)) + + Y ddeiseb: ((petition_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi lofnodi'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) + + --- + + Dear ((name)), + + Senedd debated the petition you signed – “((action_en))” + + ((overview_en)) + + Watch the debate: ((video_url_en)) + + Read the transcript: ((transcript_url_en)) + + Find details of the petition: ((debate_pack_url_en)) + + The petition: ((petition_url_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you signed this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) diff --git a/spec/fixtures/notify/68009505-3bc4-49b6-b1b5-c3f36967f9b4.yml b/spec/fixtures/notify/68009505-3bc4-49b6-b1b5-c3f36967f9b4.yml new file mode 100644 index 000000000..a28211b4d --- /dev/null +++ b/spec/fixtures/notify/68009505-3bc4-49b6-b1b5-c3f36967f9b4.yml @@ -0,0 +1,18 @@ +id: "68009505-3bc4-49b6-b1b5-c3f36967f9b4" +name: "feedback_email" +subject: "Feedback from the Petitions service" +body: |- + # Comments: + + ((comment)) + + --- + + Link or title: + ((link_or_title)) + + Email: + ((email)) + + Browser: + ((user_agent)) diff --git a/spec/fixtures/notify/69e7f6e1-da4c-4b1e-95d5-e687a62c2cc7.yml b/spec/fixtures/notify/69e7f6e1-da4c-4b1e-95d5-e687a62c2cc7.yml new file mode 100644 index 000000000..73137a476 --- /dev/null +++ b/spec/fixtures/notify/69e7f6e1-da4c-4b1e-95d5-e687a62c2cc7.yml @@ -0,0 +1,39 @@ +id: "69e7f6e1-da4c-4b1e-95d5-e687a62c2cc7" +name: "notify_sponsor_that_petition_was_rejected_hidden_en" +subject: "We rejected the petition “((action))” that you supported | Gwrthodwyd y ddeiseb “((action))” y gwnaethoch chi ei chefnogi" +body: |- + Dear ((sponsor)), + + Thank you for supporting a petition. + + Before we can publish a petition on our website and it can begin to collect signatures, we need to ensure that it meets the petition rules. + + Unfortunately, we are not able to accept the proposed petition “((action))”. + + ((content_en)) + + We only reject petitions that don’t meet the petition standards: + ((standards_url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((sponsor)), + + Diolch am gefnogi deiseb. + + Cyn cyhoeddi deiseb ar ein gwefan a dechrau casglu llofnodion, mae angen i ni sicrhau ei bod yn bodloni’r rheolau ar gyfer deisebau. + + Yn anffodus, ni allwn dderbyn y ddeiseb a gynigiwyd “((action))”. + + ((content_cy)) + + Dim ond deisebau nad ydynt yn bodloni'r safonau y byddwn yn eu gwrthod: + ((standards_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/6c9730a2-e31d-4c15-9c05-e96ef5cb8ff4.yml b/spec/fixtures/notify/6c9730a2-e31d-4c15-9c05-e96ef5cb8ff4.yml new file mode 100644 index 000000000..9687471dc --- /dev/null +++ b/spec/fixtures/notify/6c9730a2-e31d-4c15-9c05-e96ef5cb8ff4.yml @@ -0,0 +1,65 @@ +id: "6c9730a2-e31d-4c15-9c05-e96ef5cb8ff4" +name: "gather_sponsors_for_petition_christmas_cy" +subject: "Cam i'w gymryd: Deiseb “((action))” | Action required: Petition “((action))”" +body: |- + Annwyl ((creator)), + + Dydych chi ddim wedi gorffen eto! + + Anfonwch y neges e-bost isod ymlaen at eich darpar gefnogwyr. + + Mae angen I ((moderation_threshold)) berson glicio ar y linc a chadarnhau eu cefnogaeth er mwyn i ni gyhoeddi eich deiseb. + + Ar ôl i chi sicrhau’r nifer ofynnol o gefnogwyr, byddwn ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos ond bydd yn cymryd ychydig mwy o amser nag arfer i ni dros gyfnod y Nadolig. Byddwn ni’n gwirio'ch deiseb cyn gynted ag y gallwn. + + Diolch,
 + Tîm Deisebau + Y Senedd
 + + --- + + Rydw i wedi creu deiseb – a wnewch chi ei llofnodi? + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + Fy neiseb I: + + # ((action)) + + ((content)) + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + --- + + Dear ((creator)), + + You’re not done yet! + + Forward the email below to your potential supporters. + + ((moderation_threshold)) people need to click the link and confirm their support for us to publish your petition. + + Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition criteria. If it does we’ll publish it and let you know. This usually takes a week or less but over the Christmas period it will take us a little longer than usual. We’ll check your petition as quickly as we can. + + Thanks,
 + The Petitions team + Senedd + + --- + + I’ve made a petition – will you sign it? + + Click this link to sign the petition:
 + ((url_en)) + + My petition: + + # ((action)) + + ((content)) + + Click this link to sign the petition: + ((url_en)) diff --git a/spec/fixtures/notify/6fbe2afa-0ee5-4dec-adab-1a7518cbee33.yml b/spec/fixtures/notify/6fbe2afa-0ee5-4dec-adab-1a7518cbee33.yml new file mode 100644 index 000000000..767559239 --- /dev/null +++ b/spec/fixtures/notify/6fbe2afa-0ee5-4dec-adab-1a7518cbee33.yml @@ -0,0 +1,35 @@ +id: "6fbe2afa-0ee5-4dec-adab-1a7518cbee33" +name: "sponsor_signed_email_on_threshold_easter_en" +subject: "We’re checking your petition | Rydym yn gwirio'ch deiseb" +body: |- + Dear ((creator)), + + Your petition is nearly ready to go. + + ((sponsor)) supported your petition – “((action))”. + + ((moderation_threshold)) people have supported your petition. We’re checking your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less but over the Easter period it will take us a little longer than usual. We’ll check your petition as quickly as we can. + + Find out how we check petitions before we publish them: + ((url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((creator)), + + Mae eich deiseb bron yn barod. + + Cefnogodd ((sponsor)) eich deiseb - “((action))”. + + Mae ((moderation_threshold)) berson wedi cefnogi eich deiseb. Rydym ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos ond bydd yn cymryd ychydig mwy o amser nag arfer i ni dros gyfnod y Pasg. Byddwn ni’n gwirio'ch deiseb cyn gynted ag y gallwn. + + Dyma wybodaeth am sut rydym ni’n gwirio deisebau cyn eu cyhoeddi: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/71d0736e-ff45-43d5-b083-c78f04d2b02c.yml b/spec/fixtures/notify/71d0736e-ff45-43d5-b083-c78f04d2b02c.yml new file mode 100644 index 000000000..646c3bb69 --- /dev/null +++ b/spec/fixtures/notify/71d0736e-ff45-43d5-b083-c78f04d2b02c.yml @@ -0,0 +1,55 @@ +id: "71d0736e-ff45-43d5-b083-c78f04d2b02c" +name: "notify_creator_that_petition_was_rejected_cy" +subject: "Gwrthodwyd eich deiseb “((action))” | We rejected your petition “((action))”" +body: |- + Annwyl ((creator)), + + Diolch am gyflwyno deiseb i'r Senedd. + + Cyn cyhoeddi deiseb ar ein gwefan a dechrau casglu llofnodion, mae angen i ni sicrhau ei bod yn bodloni’r rheolau ar gyfer deisebau. + + Yn anffodus, ni allwn dderbyn y ddeiseb a gynigiwyd gennych “((action))”. + + ((content_cy)) + + Cliciwch ar y linc i weld y ddeiseb a wrthodwyd: + ((url_cy)) + + Dim ond deisebau nad ydynt yn bodloni'r safonau y byddwn yn eu gwrthod: + ((standards_url_cy)) + + Os hoffech roi cynnig arall arni, cliciwch yma i ddechrau deiseb: + ((new_petition_url_cy)) + + Mae'n ddrwg gennym na allwn fwrw ymlaen â'ch deiseb y tro hwn. + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((creator)), + + Thank you for submitting a petition to the Senedd. + + Before we can publish a petition on our website and it can begin to collect signatures, we need to ensure that it meets the petition rules. + + Unfortunately, we are not able to accept your proposed petition “((action))”. + + ((content_en)) + + Click this link to see your rejected petition: + ((url_en)) + + We only reject petitions that don’t meet the petition standards: + ((standards_url_en)) + + If you want to try again, click here to start a petition: + ((new_petition_url_en)) + + We’re sorry that we’re not able to take your petition forward on this occasion. + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/7e098470-4a73-435c-bd8c-9f0d9d9ba010.yml b/spec/fixtures/notify/7e098470-4a73-435c-bd8c-9f0d9d9ba010.yml new file mode 100644 index 000000000..05de70378 --- /dev/null +++ b/spec/fixtures/notify/7e098470-4a73-435c-bd8c-9f0d9d9ba010.yml @@ -0,0 +1,65 @@ +id: "7e098470-4a73-435c-bd8c-9f0d9d9ba010" +name: "gather_sponsors_for_petition_en" +subject: "Action required: Petition “((action))” | Cam i'w gymryd: Deiseb “((action))”" +body: |- + Dear ((creator)), + + You’re not done yet! + + Forward the email below to your potential supporters. + + ((moderation_threshold)) people need to click the link and confirm their support for us to publish your petition. + + Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less. + + Thanks,
 + The Petitions team + Senedd + + --- + + I’ve made a petition – will you sign it? + + Click this link to sign the petition:
 + ((url_en)) + + My petition: + + # ((action)) + + ((content)) + + Click this link to sign the petition: + ((url_en)) + + --- + + Annwyl ((creator)), + + Dydych chi ddim wedi gorffen eto! + + Anfonwch y neges e-bost isod ymlaen at eich darpar gefnogwyr. + + Mae angen I ((moderation_threshold)) berson glicio ar y linc a chadarnhau eu cefnogaeth er mwyn i ni gyhoeddi eich deiseb. + + Ar ôl i chi sicrhau’r nifer ofynnol o gefnogwyr, byddwn ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos. + + Diolch,
 + Tîm Deisebau + Y Senedd
 + + --- + + Rydw i wedi creu deiseb – a wnewch chi ei llofnodi? + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + Fy neiseb I: + + # ((action)) + + ((content)) + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) diff --git a/spec/fixtures/notify/824662f6-2cb1-4da8-b65d-6b071c569d0e.yml b/spec/fixtures/notify/824662f6-2cb1-4da8-b65d-6b071c569d0e.yml new file mode 100644 index 000000000..b3670dd19 --- /dev/null +++ b/spec/fixtures/notify/824662f6-2cb1-4da8-b65d-6b071c569d0e.yml @@ -0,0 +1,39 @@ +id: "824662f6-2cb1-4da8-b65d-6b071c569d0e" +name: "notify_signer_of_debate_scheduled_en" +subject: "Senedd will debate “((action_en))” | Bydd y Senedd yn trafod “((action_cy))”" +body: |- + Dear ((name)), + + Senedd is going to debate the petition you signed – “((action_en))”. + + ((petition_url_en)) + + The debate is scheduled for ((debate_date_en)). + + Once the debate has happened, we’ll email you a video and transcript. + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you signed this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) + + --- + + Annwyl ((name)), + + Mae'r Senedd yn mynd i drafod y ddeiseb a lofnodwyd gennych - “((action_cy))”. + + ((petition_url_cy)) + + Mae'r ddadl wedi'i hamserlennu ar gyfer ((debate_date_cy)). + + Ar ôl i'r ddadl ddigwydd, byddwn yn e-bostio fideo a thrawsgrifiad atoch. + + Diolch, + Y tîm Deisebau + Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi lofnodi'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) diff --git a/spec/fixtures/notify/865e3a66-6b98-406d-8883-04dd7d35a580.yml b/spec/fixtures/notify/865e3a66-6b98-406d-8883-04dd7d35a580.yml new file mode 100644 index 000000000..4d853ef5f --- /dev/null +++ b/spec/fixtures/notify/865e3a66-6b98-406d-8883-04dd7d35a580.yml @@ -0,0 +1,39 @@ +id: "865e3a66-6b98-406d-8883-04dd7d35a580" +name: "notify_signer_of_negative_debate_outcome_en" +subject: "Senedd didn’t debate “((action_en))” | Ni thrafododd y Senedd “((action_cy))”" +body: |- + Dear ((name)), + + The Petitions Committee decided not to debate the petition you signed – “((action_en))” + + ((overview_en)) + + The petition: ((petition_url_en)) + + Find out more about the Petitions Committee: ((petitions_committee_url_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you signed this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) + + --- + + Annwyl ((name)), + + Penderfynodd y Pwyllgor Deisebau beidio â thrafod y ddeiseb a lofnodwyd gennych - “((action_cy))” + + ((overview_cy)) + + Y ddeiseb: ((petition_url_cy)) + + Darganfyddwch fwy am y Pwyllgor Deisebau: ((petitions_committee_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi lofnodi'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) diff --git a/spec/fixtures/notify/86b5dee8-ca22-45be-af00-d74d601e656d.yml b/spec/fixtures/notify/86b5dee8-ca22-45be-af00-d74d601e656d.yml new file mode 100644 index 000000000..2eda5df66 --- /dev/null +++ b/spec/fixtures/notify/86b5dee8-ca22-45be-af00-d74d601e656d.yml @@ -0,0 +1,33 @@ +id: "86b5dee8-ca22-45be-af00-d74d601e656d" +name: "email_creator_about_other_business_cy" +subject: "((subject_cy)) | ((subject_en))" +body: |- + Annwyl ((name)), + + Yn ddiweddar fe wnaethoch chi greu'r ddeiseb “((action_cy))”: + ((petition_url_cy)) + + ((body_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi greu'r ddeiseb hon: “((action_en))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) + + --- + + Dear ((name)), + + You recently created the petition “((action_en))”: + ((petition_url_en)) + + ((body_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you created this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) diff --git a/spec/fixtures/notify/8766cdb6-19cb-4eab-a2ba-1af7643f66ee.yml b/spec/fixtures/notify/8766cdb6-19cb-4eab-a2ba-1af7643f66ee.yml new file mode 100644 index 000000000..8a1583f78 --- /dev/null +++ b/spec/fixtures/notify/8766cdb6-19cb-4eab-a2ba-1af7643f66ee.yml @@ -0,0 +1,35 @@ +id: "8766cdb6-19cb-4eab-a2ba-1af7643f66ee" +name: "sponsor_signed_email_on_threshold_cy" +subject: "Rydym yn gwirio'ch deiseb | We’re checking your petition" +body: |- + Annwyl ((creator)), + + Mae eich deiseb bron yn barod. + + Cefnogodd ((sponsor)) eich deiseb - “((action))”. + + Mae ((moderation_threshold)) berson wedi cefnogi eich deiseb. Rydym ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos. + + Dyma wybodaeth am sut rydym ni’n gwirio deisebau cyn eu cyhoeddi: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((creator)), + + Your petition is nearly ready to go. + + ((sponsor)) supported your petition – “((action))”. + + ((moderation_threshold)) people have supported your petition. We’re checking your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less. + + Find out how we check petitions before we publish them: + ((url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/8d63e92e-1591-420d-a8ec-1df6ecf6a34c.yml b/spec/fixtures/notify/8d63e92e-1591-420d-a8ec-1df6ecf6a34c.yml new file mode 100644 index 000000000..574a89ffa --- /dev/null +++ b/spec/fixtures/notify/8d63e92e-1591-420d-a8ec-1df6ecf6a34c.yml @@ -0,0 +1,23 @@ +id: "8d63e92e-1591-420d-a8ec-1df6ecf6a34c" +name: "email_duplicate_signatures_cy" +subject: "Llofnod dyblyg ar ddeiseb | Duplicate signature of petition" +body: |- + Rydych chi wedi cael y neges e-bost hon am fod eich cyfeiriad e-bost wedi'i ddefnyddio i lofnodi’r ddeiseb “((action_cy))”, ond rydych chi eisoes wedi llofnodi'r ddeiseb hon. + + Gallwch weld y ddeiseb “((action_cy))” yn: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + You’re receiving this email because your email has been used to sign the petition “((action_en))”, but you have already signed this petition. + + View the petition “((action_en))” at:
 + ((url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/929f4523-ee7d-4895-a9e5-32f9fff0c41a.yml b/spec/fixtures/notify/929f4523-ee7d-4895-a9e5-32f9fff0c41a.yml new file mode 100644 index 000000000..4d29cf79b --- /dev/null +++ b/spec/fixtures/notify/929f4523-ee7d-4895-a9e5-32f9fff0c41a.yml @@ -0,0 +1,47 @@ +id: "929f4523-ee7d-4895-a9e5-32f9fff0c41a" +name: "notify_creator_of_positive_debate_outcome_en" +subject: "Senedd debated “((action_en))” | Trafododd y Senedd “((action_cy))”" +body: |- + Dear ((name)), + + Senedd debated your petition – “((action_en))” + + ((overview_en)) + + Watch the debate: ((video_url_en)) + + Read the transcript: ((transcript_url_en)) + + Find details of the petition: ((debate_pack_url_en)) + + The petition: ((petition_url_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you created this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) + + --- + + Annwyl ((name)), + + Trafododd y Senedd eich deiseb - “((action_cy))” + + ((overview_cy)) + + Gwyliwch y ddadl: ((video_url_cy)) + + Darllenwch y trawsgrifiad: ((transcript_url_cy)) + + Dewch o hyd i fanylion y ddeiseb: ((debate_pack_url_cy)) + + Y ddeiseb: ((petition_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi greu'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) diff --git a/spec/fixtures/notify/939413df-ec0d-4898-acb2-46a63ea3d42f.yml b/spec/fixtures/notify/939413df-ec0d-4898-acb2-46a63ea3d42f.yml new file mode 100644 index 000000000..96d66128c --- /dev/null +++ b/spec/fixtures/notify/939413df-ec0d-4898-acb2-46a63ea3d42f.yml @@ -0,0 +1,39 @@ +id: "939413df-ec0d-4898-acb2-46a63ea3d42f" +name: "notify_signer_of_debate_scheduled_cy" +subject: "Bydd y Senedd yn trafod “((action_cy))” | Senedd will debate “((action_en))”" +body: |- + Annwyl ((name)), + + Mae'r Senedd yn mynd i drafod y ddeiseb a lofnodwyd gennych - “((action_cy))”. + + ((petition_url_cy)) + + Mae'r ddadl wedi'i hamserlennu ar gyfer ((debate_date_cy)). + + Ar ôl i'r ddadl ddigwydd, byddwn yn e-bostio fideo a thrawsgrifiad atoch. + + Diolch, + Y tîm Deisebau + Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi lofnodi'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) + + --- + + Dear ((name)), + + Senedd is going to debate the petition you signed – “((action_en))”. + + ((petition_url_en)) + + The debate is scheduled for ((debate_date_en)). + + Once the debate has happened, we’ll email you a video and transcript. + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you signed this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) diff --git a/spec/fixtures/notify/9bcdcefd-60a3-4698-85c7-5b4246745b43.yml b/spec/fixtures/notify/9bcdcefd-60a3-4698-85c7-5b4246745b43.yml new file mode 100644 index 000000000..b842a5db2 --- /dev/null +++ b/spec/fixtures/notify/9bcdcefd-60a3-4698-85c7-5b4246745b43.yml @@ -0,0 +1,45 @@ +id: "9bcdcefd-60a3-4698-85c7-5b4246745b43" +name: "notify_sponsor_that_petition_was_rejected_cy" +subject: "Gwrthodwyd y ddeiseb “((action))” y gwnaethoch chi ei chefnogi | We rejected the petition “((action))” that you supported" +body: |- + Annwyl ((sponsor)), + + Diolch am gefnogi deiseb. + + Cyn cyhoeddi deiseb ar ein gwefan a dechrau casglu llofnodion, mae angen i ni sicrhau ei bod yn bodloni’r rheolau ar gyfer deisebau. + + Yn anffodus, ni allwn dderbyn y ddeiseb a gynigiwyd “((action))”. + + ((content_cy)) + + Cliciwch ar y linc i weld y ddeiseb a wrthodwyd: + ((url_cy)) + + Dim ond deisebau nad ydynt yn bodloni'r safonau y byddwn yn eu gwrthod: + ((standards_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((sponsor)), + + Thank you for supporting a petition. + + Before we can publish a petition on our website and it can begin to collect signatures, we need to ensure that it meets the petition rules. + + Unfortunately, we are not able to accept the proposed petition “((action))”. + + ((content_en)) + + Click this link to see the rejected petition: + ((url_en)) + + We only reject petitions that don’t meet the petition standards: + ((standards_url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/a33e91d1-808a-4a85-abcc-8a4c62266789.yml b/spec/fixtures/notify/a33e91d1-808a-4a85-abcc-8a4c62266789.yml new file mode 100644 index 000000000..a10e1a29a --- /dev/null +++ b/spec/fixtures/notify/a33e91d1-808a-4a85-abcc-8a4c62266789.yml @@ -0,0 +1,25 @@ +id: "a33e91d1-808a-4a85-abcc-8a4c62266789" +name: "email_confirmation_for_signer_en" +subject: "Please confirm your email address | Cadarnhewch eich cyfeiriad e-bost" +body: |- + Click this link to sign the petition: + + # ((action_en)) + + ((url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Cliciwch ar y linc i lofnodi’r ddeiseb: + + # ((action_cy)) + + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/a8557cbf-a889-4392-88a1-988634169d69.yml b/spec/fixtures/notify/a8557cbf-a889-4392-88a1-988634169d69.yml new file mode 100644 index 000000000..a4af3f21c --- /dev/null +++ b/spec/fixtures/notify/a8557cbf-a889-4392-88a1-988634169d69.yml @@ -0,0 +1,31 @@ +id: "a8557cbf-a889-4392-88a1-988634169d69" +name: "notify_sponsor_that_petition_is_published_en" +subject: "We published the petition “((action_en))” that you supported | Cyhoeddwyd y ddeiseb “((action_cy))” y gwnaethoch chi ei chefnogi" +body: |- + Dear ((sponsor)), + + The petition you supported – “((action_en))”, has now been published. + + Petitions need to collect ((referral_threshold)) signatures in order to be considered by the Petitions Committee. + + Click this link to see the petition and start sharing it: + ((url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((sponsor)), + + Mae'r ddeiseb y gwnaethoch chi ei chefnogi – “((action_cy))”, bellach wedi ei chyhoeddi. + + Mae angen o leiaf ((referral_threshold)) llofnod ar ddeiseb er mwyn i'r Pwyllgor Deisebau ei hystyried. + + Cliciwch ar y linc i weld y ddeiseb a dechrau ei rhannu: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/b0bbd8f3-ad81-4095-a01d-68d979775418.yml b/spec/fixtures/notify/b0bbd8f3-ad81-4095-a01d-68d979775418.yml new file mode 100644 index 000000000..357d8eae4 --- /dev/null +++ b/spec/fixtures/notify/b0bbd8f3-ad81-4095-a01d-68d979775418.yml @@ -0,0 +1,35 @@ +id: "b0bbd8f3-ad81-4095-a01d-68d979775418" +name: "sponsor_signed_email_on_threshold_en" +subject: "We’re checking your petition | Rydym yn gwirio'ch deiseb" +body: |- + Dear ((creator)), + + Your petition is nearly ready to go. + + ((sponsor)) supported your petition – “((action))”. + + ((moderation_threshold)) people have supported your petition. We’re checking your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less. + + Find out how we check petitions before we publish them: + ((url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((creator)), + + Mae eich deiseb bron yn barod. + + Cefnogodd ((sponsor)) eich deiseb - “((action))”. + + Mae ((moderation_threshold)) berson wedi cefnogi eich deiseb. Rydym ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos. + + Dyma wybodaeth am sut rydym ni’n gwirio deisebau cyn eu cyhoeddi: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/c93ca86b-b508-417c-a4b5-28ec33047b2e.yml b/spec/fixtures/notify/c93ca86b-b508-417c-a4b5-28ec33047b2e.yml new file mode 100644 index 000000000..50d93951e --- /dev/null +++ b/spec/fixtures/notify/c93ca86b-b508-417c-a4b5-28ec33047b2e.yml @@ -0,0 +1,65 @@ +id: "c93ca86b-b508-417c-a4b5-28ec33047b2e" +name: "gather_sponsors_for_petition_moderation_delay_en" +subject: "Cam i'w gymryd: Deiseb “((action))” | Action required: Petition “((action))”" +body: |- + Dear ((creator)), + + You’re not done yet! + + Forward the email below to your potential supporters. + + ((moderation_threshold)) people need to click the link and confirm their support for us to publish your petition. + + Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less, however we have a very large number to check at the moment so it is likely to take longer. Thank you for your patience. + + Thanks,
 + The Petitions team + Senedd + + --- + + I’ve made a petition – will you sign it? + + Click this link to sign the petition:
 + ((url_en)) + + My petition: + + # ((action)) + + ((content)) + + Click this link to sign the petition: + ((url_en)) + + --- + + Annwyl ((creator)), + + Dydych chi ddim wedi gorffen eto! + + Anfonwch y neges e-bost isod ymlaen at eich darpar gefnogwyr. + + Mae angen I ((moderation_threshold)) berson glicio ar y linc a chadarnhau eu cefnogaeth er mwyn i ni gyhoeddi eich deiseb. + + Ar ôl i chi sicrhau’r nifer ofynnol o gefnogwyr, byddwn ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos, ond mae gennym ni nifer fawr iawn o ddeisebau i'w gwirio ar hyn o bryd felly mae'n debygol o gymryd mwy o amser. Diolch i chi am eich amynedd. + + Diolch,
 + Tîm Deisebau + Y Senedd
 + + --- + + Rydw i wedi creu deiseb – a wnewch chi ei llofnodi? + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + Fy neiseb I: + + # ((action)) + + ((content)) + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) diff --git a/spec/fixtures/notify/cf28ed24-3710-4843-bc35-0ec157adb9ca.yml b/spec/fixtures/notify/cf28ed24-3710-4843-bc35-0ec157adb9ca.yml new file mode 100644 index 000000000..c03d4eb7b --- /dev/null +++ b/spec/fixtures/notify/cf28ed24-3710-4843-bc35-0ec157adb9ca.yml @@ -0,0 +1,39 @@ +id: "cf28ed24-3710-4843-bc35-0ec157adb9ca" +name: "notify_sponsor_that_petition_was_rejected_hidden_cy" +subject: "Gwrthodwyd y ddeiseb “((action))” y gwnaethoch chi ei chefnogi | We rejected the petition “((action))” that you supported" +body: |- + Annwyl ((sponsor)), + + Diolch am gefnogi deiseb. + + Cyn cyhoeddi deiseb ar ein gwefan a dechrau casglu llofnodion, mae angen i ni sicrhau ei bod yn bodloni’r rheolau ar gyfer deisebau. + + Yn anffodus, ni allwn dderbyn y ddeiseb a gynigiwyd “((action))”. + + ((content_cy)) + + Dim ond deisebau nad ydynt yn bodloni'r safonau y byddwn yn eu gwrthod: + ((standards_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((sponsor)), + + Thank you for supporting a petition. + + Before we can publish a petition on our website and it can begin to collect signatures, we need to ensure that it meets the petition rules. + + Unfortunately, we are not able to accept the proposed petition “((action))”. + + ((content_en)) + + We only reject petitions that don’t meet the petition standards: + ((standards_url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/d97d154f-cdb8-4273-b6cb-d5f89479efba.yml b/spec/fixtures/notify/d97d154f-cdb8-4273-b6cb-d5f89479efba.yml new file mode 100644 index 000000000..3c99c85e2 --- /dev/null +++ b/spec/fixtures/notify/d97d154f-cdb8-4273-b6cb-d5f89479efba.yml @@ -0,0 +1,39 @@ +id: "d97d154f-cdb8-4273-b6cb-d5f89479efba" +name: "notify_signer_of_negative_debate_outcome_cy" +subject: "Ni thrafododd y Senedd “((action_cy))” | Senedd didn’t debate “((action_en))”" +body: |- + Annwyl ((name)), + + Penderfynodd y Pwyllgor Deisebau beidio â thrafod y ddeiseb a lofnodwyd gennych - “((action_cy))” + + ((overview_cy)) + + Y ddeiseb: ((petition_url_cy)) + + Darganfyddwch fwy am y Pwyllgor Deisebau: ((petitions_committee_url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi lofnodi'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) + + --- + + Dear ((name)), + + The Petitions Committee decided not to debate the petition you signed – “((action_en))” + + ((overview_en)) + + The petition: ((petition_url_en)) + + Find out more about the Petitions Committee: ((petitions_committee_url_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you signed this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) diff --git a/spec/fixtures/notify/dc337901-65b0-4e76-b1d5-b14b90e7ee3e.yml b/spec/fixtures/notify/dc337901-65b0-4e76-b1d5-b14b90e7ee3e.yml new file mode 100644 index 000000000..23662941c --- /dev/null +++ b/spec/fixtures/notify/dc337901-65b0-4e76-b1d5-b14b90e7ee3e.yml @@ -0,0 +1,51 @@ +id: "dc337901-65b0-4e76-b1d5-b14b90e7ee3e" +name: "notify_creator_that_petition_is_published_en" +subject: "We published your petition “((action_en))” | Cyhoeddwyd eich deiseb “((action_cy))”" +body: |- + Dear ((creator)), + + Your petition “((action_en))” is now published and ready to collect signatures. + + Click this link to see your petition and start sharing it: + ((url_en)) + + Petitions need to collect ((referral_threshold)) signatures in order to be considered by the Petitions Committee. This does not happen until after the petition has finished collecting signatures. Please let us know if you would like to change the closing date of your petition. + + If your petition collects more that ((debate_threshold)) signatures, the Committee will consider referring it for a debate in the Senedd. In doing so, the Committee will consider a range of factors including the subject-matter of the petition and the percentage of signatures gathered from within Wales. + + Should you also wish to collect signatures on paper, we can provide a template on request. + + If your petition collects ((referral_threshold)) signatures you can arrange to come to the Senedd to formally hand in your petition to the Committee. This is an informal opportunity to speak to the Chair and other Members of the Committee about your petition. It is entirely optional. + + Handovers take place at 12.30pm on Tuesdays and Wednesdays when the Senedd is sitting and last approximately 10 – 15 minutes. These opportunities are often taken up quickly, so please contact us at your earliest convenience if you would like to arrange one. + + Finally, should you require any further information in the meantime, please do not hesitate to contact us. + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((creator)), + + Mae eich deiseb “((action_cy))” bellach wedi'i chyhoeddi ac yn barod i gasglu llofnodion. + + Cliciwch ar y linc i weld eich deiseb a dechrau ei rhannu: + ((url_cy)) + + Mae angen o leiaf ((referral_threshold)) llofnod ar ddeiseb er mwyn i'r Pwyllgor Deisebau ei hystyried. Ni fydd hyn yn digwydd tan ar ôl i'r ddeiseb orffen casglu llofnodion. Rhowch wybod i ni os hoffech newid dyddiad cau eich deiseb. + + Os bydd eich deiseb yn casglu mwy na ((debate_threshold)) llofnod, bydd y Pwyllgor yn ystyried ei chyfeirio ar gyfer dadl yn y Senedd. Wrth wneud hynny, bydd y Pwyllgor yn ystyried nifer o ffactorau gan gynnwys pwnc y ddeiseb a chanran y llofnodion a gasglwyd yng Nghymru. + + Os hoffech gasglu llofnodion ar bapur hefyd, gallwn ddarparu templed ar gais. + + Os bydd eich deiseb yn casglu ((referral_threshold)) llofnod gallwch drefnu dod i'r Senedd i gyflwyno'ch deiseb yn ffurfiol i'r Pwyllgor. Bydd hwn yn gyfle anffurfiol i drafod eich deiseb gyda’r Cadeirydd ac aelodau eraill y Pwyllgor. Mae'n gwbl ddewisol. + + Caiff deisebau eu cyflwyno am 12.30 ar ddydd Mawrth a dydd Mercher yn ystod tymor y Senedd ac mae’r broses yn para tua 10-15 munud. Mae pobl yn manteisio ar y cyfleoedd hyn yn gyflym fel arfer, felly cysylltwch â ni cyn gynted â phosibl os hoffech drefnu i gyflwyno deiseb. + + Yn olaf, mae croeso i chi gysylltu â ni os bydd angen rhagor o wybodaeth arnoch yn y cyfamser. + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/de60bc30-2d7b-4a71-851f-0ac357af048f.yml b/spec/fixtures/notify/de60bc30-2d7b-4a71-851f-0ac357af048f.yml new file mode 100644 index 000000000..5b4ac6d07 --- /dev/null +++ b/spec/fixtures/notify/de60bc30-2d7b-4a71-851f-0ac357af048f.yml @@ -0,0 +1,25 @@ +id: "de60bc30-2d7b-4a71-851f-0ac357af048f" +name: "email_confirmation_for_signer_cy" +subject: "Cadarnhewch eich cyfeiriad e-bost | Please confirm your email address" +body: |- + Cliciwch ar y linc i lofnodi’r ddeiseb: + + # ((action_cy)) + + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Click this link to sign the petition: + + # ((action_en)) + + ((url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/e4beb5af-0db1-406b-9c03-a8c8b65f27fd.yml b/spec/fixtures/notify/e4beb5af-0db1-406b-9c03-a8c8b65f27fd.yml new file mode 100644 index 000000000..38cb50698 --- /dev/null +++ b/spec/fixtures/notify/e4beb5af-0db1-406b-9c03-a8c8b65f27fd.yml @@ -0,0 +1,23 @@ +id: "e4beb5af-0db1-406b-9c03-a8c8b65f27fd" +name: "email_duplicate_signatures_en" +subject: "Duplicate signature of petition | Llofnod dyblyg ar ddeiseb" +body: |- + You’re receiving this email because your email has been used to sign the petition “((action_en))”, but you have already signed this petition. + + View the petition “((action_en))” at:
 + ((url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Rydych chi wedi cael y neges e-bost hon am fod eich cyfeiriad e-bost wedi'i ddefnyddio i lofnodi’r ddeiseb “((action_cy))”, ond rydych chi eisoes wedi llofnodi'r ddeiseb hon. + + Gallwch weld y ddeiseb “((action_cy))” yn: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/ed21ff1d-b718-4cef-9491-451f443f9a1d.yml b/spec/fixtures/notify/ed21ff1d-b718-4cef-9491-451f443f9a1d.yml new file mode 100644 index 000000000..6c6cc94c6 --- /dev/null +++ b/spec/fixtures/notify/ed21ff1d-b718-4cef-9491-451f443f9a1d.yml @@ -0,0 +1,65 @@ +id: "ed21ff1d-b718-4cef-9491-451f443f9a1d" +name: "gather_sponsors_for_petition_easter_en" +subject: "Action required: Petition “((action))” | Cam i'w gymryd: Deiseb “((action))”" +body: |- + Dear ((creator)), + + You’re not done yet! + + Forward the email below to your potential supporters. + + ((moderation_threshold)) people need to click the link and confirm their support for us to publish your petition. + + Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition standards. If it does we’ll publish it. This usually takes a week or less but over the Easter period it will take us a little longer than usual. We’ll check your petition as quickly as we can. + + Thanks,
 + The Petitions team + Senedd + + --- + + I’ve made a petition – will you sign it? + + Click this link to sign the petition:
 + ((url_en)) + + My petition: + + # ((action)) + + ((content)) + + Click this link to sign the petition: + ((url_en)) + + --- + + Annwyl ((creator)), + + Dydych chi ddim wedi gorffen eto! + + Anfonwch y neges e-bost isod ymlaen at eich darpar gefnogwyr. + + Mae angen I ((moderation_threshold)) berson glicio ar y linc a chadarnhau eu cefnogaeth er mwyn i ni gyhoeddi eich deiseb. + + Ar ôl i chi sicrhau’r nifer ofynnol o gefnogwyr, byddwn ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r safonau ar gyfer deisebau. Os felly, byddwn ni’n ei chyhoeddi. Mae hyn fel arfer yn cymryd hyd at wythnos ond bydd yn cymryd ychydig mwy o amser nag arfer i ni dros gyfnod y Pasg. Byddwn ni’n gwirio'ch deiseb cyn gynted ag y gallwn. + + Diolch,
 + Tîm Deisebau + Y Senedd
 + + --- + + Rydw i wedi creu deiseb – a wnewch chi ei llofnodi? + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + Fy neiseb I: + + # ((action)) + + ((content)) + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) diff --git a/spec/fixtures/notify/f10ca6dd-4f07-479c-a588-a3abbafe2c55.yml b/spec/fixtures/notify/f10ca6dd-4f07-479c-a588-a3abbafe2c55.yml new file mode 100644 index 000000000..56d38fe8f --- /dev/null +++ b/spec/fixtures/notify/f10ca6dd-4f07-479c-a588-a3abbafe2c55.yml @@ -0,0 +1,33 @@ +id: "f10ca6dd-4f07-479c-a588-a3abbafe2c55" +name: "petition_and_email_confirmation_for_sponsor_cy" +subject: "Cadarnhewch eich cyfeiriad e-bost | Please confirm your email address" +body: |- + Cliciwch ar y linc i lofnodi’r ddeiseb: + ((url_cy)) + + Deiseb ((creator)) + + # ((action)) + + ((content)) + + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Click this link to sign the petition: + ((url_en)) + + ((creator))’s petition: + + # ((action)) + + ((content)) + + + Thanks, + The Petitions team + Senedd diff --git a/spec/fixtures/notify/f6ea7df0-9cb1-4895-941a-183ddd0e79db.yml b/spec/fixtures/notify/f6ea7df0-9cb1-4895-941a-183ddd0e79db.yml new file mode 100644 index 000000000..aef373f0d --- /dev/null +++ b/spec/fixtures/notify/f6ea7df0-9cb1-4895-941a-183ddd0e79db.yml @@ -0,0 +1,35 @@ +id: "f6ea7df0-9cb1-4895-941a-183ddd0e79db" +name: "sponsor_signed_email_on_threshold_christmas_en" +subject: "We’re checking your petition | Rydym yn gwirio'ch deiseb" +body: |- + Dear ((creator)), + + Your petition is nearly ready to go. + + ((sponsor)) supported your petition – “((action))”. + + ((moderation_threshold)) people have supported your petition. We’re checking your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less but over the Christmas period it will take us a little longer than usual. We’ll check your petition as quickly as we can. + + Find out how we check petitions before we publish them: + ((url_en)) + + Thanks, + The Petitions team + Senedd + + --- + + Annwyl ((creator)), + + Mae eich deiseb bron yn barod. + + Cefnogodd ((sponsor)) eich deiseb - “((action))”. + + Mae ((moderation_threshold)) berson wedi cefnogi eich deiseb. Rydym ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos ond bydd yn cymryd ychydig mwy o amser nag arfer i ni dros gyfnod y Nadolig. Byddwn ni’n gwirio'ch deiseb cyn gynted ag y gallwn. + + Dyma wybodaeth am sut rydym ni’n gwirio deisebau cyn eu cyhoeddi: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd diff --git a/spec/fixtures/notify/f7965a34-6f8e-4aa3-97fe-51e8f465d264.yml b/spec/fixtures/notify/f7965a34-6f8e-4aa3-97fe-51e8f465d264.yml new file mode 100644 index 000000000..2269d1bd1 --- /dev/null +++ b/spec/fixtures/notify/f7965a34-6f8e-4aa3-97fe-51e8f465d264.yml @@ -0,0 +1,65 @@ +id: "f7965a34-6f8e-4aa3-97fe-51e8f465d264" +name: "gather_sponsors_for_petition_christmas_en" +subject: "Action required: Petition “((action))” | Cam i'w gymryd: Deiseb “((action))”" +body: |- + Dear ((creator)), + + You’re not done yet! + + Forward the email below to your potential supporters. + + ((moderation_threshold)) people need to click the link and confirm their support for us to publish your petition. + + Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition criteria. If it does we’ll publish it and let you know. This usually takes a week or less but over the Christmas period it will take us a little longer than usual. We’ll check your petition as quickly as we can. + + Thanks,
 + The Petitions team + Senedd + + --- + + I’ve made a petition – will you sign it? + + Click this link to sign the petition:
 + ((url_en)) + + My petition: + + # ((action)) + + ((content)) + + Click this link to sign the petition: + ((url_en)) + + --- + + Annwyl ((creator)), + + Dydych chi ddim wedi gorffen eto! + + Anfonwch y neges e-bost isod ymlaen at eich darpar gefnogwyr. + + Mae angen I ((moderation_threshold)) berson glicio ar y linc a chadarnhau eu cefnogaeth er mwyn i ni gyhoeddi eich deiseb. + + Ar ôl i chi sicrhau’r nifer ofynnol o gefnogwyr, byddwn ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos ond bydd yn cymryd ychydig mwy o amser nag arfer i ni dros gyfnod y Nadolig. Byddwn ni’n gwirio'ch deiseb cyn gynted ag y gallwn. + + Diolch,
 + Tîm Deisebau + Y Senedd
 + + --- + + Rydw i wedi creu deiseb – a wnewch chi ei llofnodi? + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + Fy neiseb I: + + # ((action)) + + ((content)) + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) diff --git a/spec/fixtures/notify/fb8c5cee-8fb1-46f3-8818-58f3c4311c2b.yml b/spec/fixtures/notify/fb8c5cee-8fb1-46f3-8818-58f3c4311c2b.yml new file mode 100644 index 000000000..954de049b --- /dev/null +++ b/spec/fixtures/notify/fb8c5cee-8fb1-46f3-8818-58f3c4311c2b.yml @@ -0,0 +1,65 @@ +id: "fb8c5cee-8fb1-46f3-8818-58f3c4311c2b" +name: "gather_sponsors_for_petition_moderation_delay_cy" +subject: "Cam i'w gymryd: Deiseb “((action))” | Action required: Petition “((action))”" +body: |- + Annwyl ((creator)), + + Dydych chi ddim wedi gorffen eto! + + Anfonwch y neges e-bost isod ymlaen at eich darpar gefnogwyr. + + Mae angen I ((moderation_threshold)) berson glicio ar y linc a chadarnhau eu cefnogaeth er mwyn i ni gyhoeddi eich deiseb. + + Ar ôl i chi sicrhau’r nifer ofynnol o gefnogwyr, byddwn ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos, ond mae gennym ni nifer fawr iawn o ddeisebau i'w gwirio ar hyn o bryd felly mae'n debygol o gymryd mwy o amser. Diolch i chi am eich amynedd. + + Diolch,
 + Tîm Deisebau + Y Senedd
 + + --- + + Rydw i wedi creu deiseb – a wnewch chi ei llofnodi? + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + Fy neiseb I: + + # ((action)) + + ((content)) + + Cliciwch ar y linc i lofnodi’r ddeiseb:
 + ((url_cy)) + + --- + + Dear ((creator)), + + You’re not done yet! + + Forward the email below to your potential supporters. + + ((moderation_threshold)) people need to click the link and confirm their support for us to publish your petition. + + Once you’ve gained the required number of supporters, we’ll check your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less, however we have a very large number to check at the moment so it is likely to take longer. Thank you for your patience. + + Thanks,
 + The Petitions team + Senedd + + --- + + I’ve made a petition – will you sign it? + + Click this link to sign the petition:
 + ((url_en)) + + My petition: + + # ((action)) + + ((content)) + + Click this link to sign the petition: + ((url_en)) diff --git a/spec/fixtures/notify/fdc05cf0-81d1-4a28-933c-65b8e10666dd.yml b/spec/fixtures/notify/fdc05cf0-81d1-4a28-933c-65b8e10666dd.yml new file mode 100644 index 000000000..63ab2a9ad --- /dev/null +++ b/spec/fixtures/notify/fdc05cf0-81d1-4a28-933c-65b8e10666dd.yml @@ -0,0 +1,33 @@ +id: "fdc05cf0-81d1-4a28-933c-65b8e10666dd" +name: "email_signer_about_other_business_en" +subject: "((subject_en)) | ((subject_cy))" +body: |- + Dear ((name)), + + You recently signed the petition “((action_en))”: + ((petition_url_en)) + + ((body_en)) + + Thanks, + The Petitions team + Senedd + + You’re receiving this email because you signed this petition: “((action_en))”. + To unsubscribe from getting emails about this petition: ((unsubscribe_url_en)) + + --- + + Annwyl ((name)), + + Yn ddiweddar gwnaethoch lofnodi'r ddeiseb “((action_cy))”: + ((petition_url_cy)) + + ((body_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + Rydych chi'n derbyn yr e-bost hwn oherwydd i chi lofnodi'r ddeiseb hon: “((action_cy))”. + Dad-danysgrifio rhag cael negeseuon e-bost am y ddeiseb hon: ((unsubscribe_url_cy)) diff --git a/spec/fixtures/notify/fffa81d1-0625-44a1-af7b-780dd27a7719.yml b/spec/fixtures/notify/fffa81d1-0625-44a1-af7b-780dd27a7719.yml new file mode 100644 index 000000000..ccce00183 --- /dev/null +++ b/spec/fixtures/notify/fffa81d1-0625-44a1-af7b-780dd27a7719.yml @@ -0,0 +1,35 @@ +id: "fffa81d1-0625-44a1-af7b-780dd27a7719" +name: "sponsor_signed_email_on_threshold_easter_cy" +subject: "Rydym yn gwirio'ch deiseb | We’re checking your petition" +body: |- + Annwyl ((creator)), + + Mae eich deiseb bron yn barod. + + Cefnogodd ((sponsor)) eich deiseb - “((action))”. + + Mae ((moderation_threshold)) berson wedi cefnogi eich deiseb. Rydym ni’n gwirio'ch deiseb i sicrhau ei bod yn bodloni’r meini prawf ar gyfer deisebau. Os felly, byddwn ni’n cyhoeddi’r ddeiseb ac yn rhoi gwybod i chi. Mae hyn fel arfer yn cymryd hyd at wythnos ond bydd yn cymryd ychydig mwy o amser nag arfer i ni dros gyfnod y Pasg. Byddwn ni’n gwirio'ch deiseb cyn gynted ag y gallwn. + + Dyma wybodaeth am sut rydym ni’n gwirio deisebau cyn eu cyhoeddi: + ((url_cy)) + + Diolch, + Tîm Deisebau + Y Senedd + + --- + + Dear ((creator)), + + Your petition is nearly ready to go. + + ((sponsor)) supported your petition – “((action))”. + + ((moderation_threshold)) people have supported your petition. We’re checking your petition to make sure it meets the petition criteria. If it does, we’ll publish it and let you know. This usually takes a week or less but over the Easter period it will take us a little longer than usual. We’ll check your petition as quickly as we can. + + Find out how we check petitions before we publish them: + ((url_en)) + + Thanks, + The Petitions team + Senedd diff --git a/spec/support/notify.rb b/spec/support/notify.rb new file mode 100644 index 000000000..334c8cd48 --- /dev/null +++ b/spec/support/notify.rb @@ -0,0 +1,9 @@ +require "notify_mock" + +RSpec.configure do |config| + config.before(:each) do |example| + unless example.metadata[:notify] == false + stub_request(:post, NotifyMock.url).to_rack(NotifyMock.app) + end + end +end