User talk:Dragoniez/Selective Rollback

Latest comment: 28 days ago by Gerges in topic New Arabic translation

カスタム編集要約でselectボックスにテキストが表示されない

edit

編集要約の事前設定を以下にしているのですが、いざダイアログを開いても選択肢のラベルが空白になってしまいます。value=には設定されているようなのですが何か対処法は有るでしょうか。アップデート前は使用できていたのですが。

selectiveRollbackConfig.editSummaries = {};
selectiveRollbackConfig.editSummaries[0] = '荒らしの差し戻し';
selectiveRollbackConfig.editSummaries[1] = '差し戻し';
selectiveRollbackConfig.editSummaries[2] = 'テスト編集の差し戻し';
selectiveRollbackConfig.editSummaries[3] = 'ソックパペットによる編集の差し戻し';

Syunsyunminmin 🗨️talk 06:03, 24 March 2023 (UTC)Reply

A couple of possible issues

edit

I recently used your rollback script and it worked, but when you add "$0 custom summary" it might not display "edit/edits" properly, as done with this revert on enwiki.

Secondly, if you have a confirmation rollback script like this script, it'll still revert despite clicking cancel, so you might need to be careful. Are there any ways to fix these issues? Thanks. 64andtim (chat) 07:03, 1 August 2023 (UTC)Reply

@64andtim Thanks for the report. I wasn't aware of the first one because Japanese doesn't have a singular/plural distinction for nouns. I thought about countermeasures but this would need crazy hardcoding if we try to fully fix the problem, so I think I'll use a fixed summary for $0 when the fetched default summary has an expression that needs to be parsed.
As for the second one, it doesn't quite seem like an issue with SR, it's pretty much just like a conflict of two scripts. The relevant revisions are reverted in the background because one-click rollback and revert confirmation are done by separate codes, meaning that when the confirmation script gets you a message, the other script is still run in a different place. You'll need to disable either of the scripts. But I can integrate the confirmation functionality to SR. If I do this, would it meet your needs? Dragoniez (talk) 10:57, 1 August 2023 (UTC)Reply
Updated to v3.1.1, and introduced the confirm config. You can now disable the confirmation script, with this config valued with always. See the updated doc on the main page. Dragoniez (talk) 15:46, 1 August 2023 (UTC)Reply

New Spanish translation

edit

I have provided a Spanish language translation for the script and for use in the Spanish Wikipedia:

Spanish language version
{
	'portletlink-tooltip': 'Abrir el diálogo Selective Rollback',
	'summary-label-primary': 'Resumen de edición',
	'summary-option-default': 'Resumen de edición automática',
	'summary-option-custom': 'Manual',
	'summary-label-custom': 'Resumen de edición manual',
	'summary-tooltip-$0': '($0 será reemplazada con la resumen de reversión automática.)',
	'summary-tooltip-$0-error': '($0 será reemplazada con la resumen de reversión automática <span>en español</span>.)',
	'summary-tooltip-specialexpressions': 'Expresiones de reemplazo',
	'markbot-label': 'Marcar las reversiones cómo ediciones de un bot',
	'watchlist-label': 'Vigilar las páginas en tu lista de seguimiento',
	'watchlist-expiry-label': 'Tiempo',
	'watchlist-expiry-indefinite': 'Permanente',
	'watchlist-expiry-1week': 'una semana',
	'watchlist-expiry-1month': 'un mes',
	'watchlist-expiry-3months': 'tres meses',
	'watchlist-expiry-6months': 'seis meses',
	'watchlist-expiry-1year': 'un año',
	'watchlist-expiry-3years': 'tres años', // Not used
	'button-rollbackchecked': 'Revertir elegidos',
	'button-checkall': 'Elegir todos',
	'button-close': 'Cerrar',
	'msg-nonechecked': 'Ningún casilla fue elegida.',
	'msg-linksresolved': 'Todos los enlaces de reversión en esta página se han resuelto.',
	'msg-confirm': '¿Estás seguro que quieres revertir este edición?',
	'rbstatus-reverted': 'revertido',
	'rbstatus-failed': 'la reversión falló'
}

Thank you. signed, 64andtim (chat) 06:58, 28 August 2023 (UTC)Reply

  Done Thanks for the translation. Note that I changed "en español" in summary-tooltip-$0-error to "en Inglés". There're also some inconsistencies among e.g. "Permanente", "una semana", and "un mes" in whether the first letter is capitalized, but I didn't change these. Let me know if you think we need further modifications. Dragoniez (talk) 11:32, 28 August 2023 (UTC)Reply

Romanian translation

edit
Texts for translation (Romanian)
{
	'portletlink-tooltip': 'Deschide dialogul Revenirii selective',
	'summary-label-primary': 'Descrierea modificării',
	'summary-option-default': 'Descrierea implicită a modificării',
	'summary-option-custom': 'Personalizat',
	'summary-label-custom': 'Descriere personalizată a modificării',
	'summary-tooltip-$0': '($0 va fi înlocuit cu descrierea implicită a revenirii.)',
	'summary-tooltip-$0-error': '($0 va fi înlocuit cu descrierea implicită a revenirii <span>în română</span>.)',
	'summary-tooltip-specialexpressions': 'Expresii de înlocuire',
	'markbot-label': 'Marchează revenirile drept modificări făcute de robot',
	'watchlist-label': 'Adaugă paginile țintă la pagini urmărite',
	'watchlist-expiry-label': 'Expiră',
	'watchlist-expiry-indefinite': 'Nelimitat',
	'watchlist-expiry-1week': '1 săptămână',
	'watchlist-expiry-1month': '1 lună',
	'watchlist-expiry-3months': '3 luni',
	'watchlist-expiry-6months': '6 luni',
	'watchlist-expiry-1year': '1 an',
	'watchlist-expiry-3years': '3 ani', // Not used
	'button-rollbackchecked': 'Revino asupra celor bifate',
	'button-checkall': 'Bifează tot',
	'button-close': 'Închide',
	'msg-nonechecked': 'Nu este bifată nicio căsuță bifabilă.',
	'msg-linksresolved': 'Toate legăturile de revenire de pe această pagină au fost utilizate.',
	'msg-confirm': 'Ești sigur(ă) că vrei să revii asupra acestei modificări?',
	'rbstatus-reverted': 'revenit',
	'rbstatus-failed': 'revenire eșuată'
}

--NGC 54 (talkcontribs) 17:08, 6 January 2024 (UTC)Reply

@NGC 54 Thank you! Let me just double-check two points: 1. Should I go with Deschide dialogul Revenirii selective instead of Deschide dialogul Selective Rollback? (all other translations keep the script name as-is, treating it as a proper noun; either is fine for me), 2. <span>în română</span> in summary-tooltip-$0-error will be <span>în engleză</span> (because this is a static English message used when the script has failed to fetch from the API the default rollback summary on the local wiki). Dragoniez (talk) 13:05, 9 January 2024 (UTC)Reply
Deschide dialogul Selective Rollback is OK. în engleză is also OK. --NGC 54 (talkcontribs) 14:37, 9 January 2024 (UTC)Reply
  Done Dragoniez (talk) 14:56, 9 January 2024 (UTC)Reply

使用できない

edit

巻き戻しを行おうとすると、「巻き戻し失敗 (missingtitle)」と表示されます。 Imoyokan-scratch (talk) 01:06, 12 January 2024 (UTC)Reply
追記:バージョンの問題と思われる。--Imoyokan-scratch (talk) 10:11, 13 January 2024 (UTC)Reply

Imoyokan-scratchさん、どのページのどの版を巻き戻そうとしたのでしょうか。 Dragoniez (talk) 06:41, 14 January 2024 (UTC)Reply
返信ありがとうございます。全然関係ない別Wikiですが、以下のとおりです。[1][2][3][4] Imoyokan-scratch (talk) 13:29, 14 January 2024 (UTC)Reply

A couple of suggestions and a modification

edit

I would like to propose adding a couple of suggestions for the script:

  • Add an option to use a fixed MediaWiki:Revertpage-nouser summary to revert a user with a grossly offensive/libelous username. For the Spanish language translation, it would be Revertidos los cambios de un usuario oculto a la última edición de $1, while for the fixed hidden user summary in English, it would be Reverted edit(s) by a hidden user to last version by $1, similar to how it would use a fixed reversion summary if the script detects the PLURAL magic word in the Revertpage interface page.
  • Add a preview of the rollback summary, whether if it's the default or a custom summary. For English, it would be Summary preview:, while for Spanish, it would be Previsualización del resumen de edición:.

In addition, I have a modification to propose for my Spanish translation:

  • Lowercase the words "en Inglés" to "en inglés".

Feel free to modify my suggestion(s) if needed. Thank you. – 64andtim 🤔 (problem?) 16:20, 22 February 2024 (UTC)Reply

@64andtim My replies to each:
  1. Do you mean something like "user hidden" should appear in the dropdown? If so, what would be the difference between that and just defining a similar summary using selectiveRollbackConfig?
  2. It shouldn't be too difficult to add a functionality to preview summary, but if this is to be added, expect that variables will be shown as-is, like $1.
  3. I'll put the words in lowercase when I have time.
Dragoniez (talk) 09:34, 23 February 2024 (UTC)Reply
After reading your response, we should probably (or not) scrap suggestion #1, but for suggestion #2, it's up to you. – 64andtim 🤔 (problem?) 14:45, 23 February 2024 (UTC)Reply
@64andtim Notes for revertpage-nouser: I thought that if #1 is for hidden usernames instead of offensive usernames and if it's for improvement of the $0 replacement feature, it'll be meaningful because currently the variable is always replaced with revertpage, not with revertpage-nouser. This means that hidden usernames aren't taken care of in any occasion. But there's a complicated context separate from this, i.e. mediawiki-core doesn't let us rollback revisions if they involve a hidden username (phab:T279030; because of this, revertpage-nouser is never used anywhere and for nothing at present). Let's wait until the rollback functionality is improved on the PHP side for this, before thinking about #1.
I'll work on #2 and #3. I'm going to need some time though. Dragoniez (talk) 17:05, 23 February 2024 (UTC)Reply
@64andtim   Done with #2 and #3. Let me know if you find anything that should be further modified. Thank you for your ideas :) Dragoniez (talk) 13:59, 27 February 2024 (UTC)Reply

Version 4 update

edit

This update involves a full overhaul of the source code. Along with this, there will be notable changes in the script's specifications:

  1. The {{PLURAL}} magic word in the revertpage message is parsed (in a rough way).
  2. The default language falls back to the language specified in the user's preferences (rather than the content language of the wiki).
  3. The rollback summary specified on the dialog is dynamically previewed in the designated section.
  4. Rollback confimation uses OO.ui.confirm rather than window.confirm.
  5. $0 is replaced with the project-specific (rather than user-language-specific) revertpage message.
  6. Global sysops without global rollback are freed from the wrong display of the markbot checkbox.
  7. (Plus other minor changes)

Please leave a comment on this page if you experience any bug. Dragoniez (talk) 13:51, 27 February 2024 (UTC)Reply

Is #2 necessary? On the Spanish Wikipedia, SR only displays in English, and the same goes for the confirmation prompt. – 64andtim 🤔 (problem?) 15:15, 27 February 2024 (UTC)Reply
@64andtim I made that change mainly because SR is a global script. Users who work on multiple projects often have a language specified in their global preferences, and content language fallback may be troublesome for those users because unless they have their own SR configs in their user JS, the interface language changes depending on where they are. People rarely speak multiple languages as their mother tongues, so I thought the old specification was somewhat problematic.
Anyway, I guess you don't have a local exception set for your global language preference on eswiki? Dragoniez (talk) 16:00, 27 February 2024 (UTC)Reply

┌──────┘
Oh, never mind. It turns out this was intentional, but I see no problems with this update; I switched from es-x-formal to es again, and I would suggest changing these in the Spanish translation to maintain consistency with the other translations:

Extended content
				'watchlist-expiry-1week': '1 semana',
				'watchlist-expiry-1month': '1 mes',
				'watchlist-expiry-3months': '3 meses',
				'watchlist-expiry-6months': '6 meses',
				'watchlist-expiry-1year': '1 año',
				'watchlist-expiry-3years': '3 años', // Not used

Thank you. – 64andtim 🤔 (problem?) 16:15, 27 February 2024 (UTC)Reply

@64andtim Oh I see, that's why. es-x-formal fell back to en because the language code wasn't available in SR.
And thank you for the translations! I just updated the source code. Dragoniez (talk) 16:33, 27 February 2024 (UTC)Reply
@64andtim I just made a further slight modification and es-x-formal is now recognized as es. Dragoniez (talk) 10:22, 28 February 2024 (UTC)Reply

Error report (20240229)

edit

(Semi-automatic report:) I came across a parentNode error on this page. Please check it out. 2601:645:8781:9620:866A:B480:ECA2:51A6 22:40, 29 February 2024 (UTC)Reply

  • This is related to the fact that Special:Recentchanges is transcluded on the page. I'm pretty sure I can fix it but will need some time because I won't be able to access my PC for about a week. Dragoniez (talk) 00:23, 1 March 2024 (UTC)Reply
  •   Done I updated the script to v4.0.3 and now it doesn't throw an error even if the page transcludes RC. However, this isn't a perfect countermeasure. At least on jawiki and testwiki (where I have rollback rights), rollback links aren't generated in transcluded RC. Currently, SR generates checkboxes on Special:Diff, and if the diff transcludes RC, it then means that the page has rollback links for which we should generate SR checkboxes (in the diff pane) and for which we shouldn't (in the transcluded RC). To make the measure perfect, we'd have to remove SR checkboxes on Special:Diff. But at present I don't know whether this is needed for WMF wikis. Dragoniez (talk) 12:54, 4 March 2024 (UTC)Reply

+Vietnamese translation

edit

@Dragoniez:: language code is "vi":

{
	'portletlink-tooltip': 'Mở hộp thoại Lùi sửa theo lựa chọn',
	'summary-label-primary': 'Tóm lược sửa đổi',
	'summary-option-default': 'Tóm lược sửa đổi mặc định',
	'summary-option-custom': 'Tuỳ chỉnh',
	'summary-label-custom': 'Tóm lược tu chỉnh',
	'summary-tooltip-$0': '($0 sẽ được thay bằng tóm lược sửa đổi mặc định.)',
	'summary-tooltip-$0-error': '($0 sẽ được thay bằng tóm lược sửa đổi mặc định <b>trong tiếng Anh</b>.)',
	'summary-tooltip-specialexpressions': 'Thay thế biểu thức',
	'summary-label-preview': 'Xem trước tóm lược', // v4.0.0
	'summary-tooltip-preview': '(Từ ma thuật sẽ được thay thế.)', // v4.0.0
	'markbot-label': 'Đánh dấu  sửa đổi bot',
	'watchlist-label': 'Thêm trang mục tiêu vào danh sách theo dõi',
	'watchlist-expiry-label': 'Hết hạn',
	'watchlist-expiry-indefinite': 'Vô hạn',
	'watchlist-expiry-1week': '1 tun',
	'watchlist-expiry-1month': '1 tng',
	'watchlist-expiry-3months': '3 tng',
	'watchlist-expiry-6months': '6 tng',
	'watchlist-expiry-1year': '1 năm',
	'watchlist-expiry-3years': '3 năm', // Not used
	'button-rollbackchecked': 'Đã chọn để lùi sửa',
	'button-checkall': 'Chọn tt cả',
	'button-close': 'Đóng',
	'msg-nonechecked': 'Chưa chọn sửa đổi.',
	'msg-linksresolved': 'Đã xử  tt cả liên kết lùi sửa.',
	'msg-confirm': 'Bạn  muốn lùi sửa sửa đổi này không?',
	'rbstatus-reverted': 'đã lùi sửa',
	'rbstatus-failed': 'lùi lại không tnh ng',
	'rbstatus-notify-success': 'Thành ng', // v4.0.0
	'rbstatus-notify-failure': 'Không tnh ng' // v4.0.0
}

