Aleksey Bekh-Ivanov (WMDE) has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/328677 )
Change subject: Simplify form setup: `placeholder` -> `placeholder-message`
......................................................................
Simplify form setup: `placeholder` -> `placeholder-message`
Form is capable to translate message by itself.
Change-Id: I74cf06f8ef89177f71db16862e5141057cf79c24
---
M repo/includes/Specials/SpecialNewItem.php
M repo/includes/Specials/SpecialNewProperty.php
2 files changed, 6 insertions(+), 18 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/77/328677/1
diff --git a/repo/includes/Specials/SpecialNewItem.php
b/repo/includes/Specials/SpecialNewItem.php
index d50d89e..a445abc 100644
--- a/repo/includes/Specials/SpecialNewItem.php
+++ b/repo/includes/Specials/SpecialNewItem.php
@@ -105,9 +105,7 @@
'type' => 'text',
'id' => 'wb-newentity-label',
'filter-callback' => [ $this->stringNormalizer,
'trimToNFC' ],
- 'placeholder' => $this->msg(
- 'wikibase-label-edit-placeholder'
- )->text(),
+ 'placeholder-message' =>
'wikibase-label-edit-placeholder',
'label-message' => 'wikibase-newentity-label',
],
self::FIELD_DESCRIPTION => [
@@ -116,18 +114,14 @@
'type' => 'text',
'id' => 'wb-newentity-description',
'filter-callback' => [ $this->stringNormalizer,
'trimToNFC' ],
- 'placeholder' => $this->msg(
- 'wikibase-description-edit-placeholder'
- )->text(),
+ 'placeholder-message' =>
'wikibase-description-edit-placeholder',
'label-message' =>
'wikibase-newentity-description',
],
self::FIELD_ALIASES => [
'name' => self::FIELD_ALIASES,
'type' => 'text',
'id' => 'wb-newentity-aliases',
- 'placeholder' => $this->msg(
- 'wikibase-aliases-edit-placeholder'
- )->text(),
+ 'placeholder-message' =>
'wikibase-aliases-edit-placeholder',
'label-message' => 'wikibase-newentity-aliases',
],
];
diff --git a/repo/includes/Specials/SpecialNewProperty.php
b/repo/includes/Specials/SpecialNewProperty.php
index 649b1e9..753ae35 100644
--- a/repo/includes/Specials/SpecialNewProperty.php
+++ b/repo/includes/Specials/SpecialNewProperty.php
@@ -92,9 +92,7 @@
'type' => 'text',
'id' => 'wb-newentity-label',
'filter-callback' => [ $this->stringNormalizer,
'trimToNFC' ],
- 'placeholder' => $this->msg(
- 'wikibase-label-edit-placeholder'
- )->text(),
+ 'placeholder-message' =>
'wikibase-label-edit-placeholder',
'label-message' => 'wikibase-newentity-label'
],
self::FIELD_DESCRIPTION => [
@@ -103,18 +101,14 @@
'type' => 'text',
'id' => 'wb-newentity-description',
'filter-callback' => [ $this->stringNormalizer,
'trimToNFC' ],
- 'placeholder' => $this->msg(
- 'wikibase-description-edit-placeholder'
- )->text(),
+ 'placeholder-message' =>
'wikibase-description-edit-placeholder',
'label-message' =>
'wikibase-newentity-description'
],
self::FIELD_ALIASES => [
'name' => self::FIELD_ALIASES,
'type' => 'text',
'id' => 'wb-newentity-aliases',
- 'placeholder' => $this->msg(
- 'wikibase-aliases-edit-placeholder'
- )->text(),
+ 'placeholder-message' =>
'wikibase-aliases-edit-placeholder',
'label-message' => 'wikibase-newentity-aliases'
]
];
--
To view, visit https://gerrit.wikimedia.org/r/328677
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I74cf06f8ef89177f71db16862e5141057cf79c24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits