Paladox has submitted this change and it was merged. Change subject: Update Metrolook ......................................................................
Update Metrolook * Add translation support to description and the label guest. Change-Id: I907e70b59159e5b3a2b10cad3eadff6c4e820892 --- A Metrolook.i18n.php M Metrolook.php M MetrolookTemplate.php 3 files changed, 32 insertions(+), 3 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/Metrolook.i18n.php b/Metrolook.i18n.php new file mode 100644 index 0000000..b00c65c --- /dev/null +++ b/Metrolook.i18n.php @@ -0,0 +1,27 @@ +<?php + +/** + * Internationalization file for skin Foreground. + * + * @file + * @ingroup Skins + */ + +$messages = array(); + +/** English + * @author paladox + */ +$messages['en'] = array( + 'skinname-metrolook' => 'Metrolook', + 'metrolook-desc' => 'Metrolook skin for MediaWiki', + 'metrolook-guest' => 'Guest', +); + +/** qqq + * @author paladox + */ +$messages['qqq'] = array( + 'metrolook-desc' => '{{desc|name=Metrolook|url=http://www.mediawiki.org/wiki/Skin:Metrolook}}', + 'metrolook-guest' => 'Used for descbribing you as a guest editing the wiki.', +); diff --git a/Metrolook.php b/Metrolook.php index 858e66a..0449479 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -24,8 +24,8 @@ $GLOBALS['wgExtensionCredits']['skin'][] = array( 'path' => __FILE__, 'name' => 'Metrolook', - 'description' => 'Metrolook skin for MediaWiki.', - 'version' => '0.3.5', + 'descriptionmsg' => 'metrolook-desc', + 'version' => '0.3.6', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'paladox2015', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', @@ -35,6 +35,8 @@ $GLOBALS['wgAutoloadClasses']['SkinMetrolook'] = __DIR__ . '/SkinMetrolook.php'; $GLOBALS['wgAutoloadClasses']['MetrolookTemplate'] = __DIR__ . '/MetrolookTemplate.php'; +$GLOBALS['wgExtensionMessagesFiles']['MetrolookTemplate'] = __DIR__.'/Metrolook.i18n.php'; + // Register skin $GLOBALS['wgValidSkinNames']['metrolook'] = 'Metrolook'; diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index 4344307..530f4eb 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -306,7 +306,7 @@ <div class="vectorMenu" style="float:right;background-image:none;vertical-align:middle;height:40px;padding-left:10px;padding-right:10px;position:relative;top:5px;right:10px;width:auto;text-align:right;"> <a href="#" style="text-decoration:none;"><span id="username-top"><?php if ($_SERVER["REMOTE_ADDR"] == htmlspecialchars($this->getSkin()->getUser()->getName())) { -echo "Guest"; +echo wfMessage( 'metrolook-guest' )->text(); } else { echo htmlspecialchars( $this->getSkin()->getUser()->getName() ); -- To view, visit https://gerrit.wikimedia.org/r/176468 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I907e70b59159e5b3a2b10cad3eadff6c4e820892 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Metrolook Gerrit-Branch: REL1_22 Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com> Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits