فهرست منبع

ignore magic words only on Gamepedia

Markus-Rost 5 سال پیش
والد
کامیت
0f39c01ee8
10فایلهای تغییر یافته به همراه11 افزوده شده و 2 حذف شده
  1. 1 0
      i18n/de.json
  2. 1 0
      i18n/en.json
  3. 1 0
      i18n/fr.json
  4. 1 0
      i18n/nl.json
  5. 1 0
      i18n/pl.json
  6. 1 0
      i18n/pt.json
  7. 1 0
      i18n/ru.json
  8. 1 0
      i18n/tr.json
  9. 1 0
      i18n/zh.json
  10. 2 2
      main.js

+ 1 - 0
i18n/de.json

@@ -126,6 +126,7 @@
 			["bot", "Bot"],
 			["bureaucrat", "Bürokrat"],
 			["sysop", "Administrator"],
+			["interface-admin", "Oberflächen-Administrator"],
 			["content-moderator", "Inhalts-Moderator"],
 			["threadmoderator", "Diskussions-Moderator"],
 			["chatmoderator", "Chat-Moderator"],

+ 1 - 0
i18n/en.json

@@ -120,6 +120,7 @@
 			["bot", "Bot"],
 			["bureaucrat", "Bureaucrat"],
 			["sysop", "Administrator"],
+			["interface-admin", "Interface administrator"],
 			["content-moderator", "Content moderator"],
 			["threadmoderator", "Discussions moderator"],
 			["chatmoderator", "Chat moderator"],

+ 1 - 0
i18n/fr.json

@@ -123,6 +123,7 @@
 			["bot", "Robot"],
 			["bureaucrat", "Bureaucrate"],
 			["sysop", "Administrateur"],
+			["interface-admin", "Administrateur d’interface"],
 			["content-moderator", "Modérateur de contenu"],
 			["threadmoderator", "Modérateur de discussions"],
 			["chatmoderator", "Modérateur du tchat"],

+ 1 - 0
i18n/nl.json

@@ -124,6 +124,7 @@
 			["bot", "Bot"],
 			["bureaucrat", "Bureaucraat"],
 			["sysop", "Beheerder"],
+			["interface-admin", "Interfacemoderator"],
 			["content-moderator", "Inhoudmoderator"],
 			["threadmoderator", "Discussiemoderator"],
 			["chatmoderator", "Chatmoderator"],

+ 1 - 0
i18n/pl.json

@@ -125,6 +125,7 @@
 			["bot", "Bot"],
 			["bureaucrat", "Biurokrata"],
 			["sysop", "Adminsitrator"],
+			["interface-admin", "Administrator interfejsu"],
 			["content-moderator", "moderator treści"],
 			["threadmoderator", "moderator dyskusji"],
 			["chatmoderator", "moderator czatu"],

+ 1 - 0
i18n/pt.json

@@ -131,6 +131,7 @@
 			["bot", "Robô"],
 			["bureaucrat", "Burocrata"],
 			["sysop", "Administrador"],
+			["interface-admin", "Administrador da interface"],
 			["content-moderator", "Moderador de conteúdo"],
 			["threadmoderator", "Moderador de discussões"],
 			["chatmoderator", "Moderador do chat"],

+ 1 - 0
i18n/ru.json

@@ -122,6 +122,7 @@
 			["bot", "Бот"],
 			["bureaucrat", "Бюрократ"],
 			["sysop", "Администратор"],
+			["interface-admin", "Aдминистратор интерфейса"],
 			["content-moderator", "Модератор контента"],
 			["threadmoderator", "Модератор дискуссий"],
 			["chatmoderator", "Модератор чата"],

+ 1 - 0
i18n/tr.json

@@ -126,6 +126,7 @@
 			["bot", "Bot"],
 			["bureaucrat", "Bürokrat"],
 			["sysop", "Yönetici"],
+			["interface-admin", "Arayüz yöneticisi"],
 			["content-moderator", "İçerik moderatörü"],
 			["threadmoderator", "Tartışma moderatörü"],
 			["chatmoderator", "Sohbet moderatörü"],

+ 1 - 0
i18n/zh.json

@@ -121,6 +121,7 @@
 			["bot", "机器人"],
 			["bureaucrat", "行政员"],
 			["sysop", "管理员"],
+			["interface-admin", "界面管理员"],
 			["content-moderator", "内容版主"],
 			["threadmoderator", "讨论版主"],
 			["chatmoderator", "聊天主持人"],

+ 2 - 2
main.js

@@ -4976,7 +4976,7 @@ function newMessage(msg, wiki = defaultSettings.wiki, lang = i18n[defaultSetting
 			} );
 			
 			if ( embeds.length ) request( {
-				uri: wiki + 'api.php?action=query&meta=siteinfo&siprop=variables&titles=' + encodeURIComponent( embeds.map( embed => embed.title + '|Template:' + embed.title ).join('|') ) + '&format=json',
+				uri: wiki + 'api.php?action=query' + ( wiki.isFandom() ? '' : '&meta=siteinfo&siprop=variables' ) + '&titles=' + encodeURIComponent( embeds.map( embed => embed.title + '|Template:' + embed.title ).join('|') ) + '&format=json',
 				json: true
 			}, function( error, response, body ) {
 				if ( error || !response || response.statusCode !== 200 || !body || !body.query ) {
@@ -5004,7 +5004,7 @@ function newMessage(msg, wiki = defaultSettings.wiki, lang = i18n[defaultSetting
 							var template = querypages.find( template => template.ns === 10 && template.title.split(':').slice(1).join(':') === embed.title );
 							if ( template && template.missing === undefined ) embed.template = template.title.toTitle();
 						}
-						if ( embed.template || !body.query.variables.some( variable => variable.toUpperCase() === embed.title ) ) missing.push(embed);
+						if ( embed.template || !body.query.variables || !body.query.variables.some( variable => variable.toUpperCase() === embed.title ) ) missing.push(embed);
 					} ) );
 					if ( missing.length ) {
 						msg.sendChannel( missing.map( embed => embed.spoiler + '<' + wiki.toLink() + ( embed.template || embed.title.toTitle() + '?action=edit&redlink=1' ) + '>' + embed.spoiler ).join('\n'), {split:true} );