Thanks! Hide on Rosé t 02:28, 21 March 2024 (UTC)Reply

@Hide on Rosé   Done Thank you for the translations! Dragoniez (talk) 10:13, 21 March 2024 (UTC)Reply

Suggestion to change the dialogue to OO.ui to adapt to dark mode

edit

The current SR dialog probably uses window.confirm which is better adapted to light mode. I would suggest changing to oo.ui (mw.loader.using(['mediawiki.util', 'mediawiki.api', 'oojs-ui-core', 'oojs-ui-widgets', 'oojs-ui-windows'], function() or similar so that the appearance looks much better, and it could probably adapt to dark mode. Codename Noreste 🤔 Talk 02:26, 25 August 2024 (UTC)Reply

@Codename Noreste Thank you for the suggestion. I was actually aware of the dark mode compatibility issue, so I will work on it as soon as possible. Please give me some time. Dragoniez (talk) 03:19, 26 August 2024 (UTC)Reply

New Arabic translation

edit
Arabic language version
{
    'portletlink-tooltip': 'فتح نافذة التراجع الانتقائي',
    'summary-label-primary': 'ملخص التعديل',
    'summary-option-default': 'ملخص التعديل الافتراضي',
    'summary-option-custom': 'مخصص',
    'summary-label-custom': 'ملخص تعديل مخصص',
    'summary-tooltip-$0': '($0 سيتم استبداله بملخص التراجع الافتراضي.)',
    'summary-tooltip-$0-error': '($0 سيتم استبداله بملخص التراجع الافتراضي <b>باللغة الإنجليزية</b>.)',
    'summary-tooltip-specialexpressions': 'عبارات الاستبدال',
    'summary-label-preview': 'معاينة الملخص', 
    'summary-tooltip-preview': '(سيتم استبدال الكلمات السحرية.)', 
    'markbot-label': 'تمييز التراجعات كتحريرات بوت',
    'watchlist-label': 'إضافة الصفحات المستهدفة إلى قائمة المراقبة',
    'watchlist-expiry-label': 'مدة الصلاحية',
    'watchlist-expiry-indefinite': 'غير محددة',
    'watchlist-expiry-1week': 'أسبوع واحد',
    'watchlist-expiry-1month': 'شهر واحد',
    'watchlist-expiry-3months': '3 أشهر',
    'watchlist-expiry-6months': '6 أشهر',
    'watchlist-expiry-1year': 'سنة واحدة',
    'watchlist-expiry-3years': '3 سنوات', 
    'button-rollbackchecked': 'تراجع عن العناصر المحددة',
    'button-checkall': 'تحديد الكل',
    'button-close': 'إغلاق',
    'msg-nonechecked': 'لم يتم تحديد أي مربع اختيار.',
    'msg-linksresolved': 'تم حل جميع روابط التراجع في هذه الصفحة.',
    'msg-confirm': 'هل أنت متأكد أنك تريد التراجع عن هذا التعديل؟',
    'rbstatus-reverted': 'تم التراجع',
    'rbstatus-failed': 'فشل التراجع',
    'rbstatus-notify-success': 'تم بنجاح', 
    'rbstatus-notify-failure': 'فشل' 
}

Gerges (talk) 11:08, 28 November 2024 (UTC)Reply

Return to the user page of "Dragoniez/Selective Rollback".