Merge remote-tracking branch 'gerrit/master' into specialpages

Change-Id: I1bc48ac546865f515df65e9d7f0c75e7f5c6d684
This commit is contained in:
jdlrobson 2018-02-01 11:34:56 -08:00
commit 3047f3e0fa
33 changed files with 3812 additions and 113 deletions

View File

@ -3,7 +3,7 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "15.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.2.1"
"mediawiki/minus-x": "0.3.0"
},
"scripts": {
"test": [

View File

@ -54,5 +54,8 @@
"mobile-frontend-user-button-tooltip": "Паказаць мае паведамленьні",
"mobile-frontend-user-newmessages": "Вы маеце новыя паведамленьні на вашай старонцы гутарак",
"mobile-frontend-user-page-contributions": "Унёсак",
"mobile-frontend-user-page-member-since": "{{GENDER:$2|Далучыўся|Далучылася}} $1"
"mobile-frontend-user-page-member-since": "{{GENDER:$2|Далучыўся|Далучылася}} $1",
"mobile-frontend-user-page-talk": "Гутаркі",
"mobile-frontend-user-page-uploads": "Загрузкі",
"minerva-skin-desc": "Першая адаптыўная мабільная тэма афармленьня"
}

View File

@ -4,6 +4,7 @@
"Don Alessandro"
]
},
"mobile-frontend-editor-edit": "Deñiştir",
"mobile-frontend-history": "Bu saifeniñ deñiştirilme tarihını köster.",
"mobile-frontend-language-article-heading": "Başqa tilde oqu",
"mobile-frontend-main-menu-login": "Kiriş"

View File

@ -8,10 +8,12 @@
"minerva-talk-add-topic": "Dodôj diskùsëjã",
"mobile-frontend-editor-edit": "Editëjë",
"mobile-frontend-editor-redlink-create": "Ùsôdzë starnã",
"mobile-frontend-history": "Òbôczë historijã edicëji ti starnë.",
"mobile-frontend-editor-tutorial-confirm": "Naczni edicjã",
"mobile-frontend-history": "Òbaczë historijã edicëji ti starnë.",
"mobile-frontend-home-button": "Przédnô",
"mobile-frontend-language-article-heading": "Przeczëtôj w jinszim jãzëkù",
"mobile-frontend-language-change": "Zmieni jãzëk",
"mobile-frontend-languages-not-available": "Na starna nie je dostãpnô w jinëch jãzëkach.",
"mobile-frontend-main-menu-button-tooltip": "Òtemkni przédné menu",
"mobile-frontend-main-menu-contributions": "Mój wkłôd",
"mobile-frontend-main-menu-login": "Wlogùjë mie",

View File

@ -4,7 +4,6 @@
},
"minerva-last-modified-date": "Last edited on $1, at $2",
"minerva-talk-add-topic": "Add discussion",
"mobile-frontend-console-recruit": "\\o/ Hey! This is open source software and we need volunteers to help us build this thing, make it better and fix any bugs that you might be seeing in this JavaScript console!\n\nYou can find our backlog @ https://phabricator.wikimedia.org/project/profile/67/",
"mobile-frontend-cookies-required": "Cookies are required to switch view modes. Please enable them and try again.",
"mobile-frontend-editor-blocked-info-loggedin": "Your account is blocked from editing. The block was made by {{GENDER:$2|$2}} for the following reason: $1",
"mobile-frontend-editor-cta": "Help improve this page!",

View File

@ -51,6 +51,7 @@
"mobile-frontend-talk-back-to-filepage": "\"$1\" fitxategira bueltatu.",
"mobile-frontend-talk-back-to-page": "\"$1\" orrira bueltatu.",
"mobile-frontend-talk-back-to-projectpage": "\"$1\" proiektu orrira bueltatu.",
"mobile-frontend-talk-back-to-userpage": "\"{{GENDER:$1|$1}}\" erabiltzailearen orrira bueltatu.",
"mobile-frontend-user-button-tooltip": "Erakutsi nire jakinarazpenak",
"mobile-frontend-user-newmessages": "Zure eztaibaida orrian mezu berriak dituzu",
"mobile-frontend-user-page-contributions": "Ekarpenak",

View File

