Skip to content

Commit

Permalink
more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae committed Mar 7, 2024
1 parent 8175362 commit 989c7d4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions modules/friendlytag.js
Original file line number Diff line number Diff line change
Expand Up @@ -1440,22 +1440,16 @@ 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
// Place in section == Translated pages that could still use some cleanup ==
text = old_text + '\n\n' + templateText;
summary = 'Translation cleanup requested on ';
// {{Not English}}
// Use {{subst:Needtrans}}
// Place in section == Pages for consideration ==
} else {
} else if ( params.tags.indexOf('Not English') !== -1 ) {
templateText = '{{subst:needtrans|pg=' + Morebits.pageNameNorm + '|Language=' +
(lang || 'uncertain') + '|Comments=' + reason.trim() + '}} ~~~~';
// Place above section "Translated pages that could still use some cleanup"
// Place in section == Pages for consideration ==
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 ';
Expand Down

0 comments on commit 989c7d4

Please sign in to comment.