does not collapse height
+ }
+ }
+ }
+ });
+}
+
+export function checklistSyntax(elem, postDecorator) {
+ const boxes = [...elem.getElementsByClassName("chcklst-box")];
+ addUlClasses(boxes);
+
+ if (!postDecorator) {
+ return;
+ }
+
+ const postWidget = postDecorator.widget;
+ const postModel = postDecorator.getModel();
+
+ if (!postModel.can_edit) {
+ return;
+ }
+
+ boxes.forEach((val, idx) => {
+ val.onclick = function (ev) {
+ const box = ev.currentTarget;
+ const classList = box.classList;
+
+ if (classList.contains("permanent") || classList.contains("readonly")) {
+ return;
+ }
+
+ const newValue = classList.contains("checked") ? "[ ]" : "[x]";
+ const template = document.createElement("template");
+
+ template.innerHTML = iconHTML("spinner", { class: "fa-spin" });
+ box.insertAdjacentElement("afterend", template.content.firstChild);
+ box.classList.add("hidden");
+ boxes.forEach((e) => e.classList.add("readonly"));
+
+ ajax(`/posts/${postModel.id}`, { type: "GET", cache: false })
+ .then((result) => {
+ const blocks = [];
+
+ // Computing offsets where checkbox are not evaluated (i.e. inside
+ // code blocks).
+ [
+ // inline code
+ /`[^`\n]*\n?[^`\n]*`/gm,
+ // multi-line code
+ /^```[^]*?^```/gm,
+ // bbcode
+ /\[code\][^]*?\[\/code\]/gm,
+ // italic/bold
+ /_(?=\S).*?\S_/gm,
+ // strikethrough
+ /~~(?=\S).*?\S~~/gm,
+ ].forEach((regex) => {
+ let match;
+ while ((match = regex.exec(result.raw)) != null) {
+ blocks.push([match.index, match.index + match[0].length]);
+ }
+ });
+
+ [
+ // italic/bold
+ /([^\[\n]|^)\*\S.+?\S\*(?=[^\]\n]|$)/gm,
+ ].forEach((regex) => {
+ let match;
+ while ((match = regex.exec(result.raw)) != null) {
+ // Simulate lookbehind - skip the first character
+ blocks.push([match.index + 1, match.index + match[0].length]);
+ }
+ });
+
+ // make the first run go to index = 0
+ let nth = -1;
+ let found = false;
+ const newRaw = result.raw.replace(
+ /\[(\s|\_|\-|\x|\\?\*)?\]/gi,
+ (match, ignored, off) => {
+ if (found) {
+ return match;
+ }
+
+ nth += blocks.every(
+ (b) => b[0] >= off + match.length || off > b[1]
+ );
+
+ if (nth === idx) {
+ found = true; // Do not replace any further matches
+ return newValue;
+ }
+
+ return match;
+ }
+ );
+
+ const save = postModel.save({
+ raw: newRaw,
+ edit_reason: I18n.t("checklist.edit_reason"),
+ });
+
+ if (save && save.then) {
+ save
+ .then(() => {
+ postWidget.attrs.isSaving = false;
+ postWidget.scheduleRerender();
+ })
+ .finally(() => removeReadonlyClass(boxes));
+ } else {
+ removeReadonlyClass(boxes);
+ }
+ })
+ .catch(() => removeReadonlyClass(boxes));
+ };
+ });
+}
+
+export default {
+ name: "checklist",
+ initialize: function () {
+ withPluginApi("0.1", (api) => initializePlugin(api));
+ },
+};
diff --git a/plugins/checklist/assets/javascripts/lib/discourse-markdown/checklist.js b/plugins/checklist/assets/javascripts/lib/discourse-markdown/checklist.js
new file mode 100644
index 00000000000..8009f2b3019
--- /dev/null
+++ b/plugins/checklist/assets/javascripts/lib/discourse-markdown/checklist.js
@@ -0,0 +1,104 @@
+const REGEX = /\[(\s?|x|X)\]/g;
+
+function getClasses(str) {
+ switch (str) {
+ case "x":
+ return "checked fa fa-check-square-o fa-fw";
+ case "X":
+ return "checked permanent fa fa-check-square fa-fw";
+ default:
+ return "fa fa-square-o fa-fw";
+ }
+}
+
+function addCheckbox(result, content, match, state) {
+ const classes = getClasses(match[1]);
+
+ const checkOpenToken = new state.Token("check_open", "span", 1);
+ checkOpenToken.attrs = [["class", `chcklst-box ${classes}`]];
+ result.push(checkOpenToken);
+
+ const checkCloseToken = new state.Token("check_close", "span", -1);
+ result.push(checkCloseToken);
+}
+
+function applyCheckboxes(content, state) {
+ let match;
+ let result = null;
+ let pos = 0;
+
+ while ((match = REGEX.exec(content))) {
+ if (match.index > pos) {
+ result = result || [];
+ const token = new state.Token("text", "", 0);
+ token.content = content.slice(pos, match.index);
+ result.push(token);
+ }
+
+ pos = match.index + match[0].length;
+
+ result = result || [];
+ addCheckbox(result, content, match, state);
+ }
+
+ if (result && pos < content.length) {
+ const token = new state.Token("text", "", 0);
+ token.content = content.slice(pos);
+ result.push(token);
+ }
+
+ return result;
+}
+
+function processChecklist(state) {
+ let i,
+ j,
+ l,
+ tokens,
+ token,
+ blockTokens = state.tokens,
+ nesting = 0;
+
+ for (j = 0, l = blockTokens.length; j < l; j++) {
+ if (blockTokens[j].type !== "inline") {
+ continue;
+ }
+ tokens = blockTokens[j].children;
+
+ // We scan from the end, to keep position when new tags are added.
+ // Use reversed logic in links start/end match
+ for (i = tokens.length - 1; i >= 0; i--) {
+ token = tokens[i];
+
+ nesting += token.nesting;
+
+ if (token.type === "text" && nesting === 0) {
+ const processed = applyCheckboxes(token.content, state);
+ if (processed) {
+ blockTokens[j].children = tokens = state.md.utils.arrayReplaceAt(
+ tokens,
+ i,
+ processed
+ );
+ }
+ }
+ }
+ }
+}
+
+export function setup(helper) {
+ helper.registerOptions((opts, siteSettings) => {
+ opts.features["checklist"] = !!siteSettings.checklist_enabled;
+ });
+
+ helper.allowList([
+ "span.chcklst-stroked",
+ "span.chcklst-box fa fa-square-o fa-fw",
+ "span.chcklst-box checked fa fa-check-square-o fa-fw",
+ "span.chcklst-box checked permanent fa fa-check-square fa-fw",
+ ]);
+
+ helper.registerPlugin((md) =>
+ md.core.ruler.push("checklist", processChecklist)
+ );
+}
diff --git a/plugins/checklist/assets/stylesheets/checklist.scss b/plugins/checklist/assets/stylesheets/checklist.scss
new file mode 100644
index 00000000000..8865617a3d9
--- /dev/null
+++ b/plugins/checklist/assets/stylesheets/checklist.scss
@@ -0,0 +1,92 @@
+span.chcklst-stroked {
+ text-decoration: line-through;
+}
+
+@mixin checklist-svg-icon($svg) {
+ &:before {
+ background-color: var(--primary);
+ content: "";
+ -webkit-mask: svg-uri(
+ ''
+ )
+ no-repeat 50% 50%;
+ mask: svg-uri(
+ ''
+ )
+ no-repeat 50% 50%;
+ -webkit-mask-size: cover;
+ mask-size: cover;
+ width: 1em;
+ height: 1em;
+ }
+}
+
+span.chcklst-box {
+ cursor: pointer;
+
+ &:before {
+ display: inline-block;
+ vertical-align: middle;
+ }
+
+ &:not(.checked) {
+ &.fa-square-o {
+ @include checklist-svg-icon(
+ "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z"
+ );
+ }
+ &.fa-square {
+ @include checklist-svg-icon(
+ "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"
+ );
+ }
+ }
+
+ &.checked {
+ @include checklist-svg-icon(
+ "M400 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zm-204.686-98.059l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.248-16.379-6.249-22.628 0L184 302.745l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.25 16.379 6.25 22.628.001z"
+ );
+
+ &.fa-check-square-o {
+ @include checklist-svg-icon(
+ "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm0 400H48V80h352v352zm-35.864-241.724L191.547 361.48c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z"
+ );
+ }
+ }
+
+ &.readonly {
+ pointer-events: none;
+ }
+
+ &.hidden {
+ display: none;
+ }
+}
+
+ul li.has-checkbox {
+ list-style-type: none;
+ position: relative;
+
+ .list-item-checkbox {
+ position: absolute;
+ left: -1.2em;
+ }
+}
+
+.fa-spin {
+ display: inline-block;
+ vertical-align: middle;
+ margin-bottom: 0.25em;
+ animation: fa-spin 2s infinite linear;
+ width: 14px;
+ height: 17px;
+}
+
+@keyframes fa-spin {
+ 0% {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(1turn);
+ }
+}
diff --git a/plugins/checklist/config/locales/client.ar.yml b/plugins/checklist/config/locales/client.ar.yml
new file mode 100644
index 00000000000..edcaae58f08
--- /dev/null
+++ b/plugins/checklist/config/locales/client.ar.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ar:
+ js:
+ checklist:
+ edit_reason: "تغيير قائمة التحقُّق"
diff --git a/plugins/checklist/config/locales/client.be.yml b/plugins/checklist/config/locales/client.be.yml
new file mode 100644
index 00000000000..2ea77a0d350
--- /dev/null
+++ b/plugins/checklist/config/locales/client.be.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+be:
diff --git a/plugins/checklist/config/locales/client.bg.yml b/plugins/checklist/config/locales/client.bg.yml
new file mode 100644
index 00000000000..52333529d3c
--- /dev/null
+++ b/plugins/checklist/config/locales/client.bg.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+bg:
diff --git a/plugins/checklist/config/locales/client.bs_BA.yml b/plugins/checklist/config/locales/client.bs_BA.yml
new file mode 100644
index 00000000000..828a7e65af8
--- /dev/null
+++ b/plugins/checklist/config/locales/client.bs_BA.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+bs_BA:
diff --git a/plugins/checklist/config/locales/client.ca.yml b/plugins/checklist/config/locales/client.ca.yml
new file mode 100644
index 00000000000..e1b0406ab88
--- /dev/null
+++ b/plugins/checklist/config/locales/client.ca.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ca:
+ js:
+ checklist:
+ edit_reason: "canvi de llista de verificació"
diff --git a/plugins/checklist/config/locales/client.cs.yml b/plugins/checklist/config/locales/client.cs.yml
new file mode 100644
index 00000000000..041b2f0bd05
--- /dev/null
+++ b/plugins/checklist/config/locales/client.cs.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+cs:
diff --git a/plugins/checklist/config/locales/client.da.yml b/plugins/checklist/config/locales/client.da.yml
new file mode 100644
index 00000000000..6b2cf203663
--- /dev/null
+++ b/plugins/checklist/config/locales/client.da.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+da:
+ js:
+ checklist:
+ edit_reason: "ændring i tjekliste"
diff --git a/plugins/checklist/config/locales/client.de.yml b/plugins/checklist/config/locales/client.de.yml
new file mode 100644
index 00000000000..82ab84bec6a
--- /dev/null
+++ b/plugins/checklist/config/locales/client.de.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+de:
+ js:
+ checklist:
+ edit_reason: "Checklisten-Änderung"
diff --git a/plugins/checklist/config/locales/client.el.yml b/plugins/checklist/config/locales/client.el.yml
new file mode 100644
index 00000000000..d872d0ecc40
--- /dev/null
+++ b/plugins/checklist/config/locales/client.el.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+el:
diff --git a/plugins/checklist/config/locales/client.en.yml b/plugins/checklist/config/locales/client.en.yml
new file mode 100644
index 00000000000..16ffdac7289
--- /dev/null
+++ b/plugins/checklist/config/locales/client.en.yml
@@ -0,0 +1,4 @@
+en:
+ js:
+ checklist:
+ edit_reason: "checklist change"
diff --git a/plugins/checklist/config/locales/client.en_GB.yml b/plugins/checklist/config/locales/client.en_GB.yml
new file mode 100644
index 00000000000..2d4fa180ec7
--- /dev/null
+++ b/plugins/checklist/config/locales/client.en_GB.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+en_GB:
diff --git a/plugins/checklist/config/locales/client.es.yml b/plugins/checklist/config/locales/client.es.yml
new file mode 100644
index 00000000000..d7e0c306e68
--- /dev/null
+++ b/plugins/checklist/config/locales/client.es.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+es:
+ js:
+ checklist:
+ edit_reason: "cambio de lista de verificación"
diff --git a/plugins/checklist/config/locales/client.et.yml b/plugins/checklist/config/locales/client.et.yml
new file mode 100644
index 00000000000..0ea0b6d554b
--- /dev/null
+++ b/plugins/checklist/config/locales/client.et.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+et:
diff --git a/plugins/checklist/config/locales/client.fa_IR.yml b/plugins/checklist/config/locales/client.fa_IR.yml
new file mode 100644
index 00000000000..56512089fb5
--- /dev/null
+++ b/plugins/checklist/config/locales/client.fa_IR.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+fa_IR:
diff --git a/plugins/checklist/config/locales/client.fi.yml b/plugins/checklist/config/locales/client.fi.yml
new file mode 100644
index 00000000000..39412199ca0
--- /dev/null
+++ b/plugins/checklist/config/locales/client.fi.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+fi:
+ js:
+ checklist:
+ edit_reason: "tarkistuslistan muutos"
diff --git a/plugins/checklist/config/locales/client.fr.yml b/plugins/checklist/config/locales/client.fr.yml
new file mode 100644
index 00000000000..550c7296f53
--- /dev/null
+++ b/plugins/checklist/config/locales/client.fr.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+fr:
+ js:
+ checklist:
+ edit_reason: "modification de la lise de contrôle"
diff --git a/plugins/checklist/config/locales/client.gl.yml b/plugins/checklist/config/locales/client.gl.yml
new file mode 100644
index 00000000000..8f2c9970e65
--- /dev/null
+++ b/plugins/checklist/config/locales/client.gl.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+gl:
+ js:
+ checklist:
+ edit_reason: "cambio da lista de verificación"
diff --git a/plugins/checklist/config/locales/client.he.yml b/plugins/checklist/config/locales/client.he.yml
new file mode 100644
index 00000000000..c4842996377
--- /dev/null
+++ b/plugins/checklist/config/locales/client.he.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+he:
+ js:
+ checklist:
+ edit_reason: "שינוי ברשימת המטלות"
diff --git a/plugins/checklist/config/locales/client.hr.yml b/plugins/checklist/config/locales/client.hr.yml
new file mode 100644
index 00000000000..5eb82fd776c
--- /dev/null
+++ b/plugins/checklist/config/locales/client.hr.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+hr:
+ js:
+ checklist:
+ edit_reason: "promijeni spisak"
diff --git a/plugins/checklist/config/locales/client.hu.yml b/plugins/checklist/config/locales/client.hu.yml
new file mode 100644
index 00000000000..76b6e9d8bcb
--- /dev/null
+++ b/plugins/checklist/config/locales/client.hu.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+hu:
diff --git a/plugins/checklist/config/locales/client.hy.yml b/plugins/checklist/config/locales/client.hy.yml
new file mode 100644
index 00000000000..09a0b1d238b
--- /dev/null
+++ b/plugins/checklist/config/locales/client.hy.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+hy:
+ js:
+ checklist:
+ edit_reason: "Ստուգման ցանկի փոփոխություն"
diff --git a/plugins/checklist/config/locales/client.id.yml b/plugins/checklist/config/locales/client.id.yml
new file mode 100644
index 00000000000..fae85a1d5b8
--- /dev/null
+++ b/plugins/checklist/config/locales/client.id.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+id:
+ js:
+ checklist:
+ edit_reason: "perubahan daftar centang"
diff --git a/plugins/checklist/config/locales/client.it.yml b/plugins/checklist/config/locales/client.it.yml
new file mode 100644
index 00000000000..d329f0dbe7b
--- /dev/null
+++ b/plugins/checklist/config/locales/client.it.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+it:
+ js:
+ checklist:
+ edit_reason: "modifica alla checklist"
diff --git a/plugins/checklist/config/locales/client.ja.yml b/plugins/checklist/config/locales/client.ja.yml
new file mode 100644
index 00000000000..739ab415c67
--- /dev/null
+++ b/plugins/checklist/config/locales/client.ja.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ja:
+ js:
+ checklist:
+ edit_reason: "チェックリストの変更"
diff --git a/plugins/checklist/config/locales/client.ko.yml b/plugins/checklist/config/locales/client.ko.yml
new file mode 100644
index 00000000000..c39cdeaf60b
--- /dev/null
+++ b/plugins/checklist/config/locales/client.ko.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ko:
+ js:
+ checklist:
+ edit_reason: "체크리스트 변경"
diff --git a/plugins/checklist/config/locales/client.lt.yml b/plugins/checklist/config/locales/client.lt.yml
new file mode 100644
index 00000000000..16bb19758dc
--- /dev/null
+++ b/plugins/checklist/config/locales/client.lt.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+lt:
diff --git a/plugins/checklist/config/locales/client.lv.yml b/plugins/checklist/config/locales/client.lv.yml
new file mode 100644
index 00000000000..59e0ef6f4ed
--- /dev/null
+++ b/plugins/checklist/config/locales/client.lv.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+lv:
diff --git a/plugins/checklist/config/locales/client.nb_NO.yml b/plugins/checklist/config/locales/client.nb_NO.yml
new file mode 100644
index 00000000000..2e2224d1472
--- /dev/null
+++ b/plugins/checklist/config/locales/client.nb_NO.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+nb_NO:
diff --git a/plugins/checklist/config/locales/client.nl.yml b/plugins/checklist/config/locales/client.nl.yml
new file mode 100644
index 00000000000..83863b31099
--- /dev/null
+++ b/plugins/checklist/config/locales/client.nl.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+nl:
+ js:
+ checklist:
+ edit_reason: "checklist gewijzigd"
diff --git a/plugins/checklist/config/locales/client.pl_PL.yml b/plugins/checklist/config/locales/client.pl_PL.yml
new file mode 100644
index 00000000000..86913bfadce
--- /dev/null
+++ b/plugins/checklist/config/locales/client.pl_PL.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+pl_PL:
+ js:
+ checklist:
+ edit_reason: "zmiana checklisty"
diff --git a/plugins/checklist/config/locales/client.pt.yml b/plugins/checklist/config/locales/client.pt.yml
new file mode 100644
index 00000000000..7ac33b05863
--- /dev/null
+++ b/plugins/checklist/config/locales/client.pt.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+pt:
+ js:
+ checklist:
+ edit_reason: "alteração da lista de verificação"
diff --git a/plugins/checklist/config/locales/client.pt_BR.yml b/plugins/checklist/config/locales/client.pt_BR.yml
new file mode 100644
index 00000000000..75eefc5331b
--- /dev/null
+++ b/plugins/checklist/config/locales/client.pt_BR.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+pt_BR:
+ js:
+ checklist:
+ edit_reason: "mudança de lista de verificação"
diff --git a/plugins/checklist/config/locales/client.ro.yml b/plugins/checklist/config/locales/client.ro.yml
new file mode 100644
index 00000000000..08a77f812ee
--- /dev/null
+++ b/plugins/checklist/config/locales/client.ro.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ro:
diff --git a/plugins/checklist/config/locales/client.ru.yml b/plugins/checklist/config/locales/client.ru.yml
new file mode 100644
index 00000000000..ca0ec20e3f8
--- /dev/null
+++ b/plugins/checklist/config/locales/client.ru.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ru:
+ js:
+ checklist:
+ edit_reason: "изменение перечня "
diff --git a/plugins/checklist/config/locales/client.sk.yml b/plugins/checklist/config/locales/client.sk.yml
new file mode 100644
index 00000000000..6f815624081
--- /dev/null
+++ b/plugins/checklist/config/locales/client.sk.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sk:
diff --git a/plugins/checklist/config/locales/client.sl.yml b/plugins/checklist/config/locales/client.sl.yml
new file mode 100644
index 00000000000..cfc32ac9866
--- /dev/null
+++ b/plugins/checklist/config/locales/client.sl.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sl:
+ js:
+ checklist:
+ edit_reason: "sprememba kontrolnega seznama"
diff --git a/plugins/checklist/config/locales/client.sq.yml b/plugins/checklist/config/locales/client.sq.yml
new file mode 100644
index 00000000000..7f051b7a7cf
--- /dev/null
+++ b/plugins/checklist/config/locales/client.sq.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sq:
diff --git a/plugins/checklist/config/locales/client.sr.yml b/plugins/checklist/config/locales/client.sr.yml
new file mode 100644
index 00000000000..88d63d6ae1a
--- /dev/null
+++ b/plugins/checklist/config/locales/client.sr.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sr:
diff --git a/plugins/checklist/config/locales/client.sv.yml b/plugins/checklist/config/locales/client.sv.yml
new file mode 100644
index 00000000000..5cd7e244478
--- /dev/null
+++ b/plugins/checklist/config/locales/client.sv.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sv:
+ js:
+ checklist:
+ edit_reason: "ändring av checklista"
diff --git a/plugins/checklist/config/locales/client.sw.yml b/plugins/checklist/config/locales/client.sw.yml
new file mode 100644
index 00000000000..0d7cdd075bf
--- /dev/null
+++ b/plugins/checklist/config/locales/client.sw.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sw:
diff --git a/plugins/checklist/config/locales/client.te.yml b/plugins/checklist/config/locales/client.te.yml
new file mode 100644
index 00000000000..03967bdbb07
--- /dev/null
+++ b/plugins/checklist/config/locales/client.te.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+te:
diff --git a/plugins/checklist/config/locales/client.th.yml b/plugins/checklist/config/locales/client.th.yml
new file mode 100644
index 00000000000..7de85ff91c4
--- /dev/null
+++ b/plugins/checklist/config/locales/client.th.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+th:
diff --git a/plugins/checklist/config/locales/client.tr_TR.yml b/plugins/checklist/config/locales/client.tr_TR.yml
new file mode 100644
index 00000000000..29d0600a66e
--- /dev/null
+++ b/plugins/checklist/config/locales/client.tr_TR.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+tr_TR:
+ js:
+ checklist:
+ edit_reason: "kontrol listesi değişikliği"
diff --git a/plugins/checklist/config/locales/client.uk.yml b/plugins/checklist/config/locales/client.uk.yml
new file mode 100644
index 00000000000..458b9b35828
--- /dev/null
+++ b/plugins/checklist/config/locales/client.uk.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+uk:
+ js:
+ checklist:
+ edit_reason: "зміна чеклиста"
diff --git a/plugins/checklist/config/locales/client.ur.yml b/plugins/checklist/config/locales/client.ur.yml
new file mode 100644
index 00000000000..6e58f15f4aa
--- /dev/null
+++ b/plugins/checklist/config/locales/client.ur.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ur:
+ js:
+ checklist:
+ edit_reason: "چَیک لِسٹ میں تبدیلی"
diff --git a/plugins/checklist/config/locales/client.vi.yml b/plugins/checklist/config/locales/client.vi.yml
new file mode 100644
index 00000000000..f629dcf5329
--- /dev/null
+++ b/plugins/checklist/config/locales/client.vi.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+vi:
diff --git a/plugins/checklist/config/locales/client.zh_CN.yml b/plugins/checklist/config/locales/client.zh_CN.yml
new file mode 100644
index 00000000000..7f05736a9ec
--- /dev/null
+++ b/plugins/checklist/config/locales/client.zh_CN.yml
@@ -0,0 +1,10 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+zh_CN:
+ js:
+ checklist:
+ edit_reason: "核对清单变更"
diff --git a/plugins/checklist/config/locales/client.zh_TW.yml b/plugins/checklist/config/locales/client.zh_TW.yml
new file mode 100644
index 00000000000..7e15fab0018
--- /dev/null
+++ b/plugins/checklist/config/locales/client.zh_TW.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+zh_TW:
diff --git a/plugins/checklist/config/locales/server.ar.yml b/plugins/checklist/config/locales/server.ar.yml
new file mode 100644
index 00000000000..1b55b4f088b
--- /dev/null
+++ b/plugins/checklist/config/locales/server.ar.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ar:
+ site_settings:
+ checklist_enabled: 'هل تريد تفعيل المكوِّن الإضافي لقائمة التحقُّق؟'
diff --git a/plugins/checklist/config/locales/server.be.yml b/plugins/checklist/config/locales/server.be.yml
new file mode 100644
index 00000000000..2ea77a0d350
--- /dev/null
+++ b/plugins/checklist/config/locales/server.be.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+be:
diff --git a/plugins/checklist/config/locales/server.bg.yml b/plugins/checklist/config/locales/server.bg.yml
new file mode 100644
index 00000000000..52333529d3c
--- /dev/null
+++ b/plugins/checklist/config/locales/server.bg.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+bg:
diff --git a/plugins/checklist/config/locales/server.bs_BA.yml b/plugins/checklist/config/locales/server.bs_BA.yml
new file mode 100644
index 00000000000..828a7e65af8
--- /dev/null
+++ b/plugins/checklist/config/locales/server.bs_BA.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+bs_BA:
diff --git a/plugins/checklist/config/locales/server.ca.yml b/plugins/checklist/config/locales/server.ca.yml
new file mode 100644
index 00000000000..237e75f5966
--- /dev/null
+++ b/plugins/checklist/config/locales/server.ca.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ca:
+ site_settings:
+ checklist_enabled: 'Voleu activar el connector de llista de verificació?'
diff --git a/plugins/checklist/config/locales/server.cs.yml b/plugins/checklist/config/locales/server.cs.yml
new file mode 100644
index 00000000000..7603a74cbb9
--- /dev/null
+++ b/plugins/checklist/config/locales/server.cs.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+cs:
+ site_settings:
+ checklist_enabled: 'Zapnout checklist plugin?'
diff --git a/plugins/checklist/config/locales/server.da.yml b/plugins/checklist/config/locales/server.da.yml
new file mode 100644
index 00000000000..9dc61eb176a
--- /dev/null
+++ b/plugins/checklist/config/locales/server.da.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+da:
+ site_settings:
+ checklist_enabled: 'Vil du aktivere checklist plugin?'
diff --git a/plugins/checklist/config/locales/server.de.yml b/plugins/checklist/config/locales/server.de.yml
new file mode 100644
index 00000000000..db98c7fbade
--- /dev/null
+++ b/plugins/checklist/config/locales/server.de.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+de:
+ site_settings:
+ checklist_enabled: 'Checklisten-Plug-in aktivieren?'
diff --git a/plugins/checklist/config/locales/server.el.yml b/plugins/checklist/config/locales/server.el.yml
new file mode 100644
index 00000000000..d872d0ecc40
--- /dev/null
+++ b/plugins/checklist/config/locales/server.el.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+el:
diff --git a/plugins/checklist/config/locales/server.en.yml b/plugins/checklist/config/locales/server.en.yml
new file mode 100644
index 00000000000..7f4318ff521
--- /dev/null
+++ b/plugins/checklist/config/locales/server.en.yml
@@ -0,0 +1,3 @@
+en:
+ site_settings:
+ checklist_enabled: 'Enable checklist plugin?'
\ No newline at end of file
diff --git a/plugins/checklist/config/locales/server.en_GB.yml b/plugins/checklist/config/locales/server.en_GB.yml
new file mode 100644
index 00000000000..2d4fa180ec7
--- /dev/null
+++ b/plugins/checklist/config/locales/server.en_GB.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+en_GB:
diff --git a/plugins/checklist/config/locales/server.es.yml b/plugins/checklist/config/locales/server.es.yml
new file mode 100644
index 00000000000..687f4d7d3e7
--- /dev/null
+++ b/plugins/checklist/config/locales/server.es.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+es:
+ site_settings:
+ checklist_enabled: '¿Habilitar el complemento de la lista de verificación?'
diff --git a/plugins/checklist/config/locales/server.et.yml b/plugins/checklist/config/locales/server.et.yml
new file mode 100644
index 00000000000..0ea0b6d554b
--- /dev/null
+++ b/plugins/checklist/config/locales/server.et.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+et:
diff --git a/plugins/checklist/config/locales/server.fa_IR.yml b/plugins/checklist/config/locales/server.fa_IR.yml
new file mode 100644
index 00000000000..8718d91b8b5
--- /dev/null
+++ b/plugins/checklist/config/locales/server.fa_IR.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+fa_IR:
+ site_settings:
+ checklist_enabled: 'افزونه لیست چک را فعال کنید؟'
diff --git a/plugins/checklist/config/locales/server.fi.yml b/plugins/checklist/config/locales/server.fi.yml
new file mode 100644
index 00000000000..8f65cf4f47b
--- /dev/null
+++ b/plugins/checklist/config/locales/server.fi.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+fi:
+ site_settings:
+ checklist_enabled: 'Otetaanko tarkistuslistalisäosa käyttöön?'
diff --git a/plugins/checklist/config/locales/server.fr.yml b/plugins/checklist/config/locales/server.fr.yml
new file mode 100644
index 00000000000..96142404c15
--- /dev/null
+++ b/plugins/checklist/config/locales/server.fr.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+fr:
+ site_settings:
+ checklist_enabled: 'Activer l''extension de la liste de contrôle ?'
diff --git a/plugins/checklist/config/locales/server.gl.yml b/plugins/checklist/config/locales/server.gl.yml
new file mode 100644
index 00000000000..477c66b1b54
--- /dev/null
+++ b/plugins/checklist/config/locales/server.gl.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+gl:
+ site_settings:
+ checklist_enabled: 'Queres activar o complemento da lista de verificación?'
diff --git a/plugins/checklist/config/locales/server.he.yml b/plugins/checklist/config/locales/server.he.yml
new file mode 100644
index 00000000000..c2fd3054c58
--- /dev/null
+++ b/plugins/checklist/config/locales/server.he.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+he:
+ site_settings:
+ checklist_enabled: 'הפעלת תוסף רשימת קניות?'
diff --git a/plugins/checklist/config/locales/server.hr.yml b/plugins/checklist/config/locales/server.hr.yml
new file mode 100644
index 00000000000..f67a4e5f091
--- /dev/null
+++ b/plugins/checklist/config/locales/server.hr.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+hr:
+ site_settings:
+ checklist_enabled: 'Uključi dodatak za spisak?'
diff --git a/plugins/checklist/config/locales/server.hu.yml b/plugins/checklist/config/locales/server.hu.yml
new file mode 100644
index 00000000000..bff7789f7d1
--- /dev/null
+++ b/plugins/checklist/config/locales/server.hu.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+hu:
+ site_settings:
+ checklist_enabled: 'Ellenőrzőlista bővítmény engedélyezése?'
diff --git a/plugins/checklist/config/locales/server.hy.yml b/plugins/checklist/config/locales/server.hy.yml
new file mode 100644
index 00000000000..5c95222c3ae
--- /dev/null
+++ b/plugins/checklist/config/locales/server.hy.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+hy:
+ site_settings:
+ checklist_enabled: 'Միացնե՞լ ստուգման ցանկի պլագինը:'
diff --git a/plugins/checklist/config/locales/server.id.yml b/plugins/checklist/config/locales/server.id.yml
new file mode 100644
index 00000000000..50f6e488cf1
--- /dev/null
+++ b/plugins/checklist/config/locales/server.id.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+id:
+ site_settings:
+ checklist_enabled: 'Aktifkan plugin checklist?'
diff --git a/plugins/checklist/config/locales/server.it.yml b/plugins/checklist/config/locales/server.it.yml
new file mode 100644
index 00000000000..15b7a5b2132
--- /dev/null
+++ b/plugins/checklist/config/locales/server.it.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+it:
+ site_settings:
+ checklist_enabled: 'Attivare il plugin checklist?'
diff --git a/plugins/checklist/config/locales/server.ja.yml b/plugins/checklist/config/locales/server.ja.yml
new file mode 100644
index 00000000000..a4a1d20242f
--- /dev/null
+++ b/plugins/checklist/config/locales/server.ja.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ja:
+ site_settings:
+ checklist_enabled: 'チェックリストプラグインを有効にしますか?'
diff --git a/plugins/checklist/config/locales/server.ko.yml b/plugins/checklist/config/locales/server.ko.yml
new file mode 100644
index 00000000000..0b71819866a
--- /dev/null
+++ b/plugins/checklist/config/locales/server.ko.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ko:
+ site_settings:
+ checklist_enabled: '체크리스트 플러그인을 사용 하시겠습니까?'
diff --git a/plugins/checklist/config/locales/server.lt.yml b/plugins/checklist/config/locales/server.lt.yml
new file mode 100644
index 00000000000..16bb19758dc
--- /dev/null
+++ b/plugins/checklist/config/locales/server.lt.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+lt:
diff --git a/plugins/checklist/config/locales/server.lv.yml b/plugins/checklist/config/locales/server.lv.yml
new file mode 100644
index 00000000000..59e0ef6f4ed
--- /dev/null
+++ b/plugins/checklist/config/locales/server.lv.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+lv:
diff --git a/plugins/checklist/config/locales/server.nb_NO.yml b/plugins/checklist/config/locales/server.nb_NO.yml
new file mode 100644
index 00000000000..2e2224d1472
--- /dev/null
+++ b/plugins/checklist/config/locales/server.nb_NO.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+nb_NO:
diff --git a/plugins/checklist/config/locales/server.nl.yml b/plugins/checklist/config/locales/server.nl.yml
new file mode 100644
index 00000000000..d330601505d
--- /dev/null
+++ b/plugins/checklist/config/locales/server.nl.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+nl:
+ site_settings:
+ checklist_enabled: 'Checklistplug-in inschakelen?'
diff --git a/plugins/checklist/config/locales/server.pl_PL.yml b/plugins/checklist/config/locales/server.pl_PL.yml
new file mode 100644
index 00000000000..3123277915e
--- /dev/null
+++ b/plugins/checklist/config/locales/server.pl_PL.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+pl_PL:
+ site_settings:
+ checklist_enabled: 'Włączyć wtyczkę checklist?'
diff --git a/plugins/checklist/config/locales/server.pt.yml b/plugins/checklist/config/locales/server.pt.yml
new file mode 100644
index 00000000000..bfc38925425
--- /dev/null
+++ b/plugins/checklist/config/locales/server.pt.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+pt:
+ site_settings:
+ checklist_enabled: 'Ativar o ''''plug-in'''' da lista de verificação?'
diff --git a/plugins/checklist/config/locales/server.pt_BR.yml b/plugins/checklist/config/locales/server.pt_BR.yml
new file mode 100644
index 00000000000..8534c59130e
--- /dev/null
+++ b/plugins/checklist/config/locales/server.pt_BR.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+pt_BR:
+ site_settings:
+ checklist_enabled: 'Ativar o plugin de lista de verificação?'
diff --git a/plugins/checklist/config/locales/server.ro.yml b/plugins/checklist/config/locales/server.ro.yml
new file mode 100644
index 00000000000..08a77f812ee
--- /dev/null
+++ b/plugins/checklist/config/locales/server.ro.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ro:
diff --git a/plugins/checklist/config/locales/server.ru.yml b/plugins/checklist/config/locales/server.ru.yml
new file mode 100644
index 00000000000..a7b2931844b
--- /dev/null
+++ b/plugins/checklist/config/locales/server.ru.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ru:
+ site_settings:
+ checklist_enabled: 'Включить плагин checklist?'
diff --git a/plugins/checklist/config/locales/server.sk.yml b/plugins/checklist/config/locales/server.sk.yml
new file mode 100644
index 00000000000..6f815624081
--- /dev/null
+++ b/plugins/checklist/config/locales/server.sk.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sk:
diff --git a/plugins/checklist/config/locales/server.sl.yml b/plugins/checklist/config/locales/server.sl.yml
new file mode 100644
index 00000000000..315220d5ecd
--- /dev/null
+++ b/plugins/checklist/config/locales/server.sl.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sl:
+ site_settings:
+ checklist_enabled: 'Omogočite vtičnik kontrolnega seznama?'
diff --git a/plugins/checklist/config/locales/server.sq.yml b/plugins/checklist/config/locales/server.sq.yml
new file mode 100644
index 00000000000..7f051b7a7cf
--- /dev/null
+++ b/plugins/checklist/config/locales/server.sq.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sq:
diff --git a/plugins/checklist/config/locales/server.sr.yml b/plugins/checklist/config/locales/server.sr.yml
new file mode 100644
index 00000000000..88d63d6ae1a
--- /dev/null
+++ b/plugins/checklist/config/locales/server.sr.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sr:
diff --git a/plugins/checklist/config/locales/server.sv.yml b/plugins/checklist/config/locales/server.sv.yml
new file mode 100644
index 00000000000..a412e1ac43e
--- /dev/null
+++ b/plugins/checklist/config/locales/server.sv.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sv:
+ site_settings:
+ checklist_enabled: 'Aktivera tillägg för checklista?'
diff --git a/plugins/checklist/config/locales/server.sw.yml b/plugins/checklist/config/locales/server.sw.yml
new file mode 100644
index 00000000000..0d7cdd075bf
--- /dev/null
+++ b/plugins/checklist/config/locales/server.sw.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+sw:
diff --git a/plugins/checklist/config/locales/server.te.yml b/plugins/checklist/config/locales/server.te.yml
new file mode 100644
index 00000000000..03967bdbb07
--- /dev/null
+++ b/plugins/checklist/config/locales/server.te.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+te:
diff --git a/plugins/checklist/config/locales/server.th.yml b/plugins/checklist/config/locales/server.th.yml
new file mode 100644
index 00000000000..7de85ff91c4
--- /dev/null
+++ b/plugins/checklist/config/locales/server.th.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+th:
diff --git a/plugins/checklist/config/locales/server.tr_TR.yml b/plugins/checklist/config/locales/server.tr_TR.yml
new file mode 100644
index 00000000000..ccf9c4e95bd
--- /dev/null
+++ b/plugins/checklist/config/locales/server.tr_TR.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+tr_TR:
+ site_settings:
+ checklist_enabled: 'Kontrol listesi eklentisi etkinleştirilsin mi?'
diff --git a/plugins/checklist/config/locales/server.uk.yml b/plugins/checklist/config/locales/server.uk.yml
new file mode 100644
index 00000000000..b93dc674a99
--- /dev/null
+++ b/plugins/checklist/config/locales/server.uk.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+uk:
+ site_settings:
+ checklist_enabled: 'Увімкнути плагін відображення списків checklist?'
diff --git a/plugins/checklist/config/locales/server.ur.yml b/plugins/checklist/config/locales/server.ur.yml
new file mode 100644
index 00000000000..617a3ed0c91
--- /dev/null
+++ b/plugins/checklist/config/locales/server.ur.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+ur:
+ site_settings:
+ checklist_enabled: 'چَیک لِسٹ پلگ اِن فعال کریں؟'
diff --git a/plugins/checklist/config/locales/server.vi.yml b/plugins/checklist/config/locales/server.vi.yml
new file mode 100644
index 00000000000..f629dcf5329
--- /dev/null
+++ b/plugins/checklist/config/locales/server.vi.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+vi:
diff --git a/plugins/checklist/config/locales/server.zh_CN.yml b/plugins/checklist/config/locales/server.zh_CN.yml
new file mode 100644
index 00000000000..3e016293f1e
--- /dev/null
+++ b/plugins/checklist/config/locales/server.zh_CN.yml
@@ -0,0 +1,9 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+zh_CN:
+ site_settings:
+ checklist_enabled: '启用清单插件?'
diff --git a/plugins/checklist/config/locales/server.zh_TW.yml b/plugins/checklist/config/locales/server.zh_TW.yml
new file mode 100644
index 00000000000..7e15fab0018
--- /dev/null
+++ b/plugins/checklist/config/locales/server.zh_TW.yml
@@ -0,0 +1,7 @@
+# WARNING: Never edit this file.
+# It will be overwritten when translations are pulled from Crowdin.
+#
+# To work with us on translations, join this project:
+# https://translate.discourse.org/
+
+zh_TW:
diff --git a/plugins/checklist/config/settings.yml b/plugins/checklist/config/settings.yml
new file mode 100644
index 00000000000..748c8f7f120
--- /dev/null
+++ b/plugins/checklist/config/settings.yml
@@ -0,0 +1,4 @@
+plugins:
+ checklist_enabled:
+ default: true
+ client: true
diff --git a/plugins/checklist/lib/checklist_syntax_migrator.rb b/plugins/checklist/lib/checklist_syntax_migrator.rb
new file mode 100644
index 00000000000..a815bcccd3e
--- /dev/null
+++ b/plugins/checklist/lib/checklist_syntax_migrator.rb
@@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+class ChecklistSyntaxMigrator
+ CHECKBOX_REGEX = /^( {0,3})\[(_|-|\*|\\\*)\]/
+ CODE_BLOCK_REGEX = /^ {0,3}```/
+ QUOTE_START_REGEX = /^ {0,3}\[quote/
+ QUOTE_END_REGEX = /^ {0,3}\[\/quote\]/
+
+ def initialize(post)
+ @post = post
+ end
+
+ def update_syntax!
+ lines = @post.raw.split("\n")
+ in_code = false
+ in_quote = false
+ lines.each_with_index do |line, index|
+ if line.match(CODE_BLOCK_REGEX)
+ in_code = !in_code
+ elsif line.match(QUOTE_START_REGEX)
+ in_quote = true
+ elsif line.match(QUOTE_END_REGEX)
+ in_quote = false
+ else
+ next if in_code || in_quote
+
+ lines[index] = line.gsub(CHECKBOX_REGEX) { "#{$1}[x]" }
+ end
+ end
+ new_raw = lines.join("\n")
+
+ return if new_raw == @post.raw
+ @post.raw = new_raw
+ @post.save!
+ end
+end
diff --git a/plugins/checklist/lib/tasks/checklist.rake b/plugins/checklist/lib/tasks/checklist.rake
new file mode 100644
index 00000000000..e48bdce312d
--- /dev/null
+++ b/plugins/checklist/lib/tasks/checklist.rake
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+desc "Convert old style checkbox markdown to new style"
+task "discourse_checklist:migrate_old_syntax" => :environment do |t|
+ puts "Updating checklist syntax on all posts..."
+
+ Post
+ .raw_match("[")
+ .find_each(batch_size: 50) { |post| ChecklistSyntaxMigrator.new(post).update_syntax! }
+
+ puts "", "Done!"
+end
diff --git a/plugins/checklist/plugin.rb b/plugins/checklist/plugin.rb
new file mode 100644
index 00000000000..d3b2f626a93
--- /dev/null
+++ b/plugins/checklist/plugin.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+# name: checklist
+# about: Add checklist support to Discourse
+# version: 1.0
+# authors: Discourse Team
+# url: https://github.com/discourse/discourse/tree/main/plugins/checklist
+
+enabled_site_setting :checklist_enabled
+
+register_asset "stylesheets/checklist.scss"
+
+register_svg_icon "spinner"
+
+after_initialize do
+ ["../lib/checklist_syntax_migrator.rb"].each { |path| load File.expand_path(path, __FILE__) }
+end
diff --git a/plugins/checklist/spec/lib/checklist_syntax_migrator_spec.rb b/plugins/checklist/spec/lib/checklist_syntax_migrator_spec.rb
new file mode 100644
index 00000000000..6d25632d2f8
--- /dev/null
+++ b/plugins/checklist/spec/lib/checklist_syntax_migrator_spec.rb
@@ -0,0 +1,114 @@
+# frozen_string_literal: true
+
+require "rails_helper"
+
+describe ChecklistSyntaxMigrator do
+ before { SiteSetting.allow_uncategorized_topics = true }
+ let(:topic) { Fabricate(:topic) }
+ let(:post_args) { { user: topic.user, topic: topic } }
+
+ def post_with_body(body)
+ args = post_args.merge(raw: body)
+ Fabricate.build(:post, args)
+ end
+
+ it "replaces instances of the old checkbox instance, with the new syntax" do
+ body = "[-] 1\n[_] 2\n[*] 3\n[\\*] 4"
+ post = post_with_body(body)
+
+ ChecklistSyntaxMigrator.new(post).update_syntax!
+
+ expected = "[x] 1\n[x] 2\n[x] 3\n[x] 4"
+ expect(post.reload.raw).to eq(expected)
+ end
+
+ it "does not replace if more than 3 spaces are before a checkbox" do
+ body = " [\*]\n [-]"
+ post = post_with_body(body)
+ post.save
+
+ ChecklistSyntaxMigrator.new(post).update_syntax!
+ expect(post.reload.raw).to eq(body)
+ end
+
+ it "does not replace checkboxes after text" do
+ body = "what about this? [\*]"
+ post = post_with_body(body)
+ post.save
+
+ ChecklistSyntaxMigrator.new(post).update_syntax!
+ expect(post.reload.raw).to eq(body)
+ end
+
+ it "handles each line independently" do
+ body = "[-] replace that, \n this wont be changed! [\*]"
+ post = post_with_body(body)
+
+ ChecklistSyntaxMigrator.new(post).update_syntax!
+
+ expected = "[x] replace that, \n this wont be changed! [\*]"
+ expect(post.reload.raw).to eq(expected)
+ end
+
+ it "allows spaces 0,1,2 and 3 spaces before" do
+ body = "[-] 0 spaces\n [-] 1 space\n [-] 2 spaces\n [-] 3 spaces\n [-] 4 spaces"
+ post = post_with_body(body)
+
+ ChecklistSyntaxMigrator.new(post).update_syntax!
+
+ expected = "[x] 0 spaces\n [x] 1 space\n [x] 2 spaces\n [x] 3 spaces\n [-] 4 spaces"
+ expect(post.reload.raw).to eq(expected)
+ end
+
+ it "does not convert checkboxes in code blocks" do
+ body = [
+ "```",
+ "[\*] This won't be converted",
+ "```",
+ "[\*] That will",
+ "```",
+ "[\*] Again this won't",
+ "```",
+ ].join("\n")
+ post = post_with_body(body)
+
+ ChecklistSyntaxMigrator.new(post).update_syntax!
+
+ expected = [
+ "```",
+ "[\*] This won't be converted",
+ "```",
+ "[x] That will",
+ "```",
+ "[\*] Again this won't",
+ "```",
+ ].join("\n")
+ expect(post.reload.raw).to eq(expected)
+ end
+
+ it "does not convert checkboxes in block quotes" do
+ body = [
+ '[quote="markvanlan, post:10, topic:10"]',
+ "[\*] This won't be converted",
+ "[/quote]",
+ "[\*] That will",
+ '[quote="markvanlan, post:11, topic:10"]',
+ "[\*] Again this won't",
+ "[/quote]",
+ ].join("\n")
+ post = post_with_body(body)
+
+ ChecklistSyntaxMigrator.new(post).update_syntax!
+
+ expected = [
+ '[quote="markvanlan, post:10, topic:10"]',
+ "[\*] This won't be converted",
+ "[/quote]",
+ "[x] That will",
+ '[quote="markvanlan, post:11, topic:10"]',
+ "[\*] Again this won't",
+ "[/quote]",
+ ].join("\n")
+ expect(post.reload.raw).to eq(expected)
+ end
+end
diff --git a/plugins/checklist/spec/pretty_text_spec.rb b/plugins/checklist/spec/pretty_text_spec.rb
new file mode 100644
index 00000000000..27927932a2b
--- /dev/null
+++ b/plugins/checklist/spec/pretty_text_spec.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require "rails_helper"
+
+describe PrettyText do
+ describe "markdown it" do
+ it "can properly bake boxes" do
+ md = <<~MD
+ [],[ ],[x],[X] are all checkboxes
+ `[ ]` [x](hello) *[ ]* **[ ]** _[ ]_ __[ ]__ ~~[ ]~~ are not checkboxes
+ MD
+
+ html = <<~HTML
+
,,, are all checkboxes
+ [ ]x[ ][ ][ ][ ][ ] are not checkboxes
+ HTML
+ cooked = PrettyText.cook(md)
+ expect(cooked).to eq(html.strip)
+ end
+ end
+end
diff --git a/plugins/checklist/test/javascripts/lib/checklist-test.js b/plugins/checklist/test/javascripts/lib/checklist-test.js
new file mode 100644
index 00000000000..40cb4610a60
--- /dev/null
+++ b/plugins/checklist/test/javascripts/lib/checklist-test.js
@@ -0,0 +1,251 @@
+import { acceptance } from "discourse/tests/helpers/qunit-helpers";
+import { test } from "qunit";
+import { cookAsync } from "discourse/lib/text";
+import Post from "discourse/models/post";
+import { checklistSyntax } from "discourse/plugins/checklist/discourse/initializers/checklist";
+import { Promise } from "rsvp";
+
+let currentRaw;
+
+async function prepare(raw) {
+ const cooked = await cookAsync(raw, {
+ siteSettings: { checklist_enabled: true },
+ });
+ const model = Post.create({ id: 42, can_edit: true });
+ const decoratorHelper = { getModel: () => model };
+
+ const $elem = $(`