@ -8,52 +8,61 @@
"Sfic",
"Siddhartha Ghai",
"Smtchahal",
"Sachinkatiyar"
"Sachinkatiyar",
"Innocentbunny"
]
},
"minerva-last-modified-date": "अंतिम बार $1 को $2 बजे संपादित किया गया",
"mobile-frontend-cookies-required": "दृश्य मोड को स्विच करने के लिए कुकीज की आवश्यकता है कृपया उन्हें सक्षम करें और पुनः प्रयास करें।",
"mobile-frontend-editor-blocked-info-loggedin": "आपका खाता संपादन से अवरुद्ध है। निम्न कारण से {{GENDER:$2|$2}} द्वारा ब्लॉक किया गया था: $1",
"minerva-talk-add-topic": "चर्चा जोड़ें",
"mobile-frontend-console-recruit": "\\o/ हमें आपकी मदद चाहिए! यह एक मुक्त स्रोत सॉफ़्टवेयर है और हमें इसे बनाने के लिए स्वयंसेवक चाहिए। इसे बेहतर बनाइये और इसके जावास्क्रिप्ट कंसोल में आपको जो भी बग्स मिलें उन्हें ठीक कर दीजिए!\n\nआपको हमारा बैकलॉग यहाँ मिल जाएगा: https://phabricator.wikimedia.org/project/profile/67/",
"mobile-frontend-cookies-required": "दृश्य मोड को स्विच करने के लिए कुकीज़ की आवश्यकता है कृपया उन्हें सक्षम करें और पुनः प्रयास करें।",
"mobile-frontend-editor-blocked-info-loggedin": "आपके खाते को संपादन से अवरुद्ध कर दिया गया है। इसे {{GENDER:$2|$2}} द्वारा ब्लॉक किया गया था, इन कारणों से: $1",
"mobile-frontend-editor-cta": "इस पृष्ठ को बेहतर बनाने में मदद करें!",
"minerva-pointer-dismiss": "हटायें",
"mobile-frontend-editor-disabled": "यह पृष्ठ बर्बरता को रोकने के लिए सुरक्षित है",
"mobile-frontend-editor-disabled": "इस पृष्ठ को बर्बरता स रोकने के लिए सुरक्षित किया गया है",
"mobile-frontend-editor-edit": "संपादित करें",
"mobile-frontend-editor-redlink-create": "पृष्ठ बनाएँ",
"mobile-frontend-editor-redlink-explain": "यह पन्ना अभी तक बनाया नहीं गया है।",
"minerva-download": "डाउनलोड करें",
"mobile-frontend-editor-redlink-create": "पृष्ठ निर्मित करें",
"mobile-frontend-editor-redlink-explain": "इस पृष्ठ को अभी तक बनाया नहीं गया है।",
"mobile-frontend-editor-redlink-leave": "नहीं, धन्यवाद।",
"mobile-frontend-editor-tutorial-cancel": "नहीं, धन्यवाद",
"mobile-frontend-editor-tutorial-confirm": "संपादन शुरू करें",
"mobile-frontend-editor-tutorial-summary": "$1 पृष्ठ को सुधारने का प्रयास करें। <br /> मार्कअप से मत डरे।",
"mobile-frontend-editor-unavailable": "वर्तमान में मोबाइल एडिटिंग आपके ब्राउज़र पर उपलब्ध नहीं है। कृपया एक अलग ब्राउज़र को आज़माएं",
"mobile-frontend-editor-undo-unsupported": "पूर्ववत करें मोबाइल उपकरणों पर वर्तमान में समर्थित नहीं है।",
"mobile-frontend-editor-tutorial-summary": "$1 पृष्ठ को सुधारने का प्रयास करें। <br /> मार्कअप से मत घबराएँ",
"mobile-frontend-editor-unavailable": "वर्तमान में मोबाइल एडिटिंग आपके ब्राउज़र पर उपलब्ध नहीं है। कृपया कोई अन्य ब्राउज़र आज़माएँ",
"mobile-frontend-editor-undo-unsupported": "पूर्ववत की सुविधा मोबाइल उपकरणों पर वर्तमान में समर्थित नहीं है।",
"mobile-frontend-editor-uploadenable": "संपादन को सक्षम करने के लिए पहले एक फोटो अपलोड करें।",
"mobile-frontend-history": "इस पृष्ठ के संपादन इतिहास को देखें।",
"mobile-frontend-home-button": "घर",
"mobile-frontend-home-button": "गृहपृष्ठ",
"mobile-frontend-language-article-heading": "किसी अन्य भाषा में पढ़ें",
"mobile-frontend-language-change": "भाषा बदलें",
"mobile-frontend-languages-not-available": "यह पृष्ठ अन्य भाषाओं में उपलब्ध नहीं है।",
"mobile-frontend-logged-in-homepage-notification": "{{GENDER:$1|स्वागत है}}, $1 जी!",
"mobile-frontend-main-menu-button-tooltip": "मुख्य मेनू खोलें",
"mobile-frontend-main-menu-contributions": "योगदान",
"mobile-frontend-main-menu-login": "लॉग इन करें",
"mobile-frontend-main-menu-logout": "बंद करें",
"mobile-frontend-main-menu-nearby": "पास में",
"mobile-frontend-main-menu-login": "प्रवेश",
"mobile-frontend-main-menu-logout": "सत्रान्त",
"mobile-frontend-main-menu-nearby": "निकट",
"mobile-frontend-main-menu-settings": "सेटिंग्स",
"mobile-frontend-main-menu-watchlist": "ध्यानसूची",
"mobile-frontend-meta-data-issues": "पेज समस्याएं",
"mobile-frontend-meta-data-issues": "पृष्ठ संबंधित मसले",
"mobile-frontend-meta-data-issues-categories": "इस श्रेणी के बारे में",
"mobile-frontend-meta-data-issues-header": "समस्याएं",
"mobile-frontend-meta-data-issues-header": "मसले",
"mobile-frontend-meta-data-issues-header-talk": "इस पृष्ठ के बारे में",
"mobile-frontend-meta-data-issues-talk": "इस पृष्ठ के बारे में",
"mobile-frontend-notifications-filter": "छननी",
"mobile-frontend-meta-data-issues-talk": "इस वार्तापृष्ठ के बारे में",
"mobile-frontend-notifications-filter": "फ़िल्टर",
"mobile-frontend-pageaction-edit-tooltip": "इस पृष्ठ की भूमिका सम्पादित करें।",
"mobile-frontend-placeholder": "{{SITENAME}} में खोजें",
"mobile-frontend-random-button": "ोई भी",
"mobile-frontend-random-button": "यादृच्छिक",
"mobile-frontend-redirected-from": "\"$1\" से अनुप्रेषित",
"mobile-frontend-talk-back-to-page": "\"$1\" में वापस जाएँ।",
"mobile-frontend-talk-back-to-filepage": "फ़ाइल \"$1\" पर जाएँ",
"mobile-frontend-talk-back-to-page": "पृष्ठ \"$1\" पर वापस जाएँ।",
"mobile-frontend-talk-back-to-projectpage": "परियोजना पृष्ठ \"$1\" पर वापस जाएँ",
"mobile-frontend-talk-back-to-userpage": "सदस्य \"{{GENDER:$1|$1}}\" के सदस्य पृष्ठ पर वापस जाएँ",
"mobile-frontend-user-button-tooltip": "मेरी सूचनायें दिखाएँ",
"mobile-frontend-user-newmessages": "आपके वार्ता पृष्ठ पर नया सन्देश प्राप्त हुआ है।",
"mobile-frontend-user-newmessages": "आपके वार्ता पृष्ठ पर नए संदेश प्राप्त हुए हैं",
"mobile-frontend-user-page-contributions": "योगदान",
"mobile-frontend-user-page-member-since": "$1 से सदस्य",
"mobile-frontend-user-page-member-since": "{{GENDER:$2|$2}} $1 से सदस्य हैं",
"mobile-frontend-user-page-talk": "वार्ता",
"mobile-frontend-user-page-uploads": "अपलोड"
"mobile-frontend-user-page-uploads": "उपलोड्स",
"minerva-skin-desc": "मोबाइल के लिए एक तैयारशूदा विशेष आवरण"
}

