Advertisement
BladeZackliy

ReadAllNotificationsButton

Aug 23rd, 2023
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.04 KB | None | 0 0
  1. /**
  2. * @name ReadAllNotificationsButton
  3. * @author DevilBro
  4. * @authorId 278543574059057154
  5. * @version 1.7.5
  6. * @description Adds a Clear Button to the Server List and the Mentions Popout
  7. * @invite Jx3TjNS
  8. * @donate https://www.paypal.me/MircoWittrien
  9. * @patreon https://www.patreon.com/MircoWittrien
  10. * @website https://mwittrien.github.io/
  11. * @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ReadAllNotificationsButton/
  12. * @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js
  13. */
  14.  
  15. module.exports = (_ => {
  16. const changeLog = {
  17.  
  18. };
  19.  
  20. return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
  21. constructor (meta) {for (let key in meta) this[key] = meta[key];}
  22. getName () {return this.name;}
  23. getAuthor () {return this.author;}
  24. getVersion () {return this.version;}
  25. getDescription () {return `The Library Plugin needed for ${this.name} is missing. Open the Plugin Settings to download it. \n\n${this.description}`;}
  26.  
  27. downloadLibrary () {
  28. require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
  29. if (!e && b && r.statusCode == 200) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => BdApi.showToast("Finished downloading BDFDB Library", {type: "success"}));
  30. else BdApi.alert("Error", "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library");
  31. });
  32. }
  33.  
  34. load () {
  35. if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
  36. if (!window.BDFDB_Global.downloadModal) {
  37. window.BDFDB_Global.downloadModal = true;
  38. BdApi.showConfirmationModal("Library Missing", `The Library Plugin needed for ${this.name} is missing. Please click "Download Now" to install it.`, {
  39. confirmText: "Download Now",
  40. cancelText: "Cancel",
  41. onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
  42. onConfirm: _ => {
  43. delete window.BDFDB_Global.downloadModal;
  44. this.downloadLibrary();
  45. }
  46. });
  47. }
  48. if (!window.BDFDB_Global.pluginQueue.includes(this.name)) window.BDFDB_Global.pluginQueue.push(this.name);
  49. }
  50. start () {this.load();}
  51. stop () {}
  52. getSettingsPanel () {
  53. let template = document.createElement("template");
  54. template.innerHTML = `<div style="color: var(--header-primary); font-size: 16px; font-weight: 300; white-space: pre; line-height: 22px;">The Library Plugin needed for ${this.name} is missing.\nPlease click <a style="font-weight: 500;">Download Now</a> to install it.</div>`;
  55. template.content.firstElementChild.querySelector("a").addEventListener("click", this.downloadLibrary);
  56. return template.content.firstElementChild;
  57. }
  58. } : (([Plugin, BDFDB]) => {
  59. var _this;
  60. var blacklist, clearing;
  61.  
  62. const ReadAllButtonComponent = class ReadAllButton extends BdApi.React.Component {
  63. clearClick() {
  64. if (_this.settings.batch.guilds) this.clearGuilds(_this.settings.batch.muted ? this.getGuilds() : this.getUnread());
  65. if (_this.settings.batch.dms) BDFDB.DMUtils.markAsRead(this.getPingedDMs());
  66. }
  67. clearGuilds(guildIds) {
  68. BDFDB.GuildUtils.markAsRead(guildIds.filter(id => id && !blacklist.includes(id)));
  69. }
  70. getGuilds() {
  71. return BDFDB.LibraryStores.SortedGuildStore.getFlattenedGuildIds().map(BDFDB.LibraryStores.GuildStore.getGuild).map(g => g.id).filter(n => n);
  72. }
  73. getUnread() {
  74. return this.getGuilds().filter(id => BDFDB.LibraryStores.GuildReadStateStore.hasUnread(id) || BDFDB.LibraryStores.GuildReadStateStore.getMentionCount(id) > 0);
  75. }
  76. getPinged() {
  77. return this.getGuilds().filter(id => BDFDB.LibraryStores.GuildReadStateStore.getMentionCount(id) > 0);
  78. }
  79. getMuted() {
  80. return this.getGuilds().filter(id => BDFDB.LibraryStores.UserGuildSettingsStore.isGuildOrCategoryOrChannelMuted(id));
  81. }
  82. getPingedDMs() {
  83. return BDFDB.LibraryStores.ChannelStore.getSortedPrivateChannels().map(c => c.id).filter(id => id && BDFDB.LibraryStores.ReadStateStore.getMentionCount(id) > 0);
  84. }
  85. render() {
  86. return BDFDB.ReactUtils.createElement("div", {
  87. className: BDFDB.disCNS.guildouter + BDFDB.disCN._readallnotificationsbuttonframe,
  88. children: BDFDB.ReactUtils.createElement("div", {
  89. className: BDFDB.disCNS.guildiconwrapper + BDFDB.disCN._readallnotificationsbuttoninner,
  90. children: BDFDB.ReactUtils.createElement("div", {
  91. className: BDFDB.disCNS.guildiconchildwrapper + BDFDB.disCN._readallnotificationsbuttonbutton,
  92. children: "read all",
  93. onClick: _ => {
  94. if (!_this.settings.general.confirmClear) this.clearClick();
  95. else BDFDB.ModalUtils.confirm(_this, _this.labels.modal_confirmnotifications, _ => this.clearClick());
  96. },
  97. onContextMenu: event => BDFDB.ContextMenuUtils.open(_this, event, BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuGroup, {
  98. children: [
  99. BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
  100. label: _this.labels.context_unreadguilds,
  101. id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-unread-read"),
  102. action: _ => this.clearGuilds(this.getUnread())
  103. }),
  104. BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
  105. label: _this.labels.context_pingedguilds,
  106. id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-pinged-read"),
  107. action: _ => this.clearGuilds(this.getPinged())
  108. }),
  109. BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
  110. label: _this.labels.context_mutedguilds,
  111. id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-muted-read"),
  112. action: _ => this.clearGuilds(this.getMuted())
  113. }),
  114. BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
  115. label: _this.labels.context_guilds,
  116. id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-all-read"),
  117. action: _ => this.clearGuilds(this.getGuilds())
  118. }),
  119. BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
  120. label: _this.labels.context_dms,
  121. id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-dms-read"),
  122. action: _ => BDFDB.DMUtils.markAsRead(this.getPingedDMs())
  123. })
  124. ]
  125. }))
  126. })
  127. })
  128. });
  129. }
  130. };
  131.  
  132. return class ReadAllNotificationsButton extends Plugin {
  133. onLoad () {
  134. _this = this;
  135.  
  136. this.defaults = {
  137. general: {
  138. addClearButton: {value: true, description: "Adds a 'Clear Mentions' button to the recent mentions popout"},
  139. confirmClear: {value: false, description: "Asks for your confirmation before clearing reads"}
  140. },
  141. batch: {
  142. guilds: {value: true, description: "unread Servers"},
  143. muted: {value: false, description: "muted unread Servers"},
  144. dms: {value: false, description: "unread DMs"}
  145. }
  146. };
  147.  
  148. this.modulePatches = {
  149. after: [
  150. "GuildsBar",
  151. "InboxHeader"
  152. ]
  153. };
  154.  
  155. this.css = `
  156. ${BDFDB.dotCN.messagespopouttabbar} {
  157. flex: 1 0 auto;
  158. }
  159. ${BDFDB.dotCN.messagespopoutcontrols} {
  160. display: flex;
  161. }
  162. ${BDFDB.dotCN.messagespopoutcontrols} > * {
  163. margin-left: 10px;
  164. }
  165. ${BDFDB.dotCN._readallnotificationsbuttonframe} {
  166. height: 24px;
  167. margin-bottom: 10px;
  168. }
  169. ${BDFDB.dotCN._readallnotificationsbuttonframe}:active {
  170. transform: translateY(1px);
  171. }
  172. ${BDFDB.dotCN._readallnotificationsbuttoninner} {
  173. height: 24px;
  174. }
  175. ${BDFDB.dotCN._readallnotificationsbuttonbutton} {
  176. border-radius: 4px;
  177. height: 24px;
  178. font-size: 12px;
  179. line-height: 1.3;
  180. white-space: nowrap;
  181. cursor: pointer;
  182. }
  183. `;
  184. }
  185.  
  186. onStart () {
  187. let loadedBlacklist = BDFDB.DataUtils.load(this, "blacklist");
  188. this.saveBlacklist(!BDFDB.ArrayUtils.is(loadedBlacklist) ? [] : loadedBlacklist);
  189.  
  190. this.forceUpdateAll();
  191. }
  192.  
  193. onStop () {
  194. this.forceUpdateAll();
  195. }
  196.  
  197. getSettingsPanel (collapseStates = {}) {
  198. let settingsPanel, settingsItems = [];
  199.  
  200. settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.CollapseContainer, {
  201. title: "Settings",
  202. collapseStates: collapseStates,
  203. children: Object.keys(this.defaults.general).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
  204. type: "Switch",
  205. plugin: this,
  206. keys: ["general", key],
  207. label: this.defaults.general[key].description,
  208. value: this.settings.general[key]
  209. })).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelList, {
  210. title: "When left clicking the 'read all' Button mark following Elements as read:",
  211. first: false,
  212. last: true,
  213. children: Object.keys(this.defaults.batch).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
  214. type: "Switch",
  215. plugin: this,
  216. keys: ["batch", key],
  217. label: this.defaults.batch[key].description,
  218. value: this.settings.batch[key]
  219. }))
  220. }))
  221. }));
  222.  
  223. let listInstance = null, batchSetGuilds = value => {
  224. if (!value) {
  225. for (let id of BDFDB.LibraryStores.SortedGuildStore.getFlattenedGuildIds()) blacklist.push(id);
  226. blacklist = BDFDB.ArrayUtils.removeCopies(blacklist);
  227. }
  228. else blacklist = [];
  229. this.saveBlacklist(blacklist);
  230. if (listInstance) {
  231. listInstance.props.disabled = blacklist;
  232. BDFDB.ReactUtils.forceUpdate(listInstance);
  233. }
  234. };
  235. settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.CollapseContainer, {
  236. title: "Server Black List",
  237. collapseStates: collapseStates,
  238. children: [
  239. BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsGuildList, {
  240. className: BDFDB.disCN.marginbottom20,
  241. disabled: BDFDB.DataUtils.load(this, "blacklist"),
  242. onClick: disabledGuilds => this.saveBlacklist(disabledGuilds),
  243. ref: instance => {listInstance = instance;}
  244. }),
  245. BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
  246. type: "Button",
  247. color: BDFDB.LibraryComponents.Button.Colors.GREEN,
  248. label: "Enable for all Servers",
  249. onClick: _ => batchSetGuilds(true),
  250. children: BDFDB.LanguageUtils.LanguageStrings.ENABLE
  251. }),
  252. BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
  253. type: "Button",
  254. color: BDFDB.LibraryComponents.Button.Colors.PRIMARY,
  255. label: "Disable for all Servers",
  256. onClick: _ => batchSetGuilds(false),
  257. children: BDFDB.LanguageUtils.LanguageStrings.DISABLE
  258. })
  259. ]
  260. }));
  261.  
  262. return settingsPanel = BDFDB.PluginUtils.createSettingsPanel(this, settingsItems);
  263. }
  264.  
  265. onSettingsClosed () {
  266. if (this.SettingsUpdated) {
  267. delete this.SettingsUpdated;
  268. this.forceUpdateAll();
  269. }
  270. }
  271.  
  272. forceUpdateAll () {
  273. BDFDB.DiscordUtils.rerenderAll();
  274. }
  275.  
  276. processGuildsBar (e) {
  277. let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "UnreadDMs"});
  278. if (index > -1) children.splice(index + 1, 0, BDFDB.ReactUtils.createElement(ReadAllButtonComponent, {}));
  279. }
  280.  
  281. processInboxHeader (e) {
  282. if (!this.settings.general.addClearButton || e.instance.props.tab != BDFDB.DiscordConstants.InboxTabs.MENTIONS) return;
  283. let mentionedMessages = BDFDB.LibraryStores.RecentMentionsStore.getMentions();
  284. if (!mentionedMessages || !mentionedMessages.length) return;
  285. let controls = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.messagespopoutcontrols]]});
  286. if (controls) controls.props.children = [
  287. controls.props.children,
  288. BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
  289. text: `${BDFDB.LanguageUtils.LanguageStrings.CLOSE} (${BDFDB.LanguageUtils.LanguageStrings.FORM_LABEL_ALL})`,
  290. children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
  291. className: BDFDB.disCNS.messagespopoutbutton + BDFDB.disCNS.messagespopoutbuttonsecondary + BDFDB.disCN.messagespopoutbuttonsize32,
  292. children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
  293. nativeClass: true,
  294. name: BDFDB.LibraryComponents.SvgIcon.Names.CLOSE,
  295. width: 16,
  296. height: 16
  297. }),
  298. onClick: _ => {
  299. let clear = _ => {
  300. if (clearing) return BDFDB.NotificationUtils.toast(`${this.labels.toast_alreadyclearing} - ${BDFDB.LanguageUtils.LibraryStrings.please_wait}`, {type: "danger"});
  301. let messages = [].concat(mentionedMessages).filter(n => n);
  302. if (messages.length) {
  303. clearing = true;
  304. let toast = BDFDB.NotificationUtils.toast(`${this.labels.toast_clearing} - ${BDFDB.LanguageUtils.LibraryStrings.please_wait}`, {timeout: 0, ellipsis: true});
  305. for (let i = 0; i < messages.length; i++) BDFDB.TimeUtils.timeout(_ => {
  306. BDFDB.LibraryModules.APIUtils.delete({
  307. url: BDFDB.DiscordConstants.Endpoints.MENTIONS_MESSAGE_ID(messages[i].id),
  308. retries: 2,
  309. oldFormErrors: true
  310. });
  311. if (i == messages.length - 1) {
  312. clearing = false;
  313. toast.close();
  314. BDFDB.NotificationUtils.toast(this.labels.toastcleared, {type: "success"});
  315. }
  316. }, i * 1000);
  317. }
  318. };
  319. if (this.settings.general.confirmClear) BDFDB.ModalUtils.confirm(this, this.labels.modal_confirmmentions, clear);
  320. else clear();
  321. }
  322. })
  323. })
  324. ].flat(10);
  325. }
  326.  
  327. saveBlacklist (savedBlacklist) {
  328. blacklist = savedBlacklist;
  329. BDFDB.DataUtils.save(savedBlacklist, this, "blacklist");
  330. }
  331.  
  332. setLabelsByLanguage () {
  333. switch (BDFDB.LanguageUtils.getLanguage().id) {
  334. case "bg": // Bulgarian
  335. return {
  336. context_dms: "Директно съобщение",
  337. context_guilds: "Всички сървъри",
  338. context_mutedguilds: "Приглушени сървъри",
  339. context_pingedguilds: "Pinged сървъри",
  340. context_unreadguilds: "Непрочетени сървъри",
  341. modal_confirmmentions: "Наистина ли искате да изтриете всички непрочетени споменавания?",
  342. modal_confirmnotifications: "Наистина ли искате да изтриете всички непрочетени известия?",
  343. toast_alreadyclearing: "Изтрива някои споменавания вече",
  344. toast_cleared: "Всички последни споменавания бяха изтрити",
  345. toast_clearing: "Изчиства всички скорошни споменавания"
  346. };
  347. case "da": // Danish
  348. return {
  349. context_dms: "Direkte beskeder",
  350. context_guilds: "Alle servere",
  351. context_mutedguilds: "Dæmpede servere",
  352. context_pingedguilds: "Pingede servere",
  353. context_unreadguilds: "Ulæste servere",
  354. modal_confirmmentions: "Er du sikker på, at du vil slette alle ulæste omtaler?",
  355. modal_confirmnotifications: "Er du sikker på, at du vil slette alle ulæste meddelelser?",
  356. toast_alreadyclearing: "Sletter allerede nogle omtaler",
  357. toast_cleared: "Alle nylige omtaler er blevet slettet",
  358. toast_clearing: "Rydder alle nylige omtaler"
  359. };
  360. case "de": // German
  361. return {
  362. context_dms: "Direktnachrichten",
  363. context_guilds: "Alle Server",
  364. context_mutedguilds: "Stummgeschaltete Server",
  365. context_pingedguilds: "Gepingte Server",
  366. context_unreadguilds: "Ungelesene Server",
  367. modal_confirmmentions: "Möchten Sie wirklich alle ungelesenen Erwähnungen löschen?",
  368. modal_confirmnotifications: "Möchten Sie wirklich alle ungelesenen Benachrichtigungen löschen?",
  369. toast_alreadyclearing: "Löscht bereits einige Erwähnungen",
  370. toast_cleared: "Alle kürzlich Erwähnungen wurden gelöscht",
  371. toast_clearing: "Löscht alle letzten Erwähnungen"
  372. };
  373. case "el": // Greek
  374. return {
  375. context_dms: "Αμεσα μηνύματα",
  376. context_guilds: "Όλοι οι διακομιστές",
  377. context_mutedguilds: "Σίγαση διακομιστών",
  378. context_pingedguilds: "Διακομιστές Ping",
  379. context_unreadguilds: "Μη αναγνωσμένοι διακομιστές",
  380. modal_confirmmentions: "Είστε βέβαιοι ότι θέλετε να διαγράψετε όλες τις μη αναγνωσμένες αναφορές;",
  381. modal_confirmnotifications: "Είστε βέβαιοι ότι θέλετε να διαγράψετε όλες τις μη αναγνωσμένες ειδοποιήσεις;",
  382. toast_alreadyclearing: "Διαγράφει ήδη κάποιες αναφορές",
  383. toast_cleared: "Όλες οι πρόσφατες αναφορές έχουν διαγραφεί",
  384. toast_clearing: "Διαγράφει όλες τις πρόσφατες αναφορές"
  385. };
  386. case "es": // Spanish
  387. return {
  388. context_dms: "Mensajes directos",
  389. context_guilds: "Todos los servidores",
  390. context_mutedguilds: "Servidores silenciados",
  391. context_pingedguilds: "Servidores con ping",
  392. context_unreadguilds: "Servidores no leídos",
  393. modal_confirmmentions: "¿Estás seguro de que deseas eliminar todas las menciones no leídas?",
  394. modal_confirmnotifications: "¿Está seguro de que desea eliminar todas las notificaciones no leídas?",
  395. toast_alreadyclearing: "Elimina algunas menciones ya",
  396. toast_cleared: "Se han eliminado todas las menciones recientes",
  397. toast_clearing: "Borra todas las menciones recientes"
  398. };
  399. case "fi": // Finnish
  400. return {
  401. context_dms: "Suorat viestit",
  402. context_guilds: "Kaikki palvelimet",
  403. context_mutedguilds: "Mykistetyt palvelimet",
  404. context_pingedguilds: "Pinged-palvelimet",
  405. context_unreadguilds: "Lukemattomat palvelimet",
  406. modal_confirmmentions: "Haluatko varmasti poistaa kaikki lukemattomat maininnat?",
  407. modal_confirmnotifications: "Haluatko varmasti poistaa kaikki lukemattomat ilmoitukset?",
  408. toast_alreadyclearing: "Poistaa jo joitain mainintoja",
  409. toast_cleared: "Kaikki viimeisimmät maininnat on poistettu",
  410. toast_clearing: "Tyhjentää kaikki viimeisimmät maininnat"
  411. };
  412. case "fr": // French
  413. return {
  414. context_dms: "Messages directs",
  415. context_guilds: "Tous les serveurs",
  416. context_mutedguilds: "Serveurs muets",
  417. context_pingedguilds: "Serveurs ping",
  418. context_unreadguilds: "Serveurs non lus",
  419. modal_confirmmentions: "Voulez-vous vraiment supprimer toutes les mentions non lues?",
  420. modal_confirmnotifications: "Voulez-vous vraiment supprimer toutes les notifications non lues?",
  421. toast_alreadyclearing: "Supprime déjà certaines mentions",
  422. toast_cleared: "Toutes les mentions récentes ont été supprimées",
  423. toast_clearing: "Efface toutes les mentions récentes"
  424. };
  425. case "hr": // Croatian
  426. return {
  427. context_dms: "Direktna poruka",
  428. context_guilds: "Svi poslužitelji",
  429. context_mutedguilds: "Prigušeni poslužitelji",
  430. context_pingedguilds: "Pingirani poslužitelji",
  431. context_unreadguilds: "Nepročitani poslužitelji",
  432. modal_confirmmentions: "Jeste li sigurni da želite izbrisati sva nepročitana spominjanja?",
  433. modal_confirmnotifications: "Jeste li sigurni da želite izbrisati sve nepročitane obavijesti?",
  434. toast_alreadyclearing: "Briše već spomenute",
  435. toast_cleared: "Sva nedavna spominjanja su izbrisana",
  436. toast_clearing: "Briše sva nedavna spominjanja"
  437. };
  438. case "hu": // Hungarian
  439. return {
  440. context_dms: "Közvetlen üzenet",
  441. context_guilds: "Minden szerver",
  442. context_mutedguilds: "Némított szerverek",
  443. context_pingedguilds: "Pingelt szerverek",
  444. context_unreadguilds: "Olvasatlan szerverek",
  445. modal_confirmmentions: "Biztosan törli az összes olvasatlan említést?",
  446. modal_confirmnotifications: "Biztosan törli az összes olvasatlan értesítést?",
  447. toast_alreadyclearing: "Néhány említést már töröl",
  448. toast_cleared: "Az összes közelmúltbeli említést törölték",
  449. toast_clearing: "Törli az összes közelmúltbeli említést"
  450. };
  451. case "it": // Italian
  452. return {
  453. context_dms: "Messaggi diretti",
  454. context_guilds: "Tutti i server",
  455. context_mutedguilds: "Server disattivati",
  456. context_pingedguilds: "Server sottoposti a ping",
  457. context_unreadguilds: "Server non letti",
  458. modal_confirmmentions: "Sei sicuro di voler eliminare tutte le menzioni non lette?",
  459. modal_confirmnotifications: "Sei sicuro di voler eliminare tutte le notifiche non lette?",
  460. toast_alreadyclearing: "Elimina già alcune menzioni",
  461. toast_cleared: "Tutte le menzioni recenti sono state eliminate",
  462. toast_clearing: "Cancella tutte le menzioni recenti"
  463. };
  464. case "ja": // Japanese
  465. return {
  466. context_dms: "ダイレクトメッセージ",
  467. context_guilds: "すべてのサーバー",
  468. context_mutedguilds: "ミュートされたサーバー",
  469. context_pingedguilds: "pingされたサーバー",
  470. context_unreadguilds: "未読サーバー",
  471. modal_confirmmentions: "未読のメンションをすべて削除してもよろしいですか?",
  472. modal_confirmnotifications: "未読の通知をすべて削除してもよろしいですか?",
  473. toast_alreadyclearing: "すでにいくつかの言及を削除します",
  474. toast_cleared: "最近の言及はすべて削除されました",
  475. toast_clearing: "最近の言及をすべてクリアします"
  476. };
  477. case "ko": // Korean
  478. return {
  479. context_dms: "쪽지",
  480. context_guilds: "모든 서버",
  481. context_mutedguilds: "음소거 된 서버",
  482. context_pingedguilds: "핑된 서버",
  483. context_unreadguilds: "읽지 않은 서버",
  484. modal_confirmmentions: "읽지 않은 모든 멘션을 삭제 하시겠습니까?",
  485. modal_confirmnotifications: "읽지 않은 모든 알림을 삭제 하시겠습니까?",
  486. toast_alreadyclearing: "이미 일부 멘션을 삭제합니다.",
  487. toast_cleared: "모든 최근 멘션이 삭제되었습니다.",
  488. toast_clearing: "최근 멘션을 모두 지 웁니다."
  489. };
  490. case "lt": // Lithuanian
  491. return {
  492. context_dms: "Tiesioginiai pranešimai",
  493. context_guilds: "Visi serveriai",
  494. context_mutedguilds: "Nutildyti serveriai",
  495. context_pingedguilds: "„Pinged“ serveriai",
  496. context_unreadguilds: "Neskaityti serveriai",
  497. modal_confirmmentions: "Ar tikrai norite ištrinti visus neperskaitytus paminėjimus?",
  498. modal_confirmnotifications: "Ar tikrai norite ištrinti visus neperskaitytus pranešimus?",
  499. toast_alreadyclearing: "Kai kurie paminėjimai jau ištrinami",
  500. toast_cleared: "Visi naujausi paminėjimai buvo ištrinti",
  501. toast_clearing: "Išvalo visus naujausius paminėjimus"
  502. };
  503. case "nl": // Dutch
  504. return {
  505. context_dms: "Directe berichten",
  506. context_guilds: "Alle servers",
  507. context_mutedguilds: "Gedempte servers",
  508. context_pingedguilds: "Gepingde servers",
  509. context_unreadguilds: "Ongelezen servers",
  510. modal_confirmmentions: "Weet u zeker dat u alle ongelezen vermeldingen wilt verwijderen?",
  511. modal_confirmnotifications: "Weet u zeker dat u alle ongelezen meldingen wilt verwijderen?",
  512. toast_alreadyclearing: "Verwijdert al enkele vermeldingen",
  513. toast_cleared: "Alle recente vermeldingen zijn verwijderd",
  514. toast_clearing: "Wist alle recente vermeldingen"
  515. };
  516. case "no": // Norwegian
  517. return {
  518. context_dms: "Direktemeldinger",
  519. context_guilds: "Alle servere",
  520. context_mutedguilds: "Dempede servere",
  521. context_pingedguilds: "Pingede servere",
  522. context_unreadguilds: "Uleste servere",
  523. modal_confirmmentions: "Er du sikker på at du vil slette alle uleste omtaler?",
  524. modal_confirmnotifications: "Er du sikker på at du vil slette alle uleste varsler?",
  525. toast_alreadyclearing: "Sletter allerede noen omtaler",
  526. toast_cleared: "Alle nylige omtaler er slettet",
  527. toast_clearing: "Fjerner alle nylige omtaler"
  528. };
  529. case "pl": // Polish
  530. return {
  531. context_dms: "Bezpośrednie wiadomości",
  532. context_guilds: "Wszystkie serwery",
  533. context_mutedguilds: "Wyciszone serwery",
  534. context_pingedguilds: "Serwery pingowane",
  535. context_unreadguilds: "Nieprzeczytane serwery",
  536. modal_confirmmentions: "Czy na pewno chcesz usunąć wszystkie nieprzeczytane wzmianki?",
  537. modal_confirmnotifications: "Czy na pewno chcesz usunąć wszystkie nieprzeczytane powiadomienia?",
  538. toast_alreadyclearing: "Usuwa już niektóre wzmianki",
  539. toast_cleared: "Wszystkie ostatnie wzmianki zostały usunięte",
  540. toast_clearing: "Usuwa wszystkie ostatnie wzmianki"
  541. };
  542. case "pt-BR": // Portuguese (Brazil)
  543. return {
  544. context_dms: "Mensagens diretas",
  545. context_guilds: "Todos os servidores",
  546. context_mutedguilds: "Servidores Silenciados",
  547. context_pingedguilds: "Servidores com ping",
  548. context_unreadguilds: "Servidores não lidos",
  549. modal_confirmmentions: "Tem certeza de que deseja excluir todas as menções não lidas?",
  550. modal_confirmnotifications: "Tem certeza de que deseja excluir todas as notificações não lidas?",
  551. toast_alreadyclearing: "Exclui algumas menções já",
  552. toast_cleared: "Todas as menções recentes foram excluídas",
  553. toast_clearing: "Limpa todas as menções recentes"
  554. };
  555. case "ro": // Romanian
  556. return {
  557. context_dms: "Mesaje directe",
  558. context_guilds: "Toate serverele",
  559. context_mutedguilds: "Servere mutate",
  560. context_pingedguilds: "Servere pinged",
  561. context_unreadguilds: "Servere necitite",
  562. modal_confirmmentions: "Sigur doriți să ștergeți toate mențiunile necitite?",
  563. modal_confirmnotifications: "Sigur doriți să ștergeți toate notificările necitite?",
  564. toast_alreadyclearing: "Șterge deja câteva mențiuni",
  565. toast_cleared: "Toate mențiunile recente au fost șterse",
  566. toast_clearing: "Șterge toate mențiunile recente"
  567. };
  568. case "ru": // Russian
  569. return {
  570. context_dms: "Прямые сообщения",
  571. context_guilds: "Все серверы",
  572. context_mutedguilds: "Отключенные серверы",
  573. context_pingedguilds: "Проверенные серверы",
  574. context_unreadguilds: "Непрочитанные серверы",
  575. modal_confirmmentions: "Вы уверены, что хотите удалить все непрочитанные упоминания?",
  576. modal_confirmnotifications: "Вы действительно хотите удалить все непрочитанные уведомления?",
  577. toast_alreadyclearing: "Удаляет уже некоторые упоминания",
  578. toast_cleared: "Все недавние упоминания были удалены",
  579. toast_clearing: "Удаляет все недавние упоминания"
  580. };
  581. case "sv": // Swedish
  582. return {
  583. context_dms: "Direktmeddelanden",
  584. context_guilds: "Alla servrar",
  585. context_mutedguilds: "Dämpade servrar",
  586. context_pingedguilds: "Pingade servrar",
  587. context_unreadguilds: "Olästa servrar",
  588. modal_confirmmentions: "Är du säker på att du vill ta bort alla olästa omnämnanden?",
  589. modal_confirmnotifications: "Är du säker på att du vill ta bort alla olästa aviseringar?",
  590. toast_alreadyclearing: "Raderar några omnämnanden redan",
  591. toast_cleared: "Alla nya omnämnanden har tagits bort",
  592. toast_clearing: "Rensar alla senaste omnämnanden"
  593. };
  594. case "th": // Thai
  595. return {
  596. context_dms: "ข้อความโดยตรง",
  597. context_guilds: "เซิร์ฟเวอร์ทั้งหมด",
  598. context_mutedguilds: "เซิร์ฟเวอร์ที่ปิดเสียง",
  599. context_pingedguilds: "เซิร์ฟเวอร์ Pinged",
  600. context_unreadguilds: "เซิร์ฟเวอร์ที่ยังไม่ได้อ่าน",
  601. modal_confirmmentions: "แน่ใจไหมว่าต้องการลบข้อความที่ยังไม่ได้อ่านทั้งหมด",
  602. modal_confirmnotifications: "แน่ใจไหมว่าต้องการลบการแจ้งเตือนที่ยังไม่ได้อ่านทั้งหมด",
  603. toast_alreadyclearing: "ลบการกล่าวถึงบางส่วนแล้ว",
  604. toast_cleared: "ลบการกล่าวถึงล่าสุดทั้งหมดแล้ว",
  605. toast_clearing: "ล้างการพูดถึงล่าสุดทั้งหมด"
  606. };
  607. case "tr": // Turkish
  608. return {
  609. context_dms: "Direkt Mesajlar",
  610. context_guilds: "Tüm Sunucular",
  611. context_mutedguilds: "Sessiz Sunucular",
  612. context_pingedguilds: "Ping Gönderilen Sunucular",
  613. context_unreadguilds: "Okunmamış Sunucular",
  614. modal_confirmmentions: "Okunmamış tüm bahisleri silmek istediğinizden emin misiniz?",
  615. modal_confirmnotifications: "Okunmamış tüm bildirimleri silmek istediğinizden emin misiniz?",
  616. toast_alreadyclearing: "Zaten bazı bahsetmeleri siler",
  617. toast_cleared: "Son bahsedenlerin tümü silindi",
  618. toast_clearing: "Tüm son bahsedilenleri temizler"
  619. };
  620. case "uk": // Ukrainian
  621. return {
  622. context_dms: "Прямі повідомлення",
  623. context_guilds: "Усі сервери",
  624. context_mutedguilds: "Приглушені сервери",
  625. context_pingedguilds: "Pinged сервери",
  626. context_unreadguilds: "Непрочитані сервери",
  627. modal_confirmmentions: "Ви впевнені, що хочете видалити всі непрочитані згадки?",
  628. modal_confirmnotifications: "Ви впевнені, що хочете видалити всі непрочитані сповіщення?",
  629. toast_alreadyclearing: "Видаляє деякі згадки вже",
  630. toast_cleared: "Усі останні згадування були видалені",
  631. toast_clearing: "Очищає всі останні згадування"
  632. };
  633. case "vi": // Vietnamese
  634. return {
  635. context_dms: "Tin nhắn trực tiếp",
  636. context_guilds: "Tất cả máy chủ",
  637. context_mutedguilds: "Máy chủ bị tắt tiếng",
  638. context_pingedguilds: "Máy chủ Pinged",
  639. context_unreadguilds: "Máy chủ chưa đọc",
  640. modal_confirmmentions: "Bạn có chắc chắn muốn xóa tất cả các đề cập chưa đọc không?",
  641. modal_confirmnotifications: "Bạn có chắc chắn muốn xóa tất cả các thông báo chưa đọc không?",
  642. toast_alreadyclearing: "Đã xóa một số đề cập",
  643. toast_cleared: "Tất cả các đề cập gần đây đã bị xóa",
  644. toast_clearing: "Xóa tất cả các đề cập gần đây"
  645. };
  646. case "zh-CN": // Chinese (China)
  647. return {
  648. context_dms: "直接讯息",
  649. context_guilds: "所有服务器",
  650. context_mutedguilds: "静音服务器",
  651. context_pingedguilds: "绑定服务器",
  652. context_unreadguilds: "未读服务器",
  653. modal_confirmmentions: "您确定要删除所有未读的提及吗?",
  654. modal_confirmnotifications: "您确定要删除所有未读的通知吗?",
  655. toast_alreadyclearing: "已删除一些提及",
  656. toast_cleared: "最近所有提及的内容均已删除",
  657. toast_clearing: "清除所有最近提及的内容"
  658. };
  659. case "zh-TW": // Chinese (Taiwan)
  660. return {
  661. context_dms: "直接訊息",
  662. context_guilds: "所有服務器",
  663. context_mutedguilds: "靜音服務器",
  664. context_pingedguilds: "綁定服務器",
  665. context_unreadguilds: "未讀服務器",
  666. modal_confirmmentions: "您確定要刪除所有未讀的提及嗎?",
  667. modal_confirmnotifications: "您確定要刪除所有未讀的通知嗎?",
  668. toast_alreadyclearing: "已刪除一些提及",
  669. toast_cleared: "最近所有提及的內容均已刪除",
  670. toast_clearing: "清除所有最近提及的內容"
  671. };
  672. default: // English
  673. return {
  674. context_dms: "Direct Messages",
  675. context_guilds: "All Servers",
  676. context_mutedguilds: "Muted Servers",
  677. context_pingedguilds: "Pinged Servers",
  678. context_unreadguilds: "Unread Servers",
  679. modal_confirmmentions: "Are you sure you want to delete all unread Mentions?",
  680. modal_confirmnotifications: "Are you sure you want to delete all unread Notifications?",
  681. toast_alreadyclearing: "Already clearing some Mentions",
  682. toast_cleared: "All recent Mentions have been cleared",
  683. toast_clearing: "Clearing all recent Mentions"
  684. };
  685. }
  686. }
  687. };
  688. })(window.BDFDB_Global.PluginUtils.buildPlugin(changeLog));
  689. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement