From 817536230ddf61a4d177de5799af20797d9ecff4 Mon Sep 17 00:00:00 2001 From: NovemLinguae Date: Thu, 7 Mar 2024 02:30:33 -0800 Subject: [PATCH] tag: add code comments --- modules/friendlytag.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/friendlytag.js b/modules/friendlytag.js index 8a5e66a86..e83c11282 100644 --- a/modules/friendlytag.js +++ b/modules/friendlytag.js @@ -1440,14 +1440,22 @@ Twinkle.tag.callbacks = { var templateText; var text, summary; + // {{Rough translation}} + // Use {{subst:Duflu}} + // Place in section == Translated pages that could still use some cleanup == if (params.tags.indexOf('Rough translation') !== -1) { templateText = '{{subst:duflu|pg=' + Morebits.pageNameNorm + '|Language=' + (lang || 'uncertain') + '|Comments=' + reason.trim() + '}} ~~~~'; + // Append to end of page text = old_text + '\n\n' + templateText; summary = 'Translation cleanup requested on '; + // {{Not English}} + // Use {{subst:Needtrans}} + // Place in section == Pages for consideration == } else { templateText = '{{subst:needtrans|pg=' + Morebits.pageNameNorm + '|Language=' + (lang || 'uncertain') + '|Comments=' + reason.trim() + '}} ~~~~'; + // Place above section "Translated pages that could still use some cleanup" text = old_text.replace(/\n+(==\s?Translated pages that could still use some cleanup\s?==)/, '\n\n' + templateText + '\n\n$1'); summary = 'Translation' + (lang ? ' from ' + lang : '') + ' requested on ';