View File

@ -3,18 +3,21 @@
"authors": [
"Adam-Yourist",
"Amire80",
"ElizaMag"
"ElizaMag",
"Tusholi"
]
},
"mobile-frontend-editor-edit": "Нийсде",
"mobile-frontend-home-button": "ЦӀенга",
"mobile-frontend-home-button": "Кертера",
"mobile-frontend-language-article-heading": "Дéша кхыча меттала",
"mobile-frontend-main-menu-button-tooltip": "Хьаела кертера меню",
"mobile-frontend-main-menu-login": "Чувала/яла",
"mobile-frontend-main-menu-nearby": "Уллув",
"mobile-frontend-main-menu-settings": "ГIирсаш тоаяраш",
"mobile-frontend-main-menu-watchlist": "Зем бара хьаязъяьр",
"mobile-frontend-pageaction-edit-tooltip": "Хувца укх оагIона хьалхале леладу дакъа",
"mobile-frontend-main-menu-settings": "Оттадар",
"mobile-frontend-main-menu-watchlist": "Зема хьаязъяьр",
"mobile-frontend-pageaction-edit-tooltip": "Нийсде укх оагIон хьалхе латта дакъа",
"mobile-frontend-placeholder": "Хьалáха {{grammar:prepositional|{{SITENAME}}}} чу",
"mobile-frontend-random-button": "Ца ховш нийсъенна"
"mobile-frontend-random-button": "Ца ховш нийсъенна",
"mobile-frontend-user-page-talk": "Дувцар",
"mobile-frontend-user-page-uploads": "Чудаьккхараш"
}

View File

@ -13,7 +13,7 @@
},
"minerva-talk-add-topic": "議論を追加",
"mobile-frontend-cookies-required": "表示モードを切り替えるには Cookie が必要です。有効にしてからもう一度お試しください。",
"mobile-frontend-editor-blocked-info-loggedin": "あなたのアカウントでは編集がブロックされています。{{GENDER:$2|$2}}のためブロック処理が行われました。以下はその理由です: $1",
"mobile-frontend-editor-blocked-info-loggedin": "あなたのアカウントでは編集がブロックされています。{{GENDER:$2|$2}} によりブロック処理が行われました。以下はその理由です: $1",
"mobile-frontend-editor-cta": "このページの改善にご協力ください",
"minerva-pointer-dismiss": "非表示",
"mobile-frontend-editor-disabled": "このページは荒らし防止のため保護されています。",
@ -25,9 +25,9 @@
"mobile-frontend-editor-tutorial-cancel": "不要です",
"mobile-frontend-editor-tutorial-confirm": "編集を開始",
"mobile-frontend-editor-tutorial-summary": "ページ $1 を改善してください。<br />マークアップを恐れずに。",
"mobile-frontend-editor-unavailable": "ご利用中のブラウザでは、現在編集できません。他のブラウザをお試しください。",
"mobile-frontend-editor-unavailable": "ご利用中のブラウザでは、現在編集できません。他のブラウザをお試しください。",
"mobile-frontend-editor-undo-unsupported": "現在、「元に戻す」は携帯機器に対応していません。",
"mobile-frontend-editor-uploadenable": "編集を可能にするにはまず写真をアップロードしてください。",
"mobile-frontend-editor-uploadenable": "編集をするにはまず写真をアップロードしてください。",
"mobile-frontend-history": "このページの編集履歴を閲覧",
"mobile-frontend-home-button": "ホーム",
"mobile-frontend-language-article-heading": "別の言語で閲覧",
@ -51,13 +51,14 @@
"mobile-frontend-placeholder": "{{SITENAME}}内を検索",
"mobile-frontend-random-button": "おまかせ表示",
"mobile-frontend-redirected-from": "「$1」から転送されました",
"mobile-frontend-talk-back-to-filepage": "ファイル「$1」に戻る",
"mobile-frontend-talk-back-to-page": "ページ「$1」に戻る",
"mobile-frontend-talk-back-to-projectpage": "プロジェクトページ「$1」に戻る",
"mobile-frontend-talk-back-to-filepage": "ファイル「$1」に戻る",
"mobile-frontend-talk-back-to-page": "ページ「$1」に戻る",
"mobile-frontend-talk-back-to-projectpage": "プロジェクトページ「$1」に戻る",
"mobile-frontend-talk-back-to-userpage": "「{{GENDER:$1|$1}}」の利用者ページに戻る。",
"mobile-frontend-user-button-tooltip": "自分宛の通知を表示",
"mobile-frontend-user-newmessages": "トークページに新しいメッセージが届きました",
"mobile-frontend-user-page-contributions": "投稿記録",
"mobile-frontend-user-page-member-since": "$1に{{GENDER:$2|参加}}",
"mobile-frontend-user-page-talk": "トーク",
"mobile-frontend-user-page-uploads": "アップロード"
}

View File

@ -9,7 +9,8 @@
"SPQRobin",
"Siebrand",
"Sjoerddebruin",
"Southparkfan"
"Southparkfan",
"Mar(c)"
]
},
"minerva-last-modified-date": "Laatst bewerkt op $1, om $2",
@ -61,7 +62,7 @@
"mobile-frontend-user-button-tooltip": "Uw meldingen weergeven",
"mobile-frontend-user-newmessages": "U hebt nieuwe berichten op uw overlegpagina",
"mobile-frontend-user-page-contributions": "Bijdragen",
"mobile-frontend-user-page-member-since": "{{GENDER:$2|Lid}} sinds $1",
"mobile-frontend-user-page-member-since": "$1 {{GENDER:$2|lid geworden}}",
"mobile-frontend-user-page-talk": "Overleg",
"mobile-frontend-user-page-uploads": "Uploads"
}

View File

@ -8,6 +8,7 @@
"minerva-talk-add-topic": "خبري آترې ورګډول",
"mobile-frontend-editor-edit": "سمول",
"mobile-frontend-editor-redlink-create": "مخ جوړول",
"mobile-frontend-editor-redlink-explain": "دا مخ لا تراوسه نه دي جوړ شوې.",
"mobile-frontend-editor-redlink-leave": "نه، مننه.",
"mobile-frontend-editor-tutorial-cancel": "نه مننه",
"mobile-frontend-history": "د دې مخ د سمون پېښليک کتل.",
@ -29,6 +30,7 @@
"mobile-frontend-pageaction-edit-tooltip": "د دې مخ د پيل برخه سمول.",
"mobile-frontend-placeholder": "{{SITENAME}} پلټل",
"mobile-frontend-random-button": "بېلابېل",
"mobile-frontend-talk-back-to-page": "و \"$1\" مخ ته وروګرځي.",
"mobile-frontend-talk-back-to-userpage": "بيرته د «{{GENDER:$1|$1}}» مخ ته وروګرځي.",
"mobile-frontend-user-page-contributions": "ونډې",
"mobile-frontend-user-page-talk": "خبرې اترې",

View File

@ -13,7 +13,6 @@
},
"minerva-last-modified-date": "Text that displays the date the page was last modified. Parameters:\n* $1 - date\n* $2 - time\n{{Related|Mobile-frontend-last-modified}}",
"minerva-talk-add-topic": "Label for button which shows at bottom of talk pages in mobile view prompting addition of topic",
"mobile-frontend-console-recruit": "Message that is displayed in the JavaScript console aimed at developers in an attempt to recruit volunteers. The \\o/ emoticon is a man with his arms in the air with the purpose of drawing attention to the message. If this doesn't translate into the destination language feel free to omit it or use something more applicable.",
"mobile-frontend-cookies-required": "Error message shown when user attempts to switch site modes and cookies are not enabled.",
"mobile-frontend-editor-blocked-info-loggedin": "Toast message for logged in users that appears (before the user see the editor) when a user tries to edit a page, but is blocked from editing with reason and blocked by information.\n\nParameters:\n* $1 - blocked by information (Username of the user who crated this block)\n* $2 - Reason for this block, if any",
"mobile-frontend-editor-cta": "Caption for call to action when an anonymous user clicks on edit icon. (Note the mobile site currently doesn't allow anonymous editing.)\n{{Identical|Help improve this page}}",

View File

