User:Longbow4u/common.js

From Wikidata
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
mw.loader.load('//tools.wmflabs.org/wikidata-todo/autodesc.js');
importScript( 'User:Bene*/descriptions.js' ); // [[User:Bene*/descriptions.js]]

importScript( 'User:Magnus Manske/missing props.js' );
/**********************************************************************************
***********************************************************************************
**                 _       _          _ _      _     _                           **
**                | |     | |        | | |    (_)   | |                          **
**                | | __ _| |__   ___| | |     _ ___| |_ ___ _ __                **
**                | |/ _` | '_ \ / _ \ | |    | / __| __/ _ \ '__|               **
**                | | (_| | |_) |  __/ | |____| \__ \ ||  __/ |                  **
**                |_|\__,_|_.__/ \___|_|______|_|___/\__\___|_|     v2.2         **
**                                                                               **
** ----------------------------------------------------------------------------- **
**  How To use:                                                                  **
**   Add to your common.js [[Special:MyPage/common.js]],                         **
**   importScript( 'User:Jitrixis/labelLister.js' );                             **
**                                                                               **
**  Links:                                                                       **
**    [[User:Jitrixis/labelLister.js]]                                           **
**    [[User talk:Jitrixis/labelLister.js]]                                      **
**    [[Wikidata:Tools#User:Jitrixis.2FlabelLister.js]]                          **
**                                                                               **
**  Read me:                                                                     **
**   -This tool allows you to see the list of all labels, descriptions and       **
**    aliases of an item.                                                        **
**   -This also allows you to change the values mentioned above for a specific   **
**    language without having to change your main language.                      **
**   -By clicking the reload button, this allows you to refresh, the list of     **
**    labels if you are on the first menu or the default input values if you     **
**    are on the edit menu.                                                      **
**                                                                               **
**  How to change values:                                                        **
**   To change values you need to click on the edit button, then a dialog box    **
**   appear and ask you the language code that you want to edit. Once you typed  **
**   the language code an editing menu appear. Then you can edit values.         **
**   Click on save button to saving your change. When you have finished, click   **
**   on finish button to return to the first menu. Attention: all change will    **
**   be lost if they are not saved.                                              **
**                                                                               **
**   Tips and tricks:                                                            **
**    You can add or remove several aliases if separated by a vertical bar '|'   **
**                                                                               **
***********************************************************************************
**********************************************************************************/
( function ( mw, $ ) {
	'use strict';
 
	var itemId, itemIdDisp, transData, lang, buttonEtat, buttonApropos,
		userLangDir, floatStart, floatEnd, tipsyHorizontalGravity;
 
	/**
	 * Return item Number.
	 */
	itemId = mw.config.get( 'wbEntityId' );
	if( !itemId ) {
		return;
	}
	itemIdDisp = 'Q' + itemId.substr( 1 );
	if( itemId.substr( 0, 1 ) === 'p' ) {
		itemIdDisp = 'P' + itemId.substr( 1 );
	}
 
	/**
	 * Localized messages
	 */
	transData = {
		'en': {
			'box-title': 'Labels list',
			'box-cancel': 'Close',
			'label': 'Label',
			'description': 'Description',
			'alias': 'Alias',
			'doc': 'Documentation',
			'edit': 'Edit',
			'send': 'Save',
			'sended': 'Sent',
			'end': 'Finish',
			'reload': 'Reload',
			'language-code-prompt': 'Language code:',
			'all-delete': 'Delete all',
			'add': 'Add aliases',
			'remove': 'Remove aliases',
			'warning-alias': 'Separate aliases with |',
			'warning-message': 'Labels list of <b>' + itemIdDisp + '</b>:'
		},
                'bn': {
                        'box-title': 'লেবেলসমূহের তালিকা',
                        'box-cancel': 'বন্ধ',
                        'label': 'লেবেল',
                        'description': 'বর্ণনা',
                        'alias': 'উপনাম',
                        'doc': 'নথি',
                        'edit': 'সম্পাদনা',
                        'send': 'সংরক্ষণ',
                        'sended': 'প্রেরিত',
                        'end': 'সমাপ্ত',
                        'reload': 'পুনঃলোড',
                        'language-code-prompt': 'ভাষা কোড:',
                        'all-delete': 'সব মুছুন',
                        'add': 'উপনাম যোগ করুন',
                        'remove': 'উপনাম সরান',
                        'warning-alias': 'উপনামের সাথে | দিয়ে পৃথক করুন',
                        'warning-message': '<b>' + itemIdDisp + '</b>এর লেবেল তালিকা:'
                },
		'ca': {
			'box-title': 'Llista d\'etiquetes',
			'box-cancel': 'Tanca',
			'label': 'Etiqueta',
			'description': 'Descripció',
			'alias': 'També conegut com',
			'doc': 'Documentació',
			'edit': 'Modifica',
			'send': 'Desa',
			'sended': 'Enviats',
			'end': 'Acaba',
			'reload': 'Actualitza',
			'language-code-prompt': 'Codi d\'idioma:',
			'all-delete': 'Esborra-ho tot ',
			'add': 'Afegeix àlies',
			'remove': 'Suprimeix àlies',
			'warning-alias': 'Separa els àlies amb |',
			'warning-message': 'Llista d\'etiquetes de <b>' + itemIdDisp + '</b>:'
		},
		'de': {
			'box-title': 'Liste der Bezeichnungen',
			'box-cancel': 'Schließen',
			'label': 'Bezeichnung',
			'description': 'Beschreibung',
			'alias': 'Auch bekannt als',
			'doc': 'Dokumentation',
			'edit': 'Bearbeiten',
			'send': 'Speichern',
			'sended': 'Gesendet',
			'end': 'Beenden',
			'reload': 'Neu laden',
			'language-code-prompt': 'Sprachcode:',
			'all-delete': 'Alles löschen',
			'add': 'Alias hinzufügen',
			'remove': 'Alias entfernen',
			'warning-alias': 'Unterteile die Aliasse mit |',
			'warning-message': 'Bezeichnungen von <b>' + itemIdDisp + '</b> gelistet:'
		},
		'eo': {
			'box-title': 'Listo de etikedoj',
			'box-cancel': 'Fermu',
			'label': 'Etikedo',
			'description': 'Priskribo',
			'alias': 'Kromnomo',
			'warning-message': 'Listo de etikedoj de <b>' + itemIdDisp + '</b>:'
		},
		'es': {
			'box-title': 'Lista de etiquetas',
			'box-cancel': 'Cerrar',
			'label': 'Etiqueta',
			'description': 'Descripción',
			'alias': 'Alias',
			'doc': 'Documentación',
			'edit': 'Editar',
			'send': 'Guardar',
			'sended': 'Enviado',
			'end': 'Terminar',
			'reload': 'Actualizar',
			'language-code-prompt': 'Código de idioma:',
			'all-delete': 'Eliminar todos',
			'add': 'Añadir alias',
			'remove': 'Eliminar alias',
			'warning-alias': 'Separa los alias con |',
			'warning-message': 'Lista de etiquetas de <b>' + itemIdDisp + '</b>:'
		},
		'fr': {
			'box-title': 'Liste des libellés',
			'box-cancel': 'Fermer',
			'label': 'Libellé',
			'description': 'Description',
			'alias': 'Alias',
			'doc': 'Documentation',
			'edit': 'Modifier',
			'send': 'Enregistrer',
			'sended': 'Envoyés',
			'end': 'Terminer',
			'reload': 'Réactualiser',
			'language-code-prompt': 'Code de langage :',
			'all-delete': 'Tous supprimer',
			'add': 'Ajouter des alias',
			'remove': 'Supprimer des alias',
			'warning-alias': 'Séparer les alias avec |',
			'warning-message': 'Liste des libellés de <b>' + itemIdDisp + '</b> :'
		},
		'fa': {
			'box-title': 'فهرست برچسب‌ها',
			'box-cancel': 'ببند',
			'label': 'برچسب',
			'description': 'توضیح',
			'alias': 'نام‌های دیگر',
			'doc': 'توضیحات',
			'edit': 'ویرایش',
			'send': 'ذخیره',
			'sended': 'فرستاده شد',
			'end': 'پایان',
			'reload': 'اجرای مجدد',
			'language-code-prompt': 'کد زبان:',
			'all-delete': 'حذف همه',
			'add': 'افزودن نام‌های دیگر',
			'remove': 'حذف نام‌های دیگر',
			'warning-alias': 'جداسازی نام‌های دیگر با |',
			'warning-message': 'برچسب‌های فهرست <b>' + itemIdDisp + '</b>:'
		},
		'fi': {
			'box-title': 'Luettelo nimistä',
			'box-cancel': 'Sulje',
			'label': 'Nimi',
			'description': 'Kuvaus',
			'alias': 'Alias',
			'doc': 'Dokumentointi',
			'edit': 'Muokkaa',
			'send': 'Tallenna',
			'sended': 'Lähetetty',
			'end': 'Valmis',
			'reload': 'Päivitä',
			'language-code-prompt': 'Kielen koodi:',
			'all-delete': 'Poista kaikki',
			'add': 'Lisää aliaksia',
			'remove': 'Poista aliaksia',
			'warning-alias': 'Erota aliakset merkillä |',
			'warning-message': 'Luettelo nimistä <b>' + itemIdDisp + '</b>:'
		},
		'gl': {
			'box-title': 'Lista de etiquetas',
			'box-cancel': 'Pechar',
			'label': 'Etiqueta',
			'description': 'Descrición',
			'alias': 'Pseudónimos',
			'doc': 'Documentación',
			'edit': 'Editar',
			'send': 'Gardar',
			'sended': 'Enviado',
			'end': 'Terminar',
			'reload': 'Actualizar',
			'language-code-prompt': 'Código de lingua:',
			'all-delete': 'Eliminar todos',
			'add': 'Engadir pseudónimos',
			'remove': 'Eliminar pseudónimos',
			'warning-alias': 'Separa os pseudónimos con |',
			'warning-message': 'Lista de etiquetas de <b>' + itemIdDisp + '</b>:'
		},
		'gu': {
			'box-title': 'લેબલની યાદી',
			'box-cancel': 'બંધ કરો',
			'label': 'લેબલ',
			'description': 'વર્ણન',
			'alias': 'ઉપનામ',
			'edit': 'ફેરફાર કરો',
			'send': 'સાચવો',
			'sended': 'ફેરફાર સચવાઇ ગયો',
			'end': 'સમાપ્ત',
			'reload': 'ફરીથી લોડ કરો',
			'language-code-prompt': 'ભાષા સંજ્ઞા:',
			'all-delete': 'બધું રદ કરો',
			'add': 'ઉપનામ ઉમેરો',
			'remove': 'ઉપનામ રદ કરો',
			'warning-alias': 'ઉપનામોને | થી જુદા પાડો',
			'warning-message': '<b>' + itemIdDisp + '</b>ના લેબલની યાદી:'
		},
		'he': {
			'box-title': 'רשימת תוויות',
			'box-cancel': 'סגירה',
			'label': 'תווית',
			'description': 'תיאור',
			'alias': 'כינוי',
			'doc': 'תיעוד',
			'edit': 'עריכה',
			'send': 'שמירה',
			'sended': 'נשלח',
			'end': 'סיום',
			'reload': 'טעינה מחדש',
			'language-code-prompt': 'קוד שפה:',
			'all-delete': 'למחוק הכול',
			'add': 'הוספת כינויים',
			'remove': 'הסרת כינויים',
			'warning-alias': 'יש להפריד כינויים בתו |',
			'warning-message': 'רשימת כינויים של <b>' + itemIdDisp + '</b>:'
		},
		'hi': {
			'box-title': 'लेबल सूची',
			'box-cancel': 'बंद करें',
			'label': 'लेबल',
			'description': ' विवरण',
			'alias': 'उपनाम',
			'doc': 'प्रलेखन',
			'edit': 'सम्पादन',
			'send': 'सहेजें',
			'sended': 'भेज दिया',
			'end': ' समाप्त',
			'reload': 'पुनः लोड',
			'language-code-prompt': 'भाषा कोड:',
			'all-delete': 'सभी हटाएँ',
			'add': 'उपनाम जोड़ें',
			'remove': 'उपनाम निकालें',
			'warning-alias': 'उपनाम को \'|\' से अलग करें',
			'warning-message': '<b>' + itemIdDisp + '</b>की लेबल सूची:'
		},
               'hu': {
                       'box-title': 'Címkelista',
                       'box-cancel': 'Bezárás',
                       'label': 'Címke',
                       'description': 'Leírás',
                       'alias': 'Más nevek',
                       'edit': 'Szerkesztés',
                       'send': 'Mentés',
                       'end': 'Befejezés',
                       'reload': 'Újratöltés',
                       'lang': 'Nyelvkód',
                       'all-delete': 'Összes törlése',
                       'add': 'További nevek hozzáadása',
                       'remove': 'További nevek eltávolítása', 
                       'warning-alias': 'A további neveket \'|\' jellel válaszd el',
                       'warning-message': '' + itemIdDisp + ' címkéinek listája:'
               },
                'id': {
                        'box-title': 'Daftar label',
                        'box-cancel': 'Tutup',
                        'label': 'Label',
                        'description': 'Deskripsi',
                        'alias': 'Nama lain',
                        'doc': 'Dokumentasi',
                        'edit': 'Sunting',
                        'send': 'Simpan',
                        'sended': 'Kirim',
                        'end': 'Selesai',
                        'reload': 'Muat ulang',
                        'language-code-prompt': 'Kode bahasa:',
                        'all-delete': 'Hapus semua',
                        'add': 'Tambah nama lain',
                        'remove': 'Hapus nama lain',
                        'warning-alias': 'Pisahkan nama lain dengan |',
                        'warning-message': 'Daftar label dari <b>' + itemIdDisp + '</b>:'
                },
		'ilo': {
			'box-title': 'Listaan dagiti etiketa',
			'box-cancel': 'Irekep',
			'label': 'Etiketa',
			'description': 'Deskripsion',
			'alias': 'Sabali a nagan',
			'edit': 'Urnosen',
			'send': 'Idulin',
			'sended': 'Naipatuloden',
			'end': 'Nalpasen',
			'reload': 'Ikarga manen',
			'language-code-prompt': 'Kodigo ti pagsasao:',
			'all-delete': 'Ikkaten amin',
			'add': 'Agnayon kadagiti sabali a nagan',
			'remove': 'Ikkaten dagiti sabali a nagan',
			'warning-alias': 'Ilasin dagiti sabali a nagan iti \'|\'',
			'warning-message': 'Listaan dagiti etiketa ti <b>' + itemIdDisp + '</b>:'
		},
		'it': {
			'box-title': 'Etichette',
			'box-cancel': 'Chiudi',
			'label': 'Etichetta',
			'description': 'Descrizione',
			'alias': 'Alias',
			'doc': 'Documentazione',
			'edit': 'Modifica',
			'send': 'Salva',
			'sended': 'Inserito',
			'end': 'Termina',
			'reload': 'Aggiorna',
			'language-code-prompt': 'Codice de lingua:',
			'all-delete': 'Rimuovi tutto',
			'add': 'Aggiungi gli alias',
			'remove': 'Rimuovi gli alias',
			'warning-alias': 'Separa più alias con |',
			'warning-message': 'Lista di etichette di <b>' + itemIdDisp + '</b>:'
		},
		'ja': {
			'box-title': 'ラベル一覧',
			'box-cancel': '閉じる',
			'label': 'ラベル',
			'description': '説明',
			'alias': '別名',
			'doc': '説明書',
			'edit': '編集',
			'send': '保存',
			'sended': '送信しました',
			'end': '完了',
			'reload': '再読み込み',
			'language-code-prompt': '言語コード:',
			'all-delete': 'すべて削除',
			'add': '別名の追加',
			'remove': '別名の除去',
			'warning-alias': '「|」(半角縦線/バーティカルバー)を使って別名を分けることができます',
			'warning-message': '<b>' + itemIdDisp + '</b> のラベル一覧:'
		},
		'ko': {
			'box-title': '레이블 목록',
			'box-cancel': '닫기',
			'label': '레이블',
			'description': '설명',
			'alias': '별명',
			'edit': '편집',
			'send': '저장',
			'end': '끝내기',
			'reload': '새로 고침',
			'language-code-prompt': '언어 코드:',
			'all-delete': '모두 지우기',
			'add': '별명 추가',
			'remove': '별명 제거',
			'warning-alias': '별명은 \'|\'로 구분해주세요',
			'warning-message': '<b>' + itemIdDisp + '</b>의 레이블 목록:'
		},
		'ku': {
			'box-title': 'Lîsteya nîşanan',
			'box-cancel': 'Bigre',
			'label': 'Nîşan',
			'description': 'Danasîn',
			'alias': 'Herwiha tê zanîn wek',		   
			'edit': 'Biguherîne',
			'send': 'Tomar bike',
			'end': 'Bi dawî bike',
			'reload': 'Nû bike',
			'lang': 'Koda ziman',
			'all-delete': 'Hemûyan jê bibe',
			'add': 'Navên alternatîv lê zêde bike',
			'remove': 'Navên alternatîv jê bibe',
			'warning-alias': 'Navên alternatîv bixe bin \'|\'', 
			'warning-message': 'Lîsteya nîşanên <b>' + itemIdDisp + '</b> :'
		},
                'min': {
                        'box-title': 'Daftar label',
                        'box-cancel': 'Tutuik',
                        'label': 'Label',
                        'description': 'Deskripsi',
                        'alias': 'Namo lain',
                        'doc': 'Dokumentasi',
                        'edit': 'Suntiang',
                        'send': 'Simpan',
                        'sended': 'Kirim',
                        'end': 'Salasai',
                        'reload': 'Muek ulang',
                        'language-code-prompt': 'Kode bahaso:',
                        'all-delete': 'Hapuih sadonyo',
                        'add': 'Tambah namo lain',
                        'remove': 'Hapuih namo lain',
                        'warning-alias': 'Pisahkan namo lain jo |',
                        'warning-message': 'Daftar label dari <b>' + itemIdDisp + '</b>:'
                },
                'mk': {
                        'box-title': 'Список на натписи',
                        'box-cancel': 'Затвори',
                        'label': 'Надпис',
                        'description': 'Опис',
                        'alias': 'Алијас',
                        'doc': 'Документација',
                        'edit': 'Уреди',
                        'send': 'Зачувај',
                        'sended': 'Испратено',
                        'end': 'Заврши',
                        'reload': 'Превчитај',
                        'language-code-prompt': 'Јазичен код:',
                        'all-delete': 'Избриши сè',
                        'add': 'Додај алијаси',
                        'remove': 'Отстрани алијаси',
                        'warning-alias': 'Одделете ги алијасите со |',
                        'warning-message': 'Список на натпис за <b>' + itemIdDisp + '</b>:'
                },
		'nb': {
			'box-title': 'Etikettliste',
			'box-cancel': 'Lukk',
			'label': 'Etikett',
			'description': 'Beskrivelse',
			'alias': 'Også kjent som',
			'doc': 'Dokumentasjon',
			'edit': 'Rediger',
			'send': 'Lagre',
			'sended': 'Sendt',
			'end': 'Ferdig',
			'reload': 'Gjenoppfrisk',
			'language-code-prompt': 'Språkkode:',
			'all-delete': 'Slett alt',
			'add': 'Legg til aliaser',
			'remove': 'Fjern aliaser',
			'warning-alias': 'Skill aliaser med |',
			'warning-message': 'Etikettliste for <b>' + itemIdDisp + '</b>:'
		},
		'nl': {
			'box-title': 'Labellijst',
			'box-cancel': 'Sluiten',
			'label': 'Label',
			'description': 'Beschrijving',
			'alias': 'Alias',
			'doc': 'Documentatie',
			'edit': 'Bewerken',
			'send': 'Opslaan',
			'sended': 'Verzonden',
			'end': 'Voltooien',
			'reload': 'Herladen',
			'language-code-prompt': 'Taalcode:',
			'all-delete': 'Allemaal verwijderen',
			'add': 'Aliassen toevoegen',
			'remove': 'Aliassen verwijderen',
			'warning-alias': 'Scheid alliassen met |',
			'warning-message': 'Lijst van labels van <b>' + itemIdDisp + '</b>:'
		},
		'no': {
			'box-title': 'Etikettliste',
			'box-cancel': 'Lukk',
			'label': 'Etikett',
			'description': 'Beskrivelse',
			'alias': 'Også kjent som',
			'doc': 'Dokumentasjon',
			'edit': 'Rediger',
			'send': 'Lagre',
			'sended': 'Sendt',
			'end': 'Ferdig',
			'reload': 'Gjenoppfrisk',
			'language-code-prompt': 'Språkkode:',
			'all-delete': 'Slett alt',
			'add': 'Legg til aliaser',
			'remove': 'Fjern aliaser',
			'warning-alias': 'Skill aliaser med |',
			'warning-message': 'Etikettliste for <b>' + itemIdDisp + '</b>:'
		},
		'or': {
			'box-title': 'ଲେବଲ ସୂଚୀ',
			'box-cancel': 'ବନ୍ଦ କରିବେ',
			'label': 'ଲେବଲ',
			'description': 'ବିବରଣୀ',
			'alias': 'ଏଲିଆସ',
			'edit': 'ସମ୍ପାଦନା',
			'send': 'ପଠାଇବେ',
			'end': 'ଶେଷ କରିବେ',
			'reload': 'ପୁଣି ଲୋଡ଼ କରିବେ',
			'language-code-prompt': 'କୋଡ଼ ଭାଷା:',
			'all-delete': 'ସବୁ ହଟାଇବେ',
			'add': 'ଏଲିଆସ ଯୋଡ଼ିବେ',
			'remove': 'ଏଲିଆସ କାଢିବେ',
			'warning-alias': 'ଏଲିଆସକୁ \'|\' ଦେଇ ଅଲଗା କରିବେ',
			'warning-message': '' + itemIdDisp + ' ର ଲେବଲ ସୂଚୀ:'
		},
		'pl': {
			'box-title': 'Lista etykiet',
			'box-cancel': 'Zamknąć',
			'label': 'Etykieta',
			'description': 'Opis',
			'alias': 'Inne nazwy',
			'doc': 'Dokumentacja',
			'edit': 'Edytuj',
			'send': 'Zapisz',
			'sended': 'Wysłano',
			'end': 'Zakończ',
			'reload': 'Odśwież',
			'language-code-prompt': 'Kod języka:',
			'all-delete': 'Usuń wszystko',
			'add': 'Dodaj inne nazwy',
			'remove': 'Usuń inne nazwy',
			'warning-alias': 'Oddziel aliasy znakiem |',
			'warning-message': 'Lista etykiet dla elementu <b>' + itemIdDisp + '</b>:'
		},
		'pt': {
			'box-title': 'Lista de rótulos',
			'box-cancel': 'Fechar',
			'label': 'Rótulo',
			'description': 'Descrição',
			'alias': 'Nomes alternativos',
			'doc': 'Documentação',
			'edit': 'Editar',
			'send': 'Salvar',
			'sended': 'Enviado',
			'end': 'Terminar',
			'reload': 'Atualizar',
			'language-code-prompt': 'Código da língua:',
			'all-delete': 'Apagar tudo',
			'add': 'Adicionar nomes alternativos',
			'remove': 'Remover nomes alternativos',
			'warning-alias': 'Separe os nomes alternativos com |',
			'warning-message': 'Lista de rótulos de <b>' + itemIdDisp + '</b>:'
		},
		'pt-br': {
			'box-title': 'Lista de rótulos',
			'box-cancel': 'Fechar',
			'label': 'Rótulo',
			'description': 'Descrição',
			'alias': 'Nomes alternativos',
			'doc': 'Documentação',
			'edit': 'Editar',
			'send': 'Salvar',
			'sended': 'Enviado',
			'end': 'Terminar',
			'reload': 'Atualizar',
			'language-code-prompt': 'Código da língua:',
			'all-delete': 'Apagar tudo',
			'add': 'Adicionar nomes alternativos',
			'remove': 'Remover nomes alternativos',
			'warning-alias': 'Separe os nomes alternativos com |',
			'warning-message': 'Lista de rótulos de <b>' + itemIdDisp + '</b>:'
		},
		'ru': {
			'box-title': 'Названия',
			'box-cancel': 'Выход',
			'label': 'Название',
			'description': 'Описание',
			'alias': 'Другие названия',
			'doc': 'Документация',
			'edit': 'Редактировать',
			'send': 'Сохранить',
			'end': 'Вернуться',
			'reload': 'Обновить',
			'language-code-prompt': 'Код языка:',
			'all-delete': 'Удалить все',
			'add': 'Добавить другое название',
			'remove': 'Удалить другое название',
			'warning-alias': 'Разделитель для дополнительных названий |',
			'warning-message': 'Список названий для <b>' + itemIdDisp + '</b>:'
		},
		'zh': {
			'box-title': '标签列表',
			'box-cancel': '关闭',
			'label': '标签',
			'description': '描述',
			'alias': '别名',
			'doc': '文档',
			'edit': '编辑',
			'send': '保存',
			'sended': '已发送',
			'end': '完成',
			'reload': '重载',
			'language-code-prompt': '语言代码:',
			'all-delete': '全部删除',
			'add': '添加别名',
			'remove': '删除别名',
			'warning-alias': '使用 | 分隔别名',
			'warning-message': '<b>' + itemIdDisp + '</b> 标签列表:'
		},
		'zh-hans': {
			'box-title': '标签列表',
			'box-cancel': '关闭',
			'label': '标签',
			'description': '描述',
			'alias': '别名',
			'doc': '文档',
			'edit': '编辑',
			'send': '保存',
			'sended': '已发送',
			'end': '完成',
			'reload': '重载',
			'language-code-prompt': '语言代码:',
			'all-delete': '全部删除',
			'add': '添加别名',
			'remove': '删除别名',
			'warning-alias': '使用 | 分隔别名',
			'warning-message': '<b>' + itemIdDisp + '</b> 标签列表:'
		},
		'zh-hant': {
			'box-title': '標籤列表',
			'box-cancel': '關閉',
			'label': '標籤',
			'description': '描述',
			'alias': '別名',
			'doc': '文檔',
			'edit': '編緝',
			'send': '保存',
			'sended': '已发送',
			'end': '完成',
			'reload': '重載',
			'language-code-prompt': '語言代碼:',
			'all-delete': '全部刪除',
			'add': '添加別名',
			'remove': '刪除別名',
			'warning-alias': '使用 | 分隔別名',
			'warning-message': '<b>' + itemIdDisp + '</b> 標籤列表:'
		}
	};
 
	// Check if main language can be translated.
	lang = mw.config.get( 'wgUserLanguage' );
	if( !( lang in transData ) ) {
		lang = 'en';
	}
	userLangDir = $.uls.data.getDir( lang );
	if ( $.uls.data.isRtl( lang ) ) {
		floatStart = 'right';
		floatEnd = 'left';
		tipsyHorizontalGravity = 'e';
	}
	else {
		floatStart = 'left';
		floatEnd = 'right';
		tipsyHorizontalGravity = 'w';
	}
 
	/**
	 * Return localized message.
	 */
	function translate( key ) {
		if( transData[ lang ][ key ] ) {
			return transData[ lang ][ key ];
		}
		return transData.en[ key ];
	}
 
	// how the edit button should be
	buttonEtat = 0;
	buttonApropos = 0;
 
	/**
	 * Dialog and link
	 */
	function labelLister() {
		mw.loader.using( ['jquery.ui'], function () {
			var messageFind, portletLink, formFind,
				portletLinkNextNode, portletId,
				langWork, logoReload, dialogHeight = document.body.clientHeight - 60 ;
			if(dialogHeight >= 650){
				dialogHeight = 650;
			}
 
			formFind = '<div id="labelLister" title=""><form id="editForm"><div dir="ltr" id="box-apropos" style="font-weight:bold;white-space:nowrap;color:black;text-align:center;width:100%;font-family: monospace,Courier;font-size:0.95em"></div><div id="box-apropos-other"><div id="error-box" style="font-weight:bold;color:red;margin-left:auto;margin-right:auto;width:100%"></div><div id="edit-box" style="margin-left:auto;margin-right:auto;width:100%"></div><div id="labelLister-table" style="margin-left:auto;margin-right:auto;width:100%"></div><div id="labelLister-plugin" style="display:inline;width:100%"></div></div>';
			formFind += '</div></form></div>';
			if(document.getElementById("content")) {
				messageFind = $( formFind ).appendTo( '#content' );
			} else {
				messageFind = $( formFind ).appendTo( '#mw_content' );
			}
			messageFind.dialog({
				title: '<img id="labelLister-logo" src="//upload.wikimedia.org/wikipedia/commons/d/db/Symbol_list_class.svg" style="color:black;width:20px">' + translate( 'box-title' ) + '<span style="font-weight:normal;width:100%;text-align:right;color:red;font-size:0.85em">',
				autoOpen: false,
				modal: true,
				width: 900,
				height: dialogHeight,
				show: "blind",
				hide: "blind",
				buttons: [ {
					text: '?',
					title: translate( 'doc' ),
					id: 'button-apropos',
					click: function () {
						var changButtonContent;
 
						if (buttonApropos % 2 === 0) {
							apropos(translate( 'doc-page' ));
							document.getElementById("box-apropos-other").style.display="none";
							$('#button-apropos').empty();
							changButtonContent = 'X';
						} else {
							$('#box-apropos').empty();
							document.getElementById("box-apropos-other").style.display="inline";
							$('#button-apropos').empty();
							changButtonContent = '?';
						}
 
						$( '<span class="ui-button-text">' )
							.text( changButtonContent )
							.appendTo( '#button-apropos' );
 
						buttonApropos++;
					}
				},{
					text: translate( 'box-cancel' ),
					click: function () {
						$( this ).dialog( "close" );
						cancel();
					}
				},{
					text: translate( 'edit' ),
					autofocus: 'autofocus',
					id: 'button-cancel',
					click: function () {
						cancel();
					}
				},{
					text: translate( 'edit' ),
					autofocus: 'autofocus',
					id: 'button-edit',
					click: function () {
						if(buttonEtat % 2 === 0) {
							langWork = prompt(translate( 'language-code-prompt' ));
							setLanguageCode(langWork);
						} else {
							sendItem();
							dataSelect(document.getElementById("send-box-lang").value);
							dataSelect(document.getElementById("send-box-lang").value);
						}
					}
				},{
					text: translate( 'reload' ),
					title: translate( 'reload' ),
					id: 'button-reload',
					click: function () {
						if(buttonEtat % 2 === 0) {
							$('div#labelLister-table').empty();
							labelListing();
						} else {
							dataSelect(document.getElementById("send-box-lang").value);
						}
					}
				} ]
			} );
 
			portletLinkNextNode = $.uls.data.isRtl( lang ) ? '#ca-view' : '#ca-history';
			portletId = (mw.config.get( 'skin' ) === 'vector') ? 'p-views' : 'p-cactions';
 
			portletLink = mw.util.addPortletLink( portletId, '#', translate( 'box-title' ), 't-labelLister', translate( 'box-title' ), 'e', portletLinkNextNode );
 
			$('#button-cancel').empty();
			document.getElementById("button-cancel").style.display="none";
			$(".ui-dialog-buttonset").css("width","100%");
			$(".ui-button").css("float", floatEnd);
			$(portletLink).click( function () {
				$(".ui-dialog-buttonset").css("width","100%");
				$(".ui-button").css("float", floatEnd);
				$("#button-apropos").css("float", floatStart);
				$( 'div#labelLister' ).dialog( 'open' );
				$('div#labelLister-table').empty();
				$('#button-reload').empty();
				logoReload = '<span class="ui-button-text">\u21bb</span>';
				$( logoReload ).appendTo( '#button-reload' );
 
				if(buttonEtat % 2 === 0) {
					labelListing();
				}
				return false;
			} );
		} );
	}
 
	/**
	 * Sets the language code to edit.
	 */
	function setLanguageCode(code) {
		sendBoxDisp(code.toLowerCase());
		document.getElementById("labelLister-plugin").style.display = "none";
		$('#labelLister-table').empty();
		$('#button-edit').empty();
		document.getElementById("button-cancel").style.display = "inline";
 
		$( '<span class="ui-button-text">' + translate( 'send' ) + '</span>' ).appendTo( '#button-edit' );
		$( '<span class="ui-button-text">' + translate( 'end' ) + '</span>' ).appendTo( '#button-cancel' );
		buttonEtat++;
	}
 
	function cancel() {
		if(buttonEtat % 2 === 0) {
			return;
		}
 
		document.getElementById("labelLister-plugin").style.display="inline";
		$('#button-edit').empty();
		$('#button-cancel').empty();
		document.getElementById("button-cancel").style.display="none";
		$( '<span class="ui-button-text">' + translate( 'edit' ) + '</span>' ).appendTo( '#button-edit' );
		$('#edit-box').empty();
		$('div#labelLister-table').empty();
		labelListing();
		buttonEtat++;
	}
 
	/**
	 * List label, description and alias
	 */
	function labelListing() {
		$.ajax({
			url: mw.util.wikiScript( 'api' ),
			data: {
				format: 'json',
				action: 'wbgetentities',
				ids: itemId,
				props: 'labels|aliases|descriptions'
			},
			success: function ( data ) {
				var id, nb, codelg, langLink, langAttributes,
					labeltable = '<p>' +
						translate( 'warning-message' ) +
						'</p><table class="wikitable" style="margin-left:auto;margin-right:auto;width:95%;"><tbody><tr><th>#</th><th>' +
						translate( 'label' ) +
						'</th><th>' +
						translate( 'description' ) +
						'</th><th>' +
						translate( 'alias' ) +
						'</th></tr>',
					labels = {},
					descriptions = {},
					aliases = {},
					code = {},
					codeArray = [];
 
				for (id in data.entities[itemId].labels) {
					if ( data.entities[itemId].labels.hasOwnProperty( id ) ) {
						labels[id] = data.entities[itemId].labels[id].value;
						code[id] = true;
					}
				}
				for (id in data.entities[itemId].descriptions) {
					if ( data.entities[itemId].descriptions.hasOwnProperty( id ) ) {
						descriptions[id] = data.entities[itemId].descriptions[id].value;
						code[id] = true;
					}
				}
				for (id in data.entities[itemId].aliases) {
					if ( data.entities[itemId].aliases.hasOwnProperty( id ) ) {
						aliases[id] = '';
						code[id] = true;
						for (nb in data.entities[itemId].aliases[id]) {
							if ( data.entities[itemId].aliases[id].hasOwnProperty( nb ) ) {
								aliases[id] += '<span style="white-space:nowrap;margin-right:5px;border-style:solid;border-radius:3px;border-width:1px;border-color:grey;unicode-bidi:-webkit-isolate;unicode-bidi:-moz-isolate;unicode-bidi:isolate;"><p style="display:inline;">&nbsp;' + data.entities[itemId].aliases[id][nb].value.replace(/&/g, '&amp;') + '&nbsp;</p></span> ';
							}
						}
					}
				}
 
				for (id in code) {
					if ( code.hasOwnProperty( id ) ) {
						codeArray.push(id);
					}
				}
 
				codeArray.sort();
				for (codelg in codeArray) {
					if ( codeArray.hasOwnProperty( codelg ) ) {
						id = codeArray[codelg];
						if (typeof labels[id] === 'undefined') {
							labels[id] = '&nbsp;';
						}
						if (typeof descriptions[id] === 'undefined') {
							descriptions[id] = '&nbsp;';
						}
						if (typeof aliases[id] === 'undefined') {
							aliases[id] = '&nbsp;';
						}
 
						langAttributes = 'lang="' + id + '" dir="' + $.uls.data.getDir( id ) + '"';
						langLink = '<a href="#' + id + '" class="labelLister-lang-link">' + id + '</a>';
						if (id === mw.user.options.get( 'language' )) {
							langLink = '<b>' + langLink + '</b>';
							labels[id] = '<b>' + labels[id] + '</b>';
							descriptions[id] = '<b>' + descriptions[id] + '</b>';
							aliases[id] = '<b>' + aliases[id] + '</b>';
						}
 
						labeltable += '<tr>' +
							'<td dir="ltr" lang="en" class="labelLister-table-lang" id="labelLister-table-lang-' + id + '">' + langLink + '</td>' +
							'<td ' + langAttributes + ' class="labelLister-table-label" id="labelLister-table-label-' + id + '">' + labels[id] + '</td>' +
							'<td ' + langAttributes + ' class="labelLister-table-desc" id="labelLister-table-desc-' + id + '">' + descriptions[id] + '</td>' +
							'<td ' + langAttributes + ' class="labelLister-table-alias" id="labelLister-table-alias-' + id + '">' + aliases[id] + '</td>' +
							'</tr>';
					}
				}
 
				labeltable += '</tbody></table>';
 
				$( labeltable ).appendTo( '#labelLister-table' );
 
				$( '.labelLister-lang-link' ).click( function () {
					setLanguageCode( $( this ).attr( 'href' ).substr( 1 ));
				});
			},
			error: function () {
				mw.notify( 'API Error', { title: 'labelLister.js :', tag: 'labelLister' } );
				onError();
			}
		});
	}
 
	/**
	 * Send the input value on the edit menu
	 */
	function setItem( item, summary ) {
		$.ajax( {
			type: 'POST',
			url: mw.util.wikiScript( 'api' ),
			data: {
				format: 'json',
				action: 'wbeditentity',
				id: itemId,
				type: 'item',
				token: mw.user.tokens.get( 'csrfToken' ),
				data: item,
				summary: '[[MediaWiki_talk:Gadget-labelLister.js|labelLister]] ' + summary,
				exclude: 'pageid|ns|title|lastrevid|touched|sitelinks'
			},
			success: function ( data ) {
				if(data.hasOwnProperty( "error" )){
					mw.notify( 'API Error' + $.toJSON(data), { title: 'labelLister.js :', tag: 'labelLister' } );
					$('#green-box').empty();
					$('#red-box').empty();
					$('#red-box').append( data.error.info.replace(/\n/g, ' ') );
				}else{
					$('#green-box').empty();
					$('#green-box').append(summary);
					mw.notify( translate( 'sended' ), { title: 'labelLister.js :', tag: 'labelLister' } );
				}
			},
			error: function () {
				mw.notify( 'API Error', { title: 'labelLister.js :', tag: 'labelLister' } );
				onError();
				$('#green-box').empty();
				$('#red-box').empty();
				$('#red-box').append("API Error");
			}
		} );
	}
 
	/**
	 * Main controler of input default value.
	 */
	function dataSelect(language) {
		document.getElementById("send-box-label").value = '';
		document.getElementById("send-box-description").value = '';
		document.getElementById("send-box-label-origin").value = '';
		document.getElementById("send-box-description-origin").value = '';
		document.getElementById("send-box-alias").value = '';
		document.getElementById("send-box-alias-add").value = '';
		document.getElementById("send-box-alias-remove").value = '';
		document.getElementById("send-box-alias-clean").checked = false;
		dataSelectLabel(language);
		dataSelectDesc(language);
		dataSelectAlias(language);
	}
 
	/**
	 * Set Lebel input default value
	 */
	function dataSelectLabel(language) {
		$.ajax({
			url: mw.util.wikiScript( 'api' ),
			data: {
				format: 'json',
				action: 'wbgetentities',
				ids: itemId,
				props: 'labels'
			},
			success: function ( data ) {
				document.getElementById("send-box-label").value = data.entities[itemId].labels[language].value;
				document.getElementById("send-box-label-origin").value = data.entities[itemId].labels[language].value;
			},
			error: function () {
				mw.notify( 'API Error', { title: 'labelLister.js :', tag: 'labelLister' } );
				onError();
			}
		});
	}
 
	/**
	 * Set description input default value
	 */
	function dataSelectDesc(language) {
		$.ajax({
			url: mw.util.wikiScript( 'api' ),
			data: {
				format: 'json',
				action: 'wbgetentities',
				ids: itemId,
				props: 'descriptions'
			},
			success: function ( data ) {
				document.getElementById("send-box-description").value = data.entities[itemId].descriptions[language].value;
				document.getElementById("send-box-description-origin").value = data.entities[itemId].descriptions[language].value;
			},
			error: function () {
				mw.notify( 'API Error', { title: 'labelLister.js :', tag: 'labelLister' } );
				onError();
			}
		});
	}
 
	/**
	 * Set Alias list of edit menu
	 */
	function dataSelectAlias(language) {
		$.ajax({
			url: mw.util.wikiScript( 'api' ),
			data: {
				format: 'json',
				action: 'wbgetentities',
				ids: itemId,
				props: 'aliases'
			},
			success: function ( data ) {
				var nb,
					aliaslister = '',
					aliaslisterSans = '';
 
				for (nb in data.entities[itemId].aliases[language]) {
					if ( data.entities[itemId].aliases[language].hasOwnProperty( nb ) ) {
						if(nb !== 0) {
							aliaslister += '|';
						}
						aliaslister += data.entities[itemId].aliases[language][nb].value;
						aliaslisterSans += '<span style="white-space:nowrap;font-size:0.9em;margin-right:auto;margin-left:auto;border-style:solid;border-radius:3px;border-width:1px;border-color:grey"><p style="display:inline;">&nbsp;' + data.entities[itemId].aliases[language][nb].value.replace(/&/g, '&amp;') + '&nbsp;</p></span><br/>';
					}
				}
 
				document.getElementById("send-box-alias").value = aliaslister;
				$('#send-box-alias-list').empty();
				$( aliaslisterSans ).appendTo( '#send-box-alias-list' );
			},
			error: function () {
				mw.notify( 'API Error', { title: 'labelLister.js :', tag: 'labelLister' } );
				onError();
			}
		});
	}
 
	/**
	 * Display the send Box
	 */
	function sendBoxDisp(language) {
		var sendBox;
 
		sendBox += '<div>' + translate( 'language-code-prompt' ) + '<b>' + language + '<input type="hidden" id="send-box-lang" value="' + language + '"/></b><span id="green-box" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:75%;text-align:' + floatEnd + ';float:' + floatEnd + ';color:green;font-weight:bold;"></span><span id="red-box" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:75%;text-align:' + floatEnd + ';float:' + floatEnd + ';color:red;font-weight:bold;"></span></div>';
		sendBox += '<fieldset><legend>' + translate( 'label' ) + ' :</legend><input style="width:100%;" type="text" id="send-box-label"/><input type="hidden" id="send-box-label-origin"/></fieldset>';
		sendBox += '<fieldset><legend>' + translate( 'description' ) + ' :</legend><input style="width:100%;" type="text" id="send-box-description"/><input type="hidden" id="send-box-description-origin"/></fieldset>';
		sendBox += '<fieldset><legend>' + translate( 'alias' ) + ' : <span id="help-alias"></span></legend><span style="float:' + floatEnd + ';clear:right;"><input type="checkbox" id="send-box-alias-clean"/><label for="send-box-alias-clean">' + translate( 'all-delete' ) + '</label></span><div style="border-style:dashed;border-color:black;border-width:1px;width:25%;height:150px;float:' + floatEnd + ';clear:' + floatEnd + ';overflow:auto;margin-top:10px" id="send-box-alias-list"></div><br/><label for="send-box-alias-add">' + translate( 'add' ) + '</label> :<br/><input style="width:70%;" type="text" id="send-box-alias-add" title="' + translate( 'warning-alias' ) + '"/><br/><br/><label for="send-box-alias-remove">' + translate( 'remove' ) + '</label> :<br/><input style="width:70%;" type="text" id="send-box-alias-remove" title="' + translate( 'warning-alias' ) + '"/><input type="hidden" id="send-box-alias"/></fieldset>';
		$( sendBox ).appendTo( '#edit-box' );
		dataSelect(language);
		mw.loader.using( 'jquery.tipsy', function () {
			$('#help-alias').prepend(
			$( '<img>', {
				src: "data:image/gif;base64,R0lGODlhCwALALMAAP///01NTZOTk1lZWefn57i4uJSUlPPz82VlZdDQ0HFxcaysrNvb28TExAAAAAAAACH5BAAAAAAALAAAAAALAAsAAAQrUIRJqQQ455nNNBgHJANBDAwgZsVwqIG2IEQYYwXy2lq/Kg3NqqeSVCqCCAA7",
				title: translate( 'warning-alias' )
			} )
			.tipsy({
				gravity: tipsyHorizontalGravity,
				fade: true,
				delayIn: 100
			})
		);
		});
		mw.loader.using( 'jquery.tipsy', function () {
			$('#send-box-alias-add').tipsy({
				trigger: 'focus',
				gravity: 'n',
				fade: true,
				delayIn: 50
			});
		});
		mw.loader.using( 'jquery.tipsy', function () {
			$('#send-box-alias-remove').tipsy({
				trigger: 'focus',
				gravity: 'n',
				fade: true,
				delayIn: 50
			});
		});
	}
 
	/**
	 * Control how to send an item
	 */
	function sendItem() {
		var jsonAliasArray,
			nb,
			inputLang = document.getElementById("send-box-lang").value,
			inputLabel = document.getElementById("send-box-label").value,
			inputLabelOld = document.getElementById("send-box-label-origin").value,
			inputDesc = document.getElementById("send-box-description").value,
			inputDescOld = document.getElementById("send-box-description-origin").value,
			inputAliasAll = document.getElementById("send-box-alias").value,
			inputAliasAdd = document.getElementById("send-box-alias-add").value,
			inputAliasRemove = document.getElementById("send-box-alias-remove").value,
			inputAliasClean = document.getElementById("send-box-alias-clean").checked,
			inputSummary = "[" + inputLang + "] ",
			jsonAlias = [],
			jsonDesc = {},
			jsonLabel = {};
 
		$('#green-box').empty();
		$('#red-box').empty();
		$('#green-box').append('...');
 
		//CREATE LABEL SAVE
		jsonLabel[inputLang] = {
			language: inputLang,
			value: inputLabel
		};
		if(inputLabel !== inputLabelOld) {
			inputSummary += 'label (' + inputLabel + ') ';
		}
 
		//CREATE DESCRIPTION SAVE
		jsonDesc[inputLang] = {
			language: inputLang,
			value: inputDesc
		};
		if(inputDesc !== inputDescOld) {
			inputSummary += 'description (' + inputDesc + ') ';
		}
 
		//CREATE ALIAS ADD AND REMOVE
		if(inputAliasClean === true) {
			inputAliasRemove = inputAliasAll;
		}
 
		if(inputAliasRemove !== "") {
			inputSummary += 'del (';
		}
		inputAliasRemove = inputAliasRemove.split("|");
		for (nb in inputAliasRemove) {//DEL
			if(inputAliasRemove[nb] !== "") {
				jsonAliasArray = {
					"language": inputLang,
					"value": inputAliasRemove[nb],
					"remove": ""
				};
				if(nb !== 0) {
					inputSummary += '|';
				}
				inputSummary += inputAliasRemove[nb];
				jsonAlias.push(jsonAliasArray);
			}
		}
		if(inputAliasRemove != "") {
			inputSummary += ') ';
		}
		if(inputAliasAdd !== "") {
			inputSummary += 'add (';
		}
		inputAliasAdd = inputAliasAdd.split("|");
		for (nb in inputAliasAdd) {//ADD
			if(inputAliasAdd[nb] !== "") {
				jsonAliasArray = {
					"language": inputLang,
					"value": inputAliasAdd[nb],
					"add": ""
				};
				if(nb !== 0) {
					inputSummary += '|';
				}
				inputSummary += inputAliasAdd[nb];
				jsonAlias.push(jsonAliasArray);
			}
		}
		if(inputAliasAdd != "") {
			inputSummary += ')';
		}
		setItem( $.toJSON( {
			labels: jsonLabel,
			descriptions: jsonDesc,
			aliases: jsonAlias
		} ), inputSummary);
	}
 
	function apropos() {
		var dataApropos,
			dataAproposHead = "***********************************************************************************<br/>***********************************************************************************<br/>**                 _       _          _ _      _     _                           **<br/>**                | |     | |        | | |    (_)   | |                          **<br/>**                | | __ _| |__   ___| | |     _ ___| |_ ___ _ __                **<br>**                | |/ _` | '_ \\ / _ \\ | |    | / __| __/ _ \\ '__|               **<br/>**                | | (_| | |_) |  __/ | |____| \\__ \\ ||  __/ |                  **<br/>**                |_|\\__,_|_.__/ \\___|_|______|_|___/\\__\\___|_|     v2.2         **<br/>**                                                                               **<br/>** ----------------------------------------------------------------------------- **",
			dataAproposFoot = "**                                                                               **<br/>***********************************************************************************<br>***********************************************************************************";
 
		dataAproposHead = dataAproposHead.replace(/ /g, '&nbsp;');
		dataAproposFoot = dataAproposFoot.replace(/ /g, '&nbsp;');
		dataApropos = dataAproposHead +
			'<div dir="' + userLangDir + '" style="font-weight:bold;white-space:nowrap;color:black;text-align:center;width:100%;font-family: monospace,Courier;font-size:0.95em">' +
			documentation(lang) +
			'</div>' +
			dataAproposFoot;
 
		$('#box-apropos').append( dataApropos );
	}
 
	function documentation(language) {
		var apropos;
		switch (language) {
			case 'en':
				apropos = "**  Apropos:                                                                     **\n**   CC BY-SA - Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  Links:                                                                       **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools#LabelLister]]                                             **\n**                                                                               **\n**  Read me:                                                                     **\n**   -This tool allows you to see the list of all labels, descriptions and       **\n**    aliases of an item.                                                        **\n**   -This also allows you to change the values mentioned above for a specific   **\n**    language without having to change your main language.                      **\n**   -By clicking the reload button, this allows you to refresh, the list of     **\n**    labels if you are on the first menu or the default input values if you     **\n**    are on the edit menu.                                                      **\n**                                                                               **\n**  How to change values:                                                        **\n**   To change values you need to click on the edit button, then a dialog box    **\n**   appear and ask you the language code that you want to edit. Once you typed  **\n**   the language code an editing menu appear. Then you can edit values.         **\n**   Click on save button to saving your change. When you have finished, click   **\n**   on finish button to return to the first menu. Attention: all change will    **\n**   be lost if they are not saved.                                              **\n**                                                                               **\n**   Tips and tricks:                                                            **\n**    You can add or remove several aliases if separated by a vertical bar '|'   **";
			break;
			case 'fr':
				apropos = "**  À propos :                                                                   **\n**   CC BY-SA – Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  Liens :                                                                      **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools#LabelLister]]                                             **\n**                                                                               **\n**  Lisez-moi :                                                                  **\n**   - Cet outil vous permet de voir la liste de tous les libellés,              **\n**    descriptions et alias d'un article.                                        **\n**   - Il vous permet aussi de changer les valeurs, mentionnées ci-dessus, pour  **\n**    une langue spécifique sans avoir à changer votre langue principale.        **\n**   - En cliquant sur le bouton réactualiser, vous pourrez rafraîchir soit la   **\n**    listes des libellés si vous êtes dans le premier menu soit les valeurs     **\n**    par défaut des entrées sur le menu d'édition.                              **\n**                                                                               **\n**  Comment changer les valeurs :                                                **\n**   Pour changer les valeurs, vous devez cliquer sur le boutton Modifier, puis  **\n**   une boîte de dialogue apparaît et vous demande quel code de langage         **\n**   vous voulez modifier. Dès que vous avez entré le code de langage un menu    **\n**   d'édition apparaît. Enfin vous pouvez modifier ces valeurs.                 **\n**   Cliquez sur le boutton Enregistrer pour enregistrer vos changement. Dès que **\n**   vous avez terminé, cliquez sur le boutton Terminer pour retourner sur le    **\n**   premier menu. Attention : Tous les changements seront perdus s'ils ne       **\n**   sont pas sauvegardés.                                                       **\n**                                                                               **\n**   Trucs et Astuces :                                                          **\n**    Vous pouvez ajouter ou supprimer plusieurs alias en les séparant par une   **\n**    barre verticale '|'                                                        **";
			break;
			case 'ca':
				apropos = "**  Llicència:                                                                   **\n**   CC BY-SA – Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  Enllaços:                                                                    **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools#LabelLister]]                                             **\n**                                                                               **\n**  Llegeix-me:                                                                  **\n**   - Aquesta eina permet veure la llista de totes les etiquetes, descripcions  **\n**    i àlies d'un element.                                                      **\n**   - Us permetrà de canviar les dades esmentades més amunt pel que fa a        **\n**    l'idioma específic sense haver a canviar la vostra llengua principal.      **\n**   - Clicant sobre el botó actualitza, podreu refrescar tant la llista de      **\n**    les etiquetes si us trobeu al primer menú, com les dades per defecte       **\n**    de les entrades al menú d'edició.                                          **\n**                                                                               **\n**  Com canviar les valors:                                                      **\n**   Per canviar les valors, heu de clicar sobre el botó Modifica i es           **\n**   visualitza una finestra de diàleg. Us demana quin codi d'idioma voleu       **\n**   modificar. Una vegada hàgiu introduït aquest codi d'idioma, es visualitza   **\n**   un menú d'edició. A la fi, podeu modificar aquestes dades.                  **\n**   Cliqueu a sobre el botó Desa per desar els vostres canvis. Quan hagueu      **\n**   acabat, cliqueu sobre el botó Acaba per a tornar cap al primer menú.        **\n**   Atenció: Es perdran tots els canvis si no estan desats.                     **\n**                                                                               **\n**   Trucs i astúcies:                                                           **\n**    Podeu afegir o suprimir uns quants àlies separant-los amb el símbol '|'.   **";
			break;
			case 'de':
				apropos = "**  Apropos:                                                                     **\n**   CC BY-SA - Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  Links:                                                                       **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools/de#labelLister]]                                          **\n**                                                                               **\n**  Lies mich:                                                                   **\n**   -Dieses Tool erlaubt dir, eine Liste aller Bezeichnungen, Beschreibungen    **\n**    und Aliasse eines Items anzusehen.                                         **\n**   -Es erlaubt dir außerdem, die Werte einer bestimmten Sprache zu ändern,     **\n**    ohne die Spracheinstellungen zu ändern.                                    **\n**   -Durch einen Klick auf den \"Neu Laden\"-Button kannst du die Liste           **\n**    aktualisieren, wenn du im Hauptmenü bist, und die alten Werte laden, wenn  **\n**    du im Bearbeiten-Menü bist.                                                **\n**                                                                               **\n**  Wie man Werte verändert:                                                     **\n**   Um Werte zu verändern, musst du auf den \"Bearbeiten\"-Knopf drücken, sodass  **\n**   ein Dialogfenster erscheint, das dich nach der Sprache fragt, die du        **\n**   bearbeiten willst. Wenn du einen Sprachcode eingegeben hast, wird ein       **\n**   \"Bearbeiten\"-Menü erscheinen, in dem du Werte bearbeiten kannst.            **\n**   Klicke auf den \"Speichern\"-Knopf, um deine Änderungen zu speichern. Wenn du **\n**   fertig bist, klicke auf \"Fertig\", damit du wieder in das Hauptmenü          **\n**   zurückkehrst. Achtung: Alle Änderungen gehen verloren, wenn du nicht        **\n**   gespeichert hast.                                                           **\n**                                                                               **\n**   Tipps und Tricks:                                                           **\n**    Du kannst mehrere Aliasse hinzufügen und entfernen, wenn du sie mit einem  **\n**    senkrechten Strich ('|') unterteilst.                                      **";
			break;
			case 'es':
				apropos = "**  A propósito:                                                                 **\n**   Licencia CC BY-SA - Creative Commons Attribution/Share-Alike                **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  Enlaces :                                                                    **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools#LabelLister]]                                             **\n**                                                                               **\n**  Léeme :                                                                      **\n**   -Esta herramienta permite ver la lista de todas las etiquetas,              **\n**    descripciones y alias de un elemento.                                      **\n**   -También permite cambiar los valores mencionados arriba para un idioma      **\n**    específico sin tener que cambiar el idioma principal.                      **\n**   -Haciendo clic en el botón Actualizar, puede refrescarse la lista de        **\n**    etiquetas (desde el primer menú) o resetearse los valores de entrada       **\n**    por defecto (desde el menú de edición).                                    **\n**                                                                               **\n**  Cómo cambiar los valores:                                                    **\n**   Para cambiar los valores, hay que hacer clic en el botón Editar, y          **\n**   entonces aparecerá un cuadro de diálogo preguntando el código del idioma    **\n**   que se desea editar. Una vez que se haya introducido el código, aparecerá   **\n**   un menú de edición. Entonces podrán modificarse los valores.                **\n**   Hay que hacer clic en el botón Guardar para guardar el cambio. Una vez      **\n**   que se haya acabado de editar el idioma, hay que hacer clic en el botón     **\n**   Terminar para volver al primer menú. Atención: todos los cambios se         **\n**   perderán si no se guardan.                                                  **\n**                                                                               **\n**   Consejos y trucos :                                                         **\n**    Pueden añadirse o eliminarse varios alias a la vez si se separan con la    **\n**    barra vertical '|'.                                                        **";
			break;
			case 'fa':
				apropos = "**  موارد مورد نظر :                                                             **\n**   CC BY-SA - Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  پیوندها :                                                                    **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools#LabelLister]]                                             **\n**                                                                               **\n**  راهنما :                                                                     **\n**   -این ابزار به شما اجازه می‌دهد که فهرست آیتم‌ها،  برچسب‌هایشان، توضیحاتشان     **\n**    و نام‌های دیگرشان را در قالب جدول مشاهده نمائید.                            **\n**   -به شما اجازه می‌دهد که مقدارهای ذکر شده را بدون تغییر زبان‌تان تغییر دهید.   **\n**   -با فشردن دکمهٔ به‌روز رسانی می توانید فهرستتان را به‌روز نمائید               **\n**                                                                               **\n**  چگونه متغییرها را تغییر دهیم :                                               **\n**   برای تغییر مقدارها باید بر روی دکمهٔ ویرایش کلیک کنید.                       **\n**   از شما نام زبانی را که قصد ویرایش آن را دارید را خواهد پرسید و سپس می توانید**\n**   مقدارهای آن زبان را تغییر دهید و با زدن دکمهٔ ذخیره آنها را ذخیره نمائید     **\n**   در صورت نطدن دکمهٔ ذخیره اطلاعات ازبین می‌رود!                                 **\n**                                                                               **\n**   ترفندها :                                                                   **\n**   شما می‌توانید چندین نام دیگر را با قراردادن  '|' در میان‌آنها بیافزائید یا    **\n**   حذف نمائید.                                                                 **";
			break;
			case 'it':
				apropos = "**  A proposito:                                                                 **\n**   CC BY-SA - Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/deed.it                       **\n**                                                                               **\n**  Collegamenti :                                                               **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Strumenti#Lista etichette]]                                     **\n**                                                                               **\n**  Leggimi :                                                                    **\n**   -Questo strumento permette di vedere la lista di tutte le etichette,        **\n**    descrizioni e alias di un elemento.                                        **\n**   -Permette anche di cambiare i valori menzionati sopra per una specifica     **\n**    lingua senza dover cambiare la tua lingua principale.                      **\n**   -Cliccando sul pulsante aggiorna, puoi aggiornare sia la lista delle        **\n**    etichette se sei nel primo menù sia i valori di default delle voci se sei  **\n**    nel menù di modifica.                                                      **\n**                                                                               **\n**  Come cambiare i valori :                                                     **\n**   Per cambiare i valori devi cliccare sul pulsante modifica, poi apparirà un  **\n**   popup che ti chiederà di scrivere il codice della lingua da modificare.     **\n**   Una volta che avrai digitato il codice della lingua apparirà un menù di     **\n**   modifica. Ora puoi modificare i valori.                                     **\n**   Clicca sul pulsante Salva per salvare i cambiamenti. Una volta terminato,   **\n**   clicca sul pulsante Termina per tornare al primo menù. Attenzione : tutti i **\n**   cambiamenti andranno persi se non verranno salvati.                         **\n**                                                                               **\n**   Trucchi e suggerimenti :                                                    **\n**    Puoi aggiungere o rimuovere più alias separandoli con una barra            **\n**    verticale '|'                                                              **";
			break;
			case 'nl':
				apropos = "**  Apropos:                                                                     **\n**   CC BY-SA - Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  Links :                                                                      **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools#LabelLister]]                                             **\n**                                                                               **\n**  Read me :                                                                    **\n**   -Deze tool zorgt voor een lijst van labels, beschrijvingen en aliassen van  **\n**    een item                                                                   **\n**   -Deze tool zorgt er ook voor dat je deze waarden kan veranderen zonder      **\n**    je taal te hoeven veranderen.                                              **\n**   -Door op herladen te klikken zal de lijst ververst worden als je bij het    **\n**    eerste menu bent of alle waarden worden teruggezet naar de standaard als   **\n**    je bij het bewerk menu bent.                                               **\n**                                                                               **\n**  How to change values :                                                       **\n**   Om waarden te veranderen moet je op de bewerkknop drukken, waarna een menu  **\n**   verschijnt en vraagt welke taalcode je wilt bewerken. Als je dat ingetypt   **\n**   hebt zal het bewerkmenu verschijnen. Hierna kun je waardes aanpassen.       **\n**   Klik op de knop opslaan als je klaar bent met het bewerken van de taalcode. **\n**   Klik op beëindigen als je wilt met het bewerken van de taalcodes.           **\n**   Waarschuwing: alle veranderingen die niet opgeslagen zijn nadat ze zijn     **\n**   toegevoegd zullen verloren gaan als je op beëindigen klikt                  **\n**                                                                               **\n**   Tips & trucs :                                                              **\n**    Je kan meerdere aliassen toevoegen door deze te scheiden met sluisteken '|'**";
			break;
			case 'ru':
				apropos = "**  Лицензия:                                                                    **\n**   CC BY-SA - Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  Ссылки :                                                                     **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools#LabelLister]]                                             **\n**                                                                               **\n**  Прочтите :                                                                   **\n**   - Этот инструмент позволяет просмотреть список всех названий, описаний и    **\n**     дополнительных названий для объекта.                                      **\n**   - Он также позволяет менять значения указанных выше параметров для          **\n**     выбранного языка не меняя при этом язык интерфейса.                       **\n**   - Кнопка \"Обновить\" позволяет перегрузить список меток если вы находитесь в **\n**     первом меню, или установить начальные параметры в окне редактирования.    **\n**                                                                               **\n**  Как изменять значения :                                                      **\n**   Чтобы изменить значения вам необходимо надать на кнопку \"Редактировать\",    **\n**   после чего появится диалоговое окно с выбором языка, информацию на котором  **\n**   вы хотите редактировать. После того как вы ввели код языка (для русского    **\n**   языка - ru) появится окно редактирования, в котором вы можете менять        **\n**   значения. Чтобы сохранить изменения нажмите кнопку \"Сохранить\". Чтобы       **\n**   вернуться к первому меню со списком нажмите кнопку \"Вернуться\". Чтобы выйти **\n**   из окна инструмента нажмите кнопку \"Выход\". Внимание: если вы не сохранили  **\n**   изменения, то они будут потеряны.                                           **\n**                                                                               **\n**   Советы :                                                                    **\n**    Вы можете добавить или удалить сразу несколько дополнительных названий     **\n**    (алиасов) если воспользуетесь вертикальной чертой '|' в качестве           **\n**    разделителя.                                                               **";
			break;
			default:
				apropos = "**  Apropos:                                                                     **\n**   CC BY-SA - Creative Commons Attribution/Share-Alike License                 **\n**   http://creativecommons.org/licenses/by-sa/3.0/                              **\n**                                                                               **\n**  Links:                                                                       **\n**    [[User:Jitrixis/labelLister.js]]                                           **\n**    [[User talk:Jitrixis/labelLister.js]]                                      **\n**    [[Wikidata:Tools#LabelLister]]                                             **\n**                                                                               **\n**  Read me:                                                                     **\n**   -This tool allows you to see the list of all labels, descriptions and       **\n**    aliases of an item.                                                        **\n**   -This also allows you to change the values mentioned above for a specific   **\n**    language without having to change your main language.                      **\n**   -By clicking the reload button, this allows you to refresh, the list of     **\n**    labels if you are on the first menu or the default input values if you     **\n**    are on the edit menu.                                                      **\n**                                                                               **\n**  How to change values:                                                        **\n**   To change values you need to click on the edit button, then a dialog box    **\n**   appear and ask you the language code that you want to edit. Once you typed  **\n**   the language code an editing menu appear. Then you can edit values.         **\n**   Click on save button to saving your change. When you have finished, click   **\n**   on finish button to return to the first menu. Attention: all change will    **\n**   be lost if they are not saved.                                              **\n**                                                                               **\n**   Tips and tricks:                                                            **\n**    You can add or remove several aliases if separated by a vertical bar '|'   **";
		}
		apropos = apropos.replace(/\n/g, '<br/>');
		apropos = apropos.replace(/ /g, '&nbsp;');
 
		return apropos;
	}
 
	$( document ).ready( labelLister );
} ( mediaWiki, jQuery ) );