@ -120,8 +120,6 @@ class MinervaHooks {
$skin = $out->getSkin();
$request = $special->getRequest();
// Ensure desktop version of Special:Preferences page gets mobile targeted modules
// FIXME: Upstream to core (?)
if ( $skin instanceof SkinMinerva ) {
switch ( $name ) {
case 'MobileMenu':
@ -133,9 +131,6 @@ class MinervaHooks {
'skins.minerva.mainMenu'
] );
break;
case 'Preferences':
$out->addModules( 'skins.minerva.special.preferences.scripts' );
break;
case 'Userlogin':
case 'CreateAccount':
// FIXME: Note mobile.ajax.styles should not be necessary here.

View File

@ -16,13 +16,16 @@ class MinervaUI {
* @param string $iconType element or before
* @param string $additionalClassNames additional class names you want to associate
* with the iconed element
* @param string $glyphPrefix optional prefix for icons. Defaults to minerva.
* @return string class name for use with HTML element
*/
public static function iconClass( $iconName, $iconType = 'element', $additionalClassNames = '' ) {
public static function iconClass( $iconName, $iconType = 'element', $additionalClassNames = '',
$glyphPrefix = 'minerva'
) {
$base = 'mw-ui-icon';
$modifiers = 'mw-ui-icon-' . $iconType;
if ( $iconName ) {
$modifiers .= ' mw-ui-icon-' . $iconName;
$modifiers .= ' mw-ui-icon-' . $glyphPrefix . '-' . $iconName;
}
return $base . ' ' . $modifiers . ' ' . $additionalClassNames;
}

View File

@ -110,7 +110,15 @@ class MinervaTemplate extends BaseTemplate {
$args = [
'clockIconClass' => MinervaUI::iconClass( 'clock-gray', 'before' ),
'arrowIconClass' => MinervaUI::iconClass(
'arrow-gray', 'element', 'mw-ui-icon-small mf-mw-ui-icon-rotate-anti-clockwise indicator' ),
'arrow-gray', 'element', 'mw-ui-icon-small mf-mw-ui-icon-rotate-anti-clockwise indicator',
// Uses icon in MobileFrontend so must be prefixed mf.
// Without MobileFrontend it will not render.
// Rather than maintain 2 versions (and variants) of the arrow icon which can conflict
// with each othe and bloat CSS, we'll
// use the MobileFrontend one. Long term when T177432 and T160690 are resolved
// we should be able to use one icon definition and break this dependency.
'mf'
),
] + $data['historyLink'];
$templateParser = new TemplateParser( __DIR__ );
return $templateParser->processTemplate( 'history', $args );

View File

@ -468,7 +468,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
->addComponent(
$this->msg( 'mobile-frontend-main-menu-contributions' )->escaped(),
SpecialPage::getTitleFor( 'Contributions', $user->getName() )->getLocalUrl(),
MinervaUI::iconClass( 'mf-contributions', 'before' ),
MinervaUI::iconClass( 'contributions', 'before' ),
[ 'data-event-name' => 'contributions' ]
);
}
@ -506,7 +506,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
'mobile-frontend-watchlist-purpose',
$watchlistQuery
),
MinervaUI::iconClass( 'mf-watchlist', 'before' ),
MinervaUI::iconClass( 'watchlist', 'before' ),
[ 'data-event-name' => 'watchlist' ]
);
}
@ -528,7 +528,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
$this->msg( 'mobile-frontend-main-menu-settings' )->escaped(),
SpecialPage::getTitleFor( 'MobileOptions' )->
getLocalUrl( [ 'returnto' => $returnToTitle ] ),
MinervaUI::iconClass( 'mf-settings', 'before' ),
MinervaUI::iconClass( 'settings', 'before' ),
[ 'data-event-name' => 'settings' ]
);
@ -543,7 +543,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
SpecialPage::getTitleFor( 'Preferences' ),
'prefsnologintext2'
),
MinervaUI::iconClass( 'mf-settings', 'before' ),
MinervaUI::iconClass( 'settings', 'before' ),
[ 'data-event-name' => 'preferences' ]
);
}
@ -593,12 +593,9 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
$lang = $this->getTitle()->getPageViewLanguage();
$tpl->set( 'pageLang', $lang->getHtmlCode() );
$tpl->set( 'pageDir', $lang->getDir() );
$language_urls = $this->getLanguages();
if ( count( $language_urls ) ) {
$tpl->setRef( 'language_urls', $language_urls );
} else {
$tpl->set( 'language_urls', false );
}
// If the array is empty, then instead give the skin boolean false
$language_urls = $this->getLanguages() ?: false;
$tpl->set( 'language_urls', $language_urls );
}
/**
@ -629,7 +626,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
->addComponent(
$this->msg( 'mobile-frontend-home-button' )->escaped(),
Title::newMainPage()->getLocalUrl(),
MinervaUI::iconClass( 'mf-home', 'before' ),
MinervaUI::iconClass( 'home', 'before' ),
[ 'data-event-name' => 'home' ]
);
@ -638,7 +635,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
->addComponent(
$this->msg( 'mobile-frontend-random-button' )->escaped(),
SpecialPage::getTitleFor( 'Randompage' )->getLocalUrl() . '#/random',
MinervaUI::iconClass( 'mf-random', 'before' ),
MinervaUI::iconClass( 'random', 'before' ),
[
'id' => 'randomButton',
'data-event-name' => 'random',
@ -655,7 +652,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
->addComponent(
$this->msg( 'mobile-frontend-main-menu-nearby' )->escaped(),
SpecialPage::getTitleFor( 'Nearby' )->getLocalURL(),
MinervaUI::iconClass( 'mf-nearby', 'before', 'nearby' ),
MinervaUI::iconClass( 'nearby', 'before', 'nearby' ),
[ 'data-event-name' => 'nearby' ]
);
}
@ -705,14 +702,14 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
->addComponent(
$username,
Title::newFromText( $username, NS_USER )->getLocalUrl(),
MinervaUI::iconClass( 'mf-profile', 'before', 'truncated-text primary-action' ),
MinervaUI::iconClass( 'profile', 'before', 'truncated-text primary-action' ),
[ 'data-event-name' => 'profile' ]
)
->addComponent(
$this->msg( 'mobile-frontend-main-menu-logout' )->escaped(),
$url,
MinervaUI::iconClass(
'mf-logout', 'element', 'secondary-action truncated-text' ),
'logout', 'element', 'secondary-action truncated-text' ),
[ 'data-event-name' => 'logout' ]
);
} else {
@ -727,7 +724,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
->addComponent(
$this->msg( 'mobile-frontend-main-menu-login' )->escaped(),
$url,
MinervaUI::iconClass( 'mf-anonymous', 'before' ),
MinervaUI::iconClass( 'login', 'before' ),
[ 'data-event-name' => 'login' ]
);
}
@ -890,6 +887,8 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
$pageUser = $this->getUserPageHelper()->getPageUser();
$talkPage = $pageUser->getTalkPage();
$data = [
// Talk page icon is provided by mobile.userpage.icons for time being
'userPageIconClass' => MinervaUI::iconClass( 'talk', 'before', 'talk', 'mf' ),
'talkPageTitle' => $talkPage->getPrefixedURL(),
'talkPageLink' => $talkPage->getLocalUrl(),
'talkPageLinkTitle' => $this->msg(
@ -1453,9 +1452,6 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
];
if ( $title->isMainPage() ) {
$styles[] = 'skins.minerva.mainPage.styles';
} elseif ( $this->getUserPageHelper()->isUserPage() ) {
$styles[] = 'skins.minerva.userpage.styles';
$styles[] = 'skins.minerva.userpage.icons';
}
return $styles;

View File

@ -1,5 +1,5 @@
{{#footer}}
<footer>
<footer class="minerva-footer">
{{{lastmodified}}}
<div class="post-content footer-content">
<h2>{{{headinghtml}}}</h2>

View File

@ -32,4 +32,4 @@
{{>footer}}
</div>
</div>
<!-- v:8.1.1 -->
<!-- v:8.1.2 -->

View File

@ -3,7 +3,7 @@
<a href="{{talkPageLink}}"
{{! data-title is used in talk overlay. Do not remove it }}
data-title="{{talkPageTitle}}"
class="mw-ui-icon mw-ui-icon-before mw-ui-icon-talk talk">{{talkPageLinkTitle}}</a>
class="{{userPageIconClass}}">{{talkPageLinkTitle}}</a>
</li>
<li>
<a href="{{contributionsPageLink}}">{{contributionsPageTitle}}</a>

3631
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,15 @@
@import 'minerva.variables';
@import 'minerva.mixins';
footer {
// style that applies only to minerva footer
.minerva-footer {
border-top: solid 1px @footerBorderColor;
overflow: auto;
padding-bottom: 6px;
}
// styles that apply to nested footer components
footer {
// links should be separated by same color
.hlist {
li:after {

View File

@ -12,10 +12,12 @@
Anchor = M.require( 'mobile.startup/Anchor' ),
skin = M.require( 'skins.minerva.scripts/skin' ),
disabledEditIcon = new Icon( {
name: 'edit'
name: 'edit',
glyphPrefix: 'minerva'
} ),
enabledEditIcon = new Icon( {
name: 'edit-enabled'
name: 'edit-enabled',
glyphPrefix: 'minerva'
} ),
currentPage = M.getCurrentPage(),
enabledClass = enabledEditIcon.getGlyphClassName(),
@ -44,6 +46,7 @@
}
/**
* Prepend an edit page button to the container
* Remove any existing links in the container
* @method
* @ignore
* @param {number} section number
@ -51,6 +54,7 @@
* @return {jQuery.Object} newly created edit page button
*/
function addEditButton( section, container ) {
$( container ).find( 'a' ).remove();
return $( '<a class="edit-page">' )
.attr( {
href: '#/editor/' + section,
@ -254,15 +258,17 @@
// FIXME: split the selector and cache it
if ( $caEdit.find( '.edit-page' ).length === 0 ) {
$( '.nojs-edit' ).removeClass( 'nojs-edit' );
$( '#ca-edit a' ).remove();
if ( isNewPage ||
( leadSection && leadSection.text() ) || page.getSections().length === 0 ) {
// if lead section is not empty, open editor with lead section
// In some namespaces (controlled by MFNamespacesWithoutCollapsibleSections)
// sections are not marked. Use the lead section for such cases.
addEditButton( 0, '#ca-edit' );
} else {
// if lead section is empty or does not exist, open editor with first section
} else if ( leadSection !== null ) {
// if lead section is empty open editor with first section
// be careful not to do this when leadSection is null as this means MobileFormatter has not
// been run and thus we could not identify the lead
addEditButton( 1, '#ca-edit' );
}
}

View File

@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g id="Page-1" fill="none" fill-rule="evenodd"><g id="watchstar" fill="#54595d"><path d="M8.91 9H1l6.007 5.86L5 23l7-4.319L19 23l-1.995-8.14L23 9h-7.909l-3.09-8-3.09 8zm.054 5.188L5.312 11h4.818L12 5.747 13.881 11h4.82l-3.653 3.2 1.099 4.956L12 16.516l-4.136 2.627 1.1-4.955z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 413 B

View File

@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#00af89" d="M8.91 9H1l6.007 5.86L5 23l7-4.319L19 23l-1.995-8.14L23 9h-7.909l-3.09-8z"/></svg>

Before

Width:  |  Height:  |  Size: 226 B

View File

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 269 B

View File

@ -1,7 +1,10 @@
( function ( M ) {
var View = M.require( 'mobile.startup/View' ),
Icon = M.require( 'mobile.startup/Icon' ),
notificationIcon = new Icon( { name: 'notifications' } ),
notificationIcon = new Icon( {
name: 'notifications',
glyphPrefix: 'minerva'
} ),
icons = M.require( 'mobile.startup/icons' );
/**

View File

@ -1,7 +1,7 @@
( function ( M, track ) {
var msg = mw.msg,
MAX_PRINT_TIMEOUT = 3000,
GLYPH = 'mf-download',
GLYPH = 'download',
Icon = M.require( 'mobile.startup/Icon' ),
browser = M.require( 'mobile.startup/Browser' ).getSingleton();
@ -34,13 +34,16 @@
*
* @param {Skin} skin
* @param {Number[]} [supportedNamespaces]
* @param {Window} [windowObj] window object
* @constructor
*/
function DownloadIcon( skin, supportedNamespaces ) {
function DownloadIcon( skin, supportedNamespaces, windowObj ) {
var options = {};
this.skin = skin;
this.window = windowObj || {};
this.supportedNamespaces = supportedNamespaces || [ 0 ];
options.tagName = 'li';
options.glyphPrefix = 'minerva';
options.title = msg( 'minerva-download' );
options.name = GLYPH;
Icon.call( this, options );
@ -65,7 +68,9 @@
return false;
}
if ( browser.isIos() || chromeVersion === false ) {
if ( browser.isIos() || chromeVersion === false ||
this.window.chrome === undefined
) {
// we support only chrome/chromium on desktop/android
return false;
}
@ -79,6 +84,10 @@
* Replace download icon with a spinner
*/
showSpinner: function () {
// FIXME: There is no spinner icon in Minerva, only in MobileFrontend
// Hopefully when T177432 is resolved this and corresponding change in hideSpinner
// should be unnecessary.
this.options.glyphPrefix = 'mf';
this.options.name = 'spinner';
this.render();
},
@ -86,6 +95,7 @@
* Restore download icon from spinner state
*/
hideSpinner: function () {
this.options.glyphPrefix = 'minerva';
this.options.name = GLYPH;
this.render();
},

View File

@ -228,7 +228,7 @@
* @ignore
*/
function appendDownloadButton() {
var downloadIcon = new DownloadIcon( skin, config.get( 'wgMinervaDownloadNamespaces' ) );
var downloadIcon = new DownloadIcon( skin, config.get( 'wgMinervaDownloadNamespaces' ), window );
if ( downloadIcon.isAvailable( navigator.userAgent ) ) {
// Because the page actions are floated to the right, their order in the

View File

@ -54,12 +54,5 @@
) );
}
}( mw.config.get( 'wgRedirectedFrom' ) ) );
// Recruit volunteers through the console (note console.log may not be a function so check via apply)
/* eslint-disable no-console */
if ( window.console && window.console.log && window.console.log.apply &&
mw.config.get( 'wgMFEnableJSConsoleRecruitment' ) ) {
console.log( mw.msg( 'mobile-frontend-console-recruit' ) );
}
/* eslint-enable no-console */
}( mw.mobileFrontend ) );

View File

@ -1,3 +1,8 @@
/*
FIXME: Remove file and module (and skins.minerva.userpage.icons)
when mobile.userpage.icons everywhere (T182162)
*/
@import 'minerva.variables';
@import 'minerva.mixins';

View File

@ -140,7 +140,7 @@
},
"skins.minerva.icons.images": {
"class": "ResourceLoaderImageModule",
"selector": ".mw-ui-icon-{name}:before",
"selector": ".mw-ui-icon-minerva-{name}:before, .mw-ui-icon-{name}:before",
"images": {
"notifications": "resources/skins.minerva.icons.images/bell.svg",
"mainmenu": "resources/skins.minerva.icons.images/hamburger.svg",
@ -151,8 +151,8 @@
}
},
"skins.minerva.icons.images.variants": {
"selectorWithoutVariant": ".mw-ui-icon-{name}:before",
"selectorWithVariant": ".mw-ui-icon-{name}-{variant}:before",
"selectorWithoutVariant": ".mw-ui-icon-minerva-{name}:before",
"selectorWithVariant": ".mw-ui-icon-minerva-{name}-{variant}:before",
"class": "ResourceLoaderImageModule",
"variants": {
"gray": {
@ -165,20 +165,15 @@
}
},
"images": {
"clock": "resources/skins.minerva.icons.images.variants/clock.svg",
"arrow": "resources/skins.minerva.icons.images.variants/arrow.svg"
"clock": "resources/skins.minerva.icons.images.variants/clock.svg"
}
},
"skins.minerva.icons.images.scripts": {
"class": "ResourceLoaderImageModule",
"selector": ".mw-ui-icon-{name}:before",
"selector": ".mw-ui-icon-minerva-{name}:before",
"position": "bottom",
"images": {
"mf-download": "resources/skins.minerva.icons.images.scripts/download.svg",
"watch": "resources/skins.minerva.icons.images.scripts/watch.svg",
"watched": "resources/skins.minerva.icons.images.scripts/watched.svg",
"user": "resources/skins.minerva.icons.images.scripts/userNormal.svg",
"anonymous": "resources/skins.minerva.icons.images.scripts/userAnonymous.svg"
"download": "resources/skins.minerva.icons.images.scripts/download.svg"
}
},
"skins.minerva.mainPage.styles": {
@ -193,7 +188,7 @@
},
"skins.minerva.userpage.icons": {
"class": "ResourceLoaderImageModule",
"selector": ".mw-ui-icon-{name}:before",
"selector": ".mw-ui-icon-mf-{name}:before, .mw-ui-icon-{name}:before",
"images": {
"talk": "resources/skins.minerva.userpage.icons/talk.svg",
"userpage": "resources/skins.minerva.userpage.icons/userpage.svg"
@ -210,9 +205,9 @@
},
"skins.minerva.mainMenu.icons": {
"class": "ResourceLoaderImageModule",
"selector": ".mw-ui-icon-mf-{name}:before",
"selector": ".mw-ui-icon-minerva-{name}:before",
"images": {
"anonymous": "resources/skins.minerva.mainMenu.icons/anonymous.svg",
"login": "resources/skins.minerva.mainMenu.icons/login.svg",
"home": "resources/skins.minerva.mainMenu.icons/home.svg",
"logout": "resources/skins.minerva.mainMenu.icons/logout.svg",
"nearby": "resources/skins.minerva.mainMenu.icons/nearby.svg",
@ -280,7 +275,6 @@
"mobile-frontend-meta-data-issues-header-talk",
"mobile-frontend-languages-not-available",
"mobile-frontend-cookies-required",
"mobile-frontend-console-recruit",
"minerva-download",
"mobile-frontend-redirected-from"
],

View File

@ -2,7 +2,12 @@
// FIXME: All this code can be removed when T117781/T171238 is resolved.
#preftoc {
text-align: center;
text-align: left;
// Horizontal scrolling
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
padding: 0;
li {
display: inline-block;
@ -39,6 +44,11 @@
}
}
// redudant on mobile - tab labels provide context
.mainLegend {
display: none;
}
.mw-htmlform-submit-buttons,
.mw-input {
select,

View File

@ -3,6 +3,8 @@
VALID_SUPPORTED_NAMESPACES = [ 0 ],
Skin = M.require( 'mobile.startup/Skin' ),
Deferred = $.Deferred,
windowChrome = { chrome: true },
windowNotChrome = {},
DownloadIcon = M.require( 'skins.minerva.scripts/DownloadIcon' ),
browser = M.require( 'mobile.startup/Browser' ).getSingleton(),
Page = M.require( 'mobile.startup/Page' );
@ -82,12 +84,12 @@
} );
QUnit.test( 'isAvailable() handles properly correct namespace', function ( assert ) {
var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES );
var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome );
assert.ok( icon.isAvailable( VALID_UA ) );
} );
QUnit.test( 'isAvailable() handles properly not supported namespace', function ( assert ) {
var icon = new DownloadIcon( this.skin, [ 9999 ] );
var icon = new DownloadIcon( this.skin, [ 9999 ], windowChrome );
assert.notOk( icon.isAvailable( VALID_UA ) );
} );
@ -98,19 +100,39 @@
title: 'Test',
isMainPage: true
} );
icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES );
icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome );
assert.notOk( icon.isAvailable( VALID_UA ) );
} );
QUnit.test( 'isAvailable() returns false for iOS', function ( assert ) {
var icon;
this.sandbox.stub( browser, 'isIos' ).returns( true );
icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES );
icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome );
assert.notOk( icon.isAvailable( VALID_UA ) );
} );
QUnit.test( 'isAvailable() uses window.chrome to filter certain chrome-like browsers', function ( assert ) {
var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowNotChrome );
// Dolphin
assert.notOk( icon.isAvailable( ' Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' ) );
// Opera
assert.notOk( icon.isAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36 OPR/44.1.2246.123029' ) );
// Maxthon
assert.notOk( icon.isAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.111 Mobile Safari/537.36 MxBrowser/4.5.10.1300' ) );
} );
QUnit.test( 'isAvailable() handles properly non-chrome browsers', function ( assert ) {
var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES );
var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome );
// IPhone 6 Safari
assert.notOk( icon.isAvailable( 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1' ) );
// Nokia Lumia 930 Windows Phone 8.1
assert.notOk( icon.isAvailable( 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Virtual) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537' ) );
// Firefox @ Ubuntu
assert.notOk( icon.isAvailable( 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0' ) );
} );
QUnit.test( 'isAvailable() handles properly non-chrome browsers', function ( assert ) {
var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowNotChrome );
// IPhone 6 Safari
assert.notOk( icon.isAvailable( 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1' ) );
// Nokia Lumia 930 Windows Phone 8.1
@ -130,7 +152,7 @@
} );
QUnit.test( 'isAvailable() handles properly supported browsers', function ( assert ) {
var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES );
var icon = new DownloadIcon( this.skin, VALID_SUPPORTED_NAMESPACES, windowChrome );
// Samsung Galaxy S7, Android 6, Chrome 44
assert.ok( icon.isAvailable( 'Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-G930F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36' ) );
// Samsung Galaxy A5, Android 7, Samsung Browser 5.2