Updating bf27ac0..b29c9c5 Fast-forward .eslintrc.json | 3 +- .phan/config.php | 5 + WikibaseSchema.i18n.alias.php | 2 + composer.json | 4 +- extension.json | 77 +++++++- i18n/ar.json | 55 +++++- i18n/bg.json | 25 ++- i18n/bn.json | 11 +- i18n/ca.json | 10 +- i18n/cjy-hans.json | 9 + i18n/cs.json | 12 ++ i18n/da.json | 14 +- i18n/de.json | 55 +++++- i18n/diq.json | 17 +- i18n/en.json | 63 +++++-- i18n/es.json | 28 ++- i18n/fa.json | 2 +- i18n/fr.json | 55 +++++- i18n/he.json | 6 +- i18n/ia.json | 16 ++ i18n/id.json | 8 + i18n/it.json | 27 ++- i18n/ja.json | 20 +++ i18n/ko.json | 27 ++- i18n/ku-latn.json | 6 +- i18n/kum.json | 10 ++ i18n/lb.json | 21 ++- i18n/lv.json | 5 +- i18n/mk.json | 55 +++++- i18n/nb.json | 15 +- i18n/nl.json | 18 +- i18n/pl.json | 8 + i18n/pt-br.json | 54 +++++- i18n/pt.json | 8 + i18n/qqq.json | 61 ++++++- i18n/roa-tara.json | 13 +- i18n/ru.json | 4 +- i18n/sr-ec.json | 6 +- i18n/sv.json | 14 +- i18n/ta.json | 10 ++ i18n/tcy.json | 13 +- i18n/tr.json | 9 +- i18n/uk.json | 39 ++++- i18n/xmf.json | 9 + i18n/zh-hans.json | 8 +- i18n/zh-hant.json | 63 +++++-- package.json | 5 +- resources/action.edit.js | 13 ++ resources/action.view.trackclicks.js | 8 + resources/special.newSchema.js | 27 +++ resources/special.setSchemaLabelDescriptionAliases.edit.js | 24 +++ resources/viewSchema.less | 61 +++++++ src/DataAccess/EditConflict.php | 12 ++ src/DataAccess/EditConflictDetector.php | 85 +++++++++ src/DataAccess/MediaWikiRevisionSchemaInserter.php | 101 +++++++++++ src/DataAccess/MediaWikiRevisionSchemaUpdater.php | 290 ++++++++++++++++++++++++++++++ src/DataAccess/MediaWikiRevisionSchemaWriter.php | 185 -------------------- src/DataAccess/SchemaCleaner.php | 79 +++++++++ src/DataAccess/SchemaEncoder.php | 178 +++++++++++++++++++ src/DataAccess/SchemaInserter.php | 29 +++ src/DataAccess/SchemaUpdater.php | 73 ++++++++ src/DataAccess/SchemaWriter.php | 53 ------ src/DataAccess/WatchlistUpdater.php | 47 +++++ src/MediaWiki/Actions/AbstractRestoreAction.php | 74 ++++++++ src/MediaWiki/Actions/AbstractUndoAction.php | 54 +++--- src/MediaWiki/Actions/RestoreSubmitAction.php | 150 ++++++++++++++++ src/MediaWiki/Actions/RestoreViewAction.php | 111 ++++++++++++ src/MediaWiki/Actions/SchemaEditAction.php | 175 +++++++++++++++++++ src/MediaWiki/{ => Actions}/SchemaSubmitAction.php | 2 +- src/MediaWiki/Actions/UndoSubmitAction.php | 55 ++++-- src/MediaWiki/Actions/UndoViewAction.php | 169 ++---------------- src/MediaWiki/Content/WikibaseSchemaContent.php | 48 +---- src/MediaWiki/Content/WikibaseSchemaContentHandler.php | 126 ++++++++++++- src/MediaWiki/Content/WikibaseSchemaSlotDiffRenderer.php | 25 +-- src/MediaWiki/Content/WikibaseSchemaSlotViewRenderer.php | 300 +++++++++++++++++++++++++++++++ src/MediaWiki/SchemaEditAction.php | 129 -------------- src/MediaWiki/Specials/NewSchema.php | 87 +++++++-- src/MediaWiki/Specials/SchemaText.php | 85 +++++++++ src/MediaWiki/Specials/SetSchemaLabelDescriptionAliases.php | 422 ++++++++++++++++++++++++++++++++++++++++++++ src/MediaWiki/SpecificLanguageMessageLocalizer.php | 37 ++++ src/MediaWiki/UndoHandler.php | 77 ++++++++ src/MediaWiki/WikibaseSchemaHooks.php | 243 ++++++++++++++++++++++++++ src/Presentation/AutocommentFormatter.php | 107 ++++++++++++ src/Presentation/ConfirmationFormRenderer.php | 151 ++++++++++++++++ src/Presentation/DiffRenderer.php | 29 +++ src/Presentation/InputValidator.php | 111 ++++++++++++ src/Services/Diff/AliasGroupListPatcher.php | 6 +- src/Services/Diff/SchemaDiffer.php | 12 +- src/Services/Diff/SchemaPatcher.php | 19 +- src/Services/{SchemaDispatcher => SchemaConverter}/FullArraySchemaData.php | 4 +- src/Services/{SchemaDispatcher => SchemaConverter}/FullViewSchemaData.php | 8 +- src/Services/{SchemaDispatcher => SchemaConverter}/NameBadge.php | 2 +- src/Services/SchemaConverter/PersistenceSchemaData.php | 13 ++ src/Services/{SchemaDispatcher/SchemaDispatcher.php => SchemaConverter/SchemaConverter.php} | 129 +++++++++++--- src/Services/SchemaDispatcher/MonolingualSchemaData.php | 21 --- src/WikibaseSchemaHooks.php | 79 --------- tests/phan/stubs/WikibaseSchema.php | 6 + tests/phpunit/API/UndoAPITest.php | 109 ++++++++++++ tests/phpunit/DataAccess/EditConflictDetectorTest.php | 174 ++++++++++++++++++ tests/phpunit/DataAccess/MediaWikiRevisionSchemaInserterTest.php | 189 ++++++++++++++++++++ tests/phpunit/DataAccess/MediaWikiRevisionSchemaUpdaterTest.php | 777 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/phpunit/DataAccess/MediaWikiRevisionSchemaWriterTest.php | 208 ---------------------- tests/phpunit/DataAccess/SchemaCleanerTest.php | 87 +++++++++ tests/phpunit/DataAccess/SchemaEncoderTest.php | 332 +++++++++++++++++++++++++++++++++++ tests/phpunit/DataAccess/WatchListUpdaterTest.php | 131 ++++++++++++++ tests/phpunit/MediaWiki/Actions/RestoreSubmitActionTest.php | 162 +++++++++++++++++ tests/phpunit/MediaWiki/Actions/RestoreViewActionTest.php | 87 +++++++++ tests/phpunit/MediaWiki/{ => Actions}/SchemaEditActionTest.php | 11 +- tests/phpunit/MediaWiki/Actions/UndoSubmitActionTest.php | 38 ++-- tests/phpunit/MediaWiki/Actions/UndoViewActionTest.php | 22 ++- tests/phpunit/MediaWiki/Content/WikibaseSchemaContentHandlerTest.php | 27 +++ tests/phpunit/MediaWiki/Content/WikibaseSchemaContentTest.php | 109 ++++++------ tests/phpunit/MediaWiki/Content/WikibaseSchemaSlotDiffRendererTest.php | 18 +- tests/phpunit/MediaWiki/Content/WikibaseSchemaSlotViewRendererTest.php | 180 +++++++++++++++++++ tests/phpunit/MediaWiki/Specials/SchemaTextTest.php | 95 ++++++++++ tests/phpunit/MediaWiki/Specials/SetSchemaLabelDescriptionAliasesTest.php | 303 ++++++++++++++++++++++++++++++++ tests/phpunit/MediaWiki/SpecificLanguageMessageLocalizerTest.php | 50 ++++++ tests/phpunit/MediaWiki/UndoHandlerTest.php | 194 ++++++++++++++++++++ tests/phpunit/MediaWiki/WikibaseSchemaHooksTest.php | 88 ++++++++++ tests/phpunit/Mocks/HTMLFormSpy.php | 23 +++ tests/phpunit/Presentation/AutocommentFormatterTest.php | 134 ++++++++++++++ tests/phpunit/Presentation/InputValidatorTest.php | 135 ++++++++++++++ tests/phpunit/Services/Diff/SchemaDifferTest.php | 22 +-- tests/phpunit/Services/Diff/SchemaPatcherTest.php | 39 +++-- tests/phpunit/Services/SchemaConverter/SchemaConverterTest.php | 591 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/phpunit/Services/SchemaDispatcher/SchemaDispatcherTest.php | 388 ---------------------------------------- tests/selenium/pageobjects/edit.schema.page.js | 22 ++- tests/selenium/pageobjects/newschema.page.js | 52 ++++-- tests/selenium/pageobjects/setlabeldecriptionaliases.schema.page.js | 85 +++++++++ tests/selenium/pageobjects/view.schema.page.js | 50 +++--- tests/selenium/specs/editSchema.js | 38 +++- tests/selenium/specs/special/new.js | 59 ++++++- tests/selenium/specs/special/setSchemaLabelDescriptionAliases.js | 128 ++++++++++++++ tests/selenium/specs/viewSchema.js | 17 +- 134 files changed, 8811 insertions(+), 1699 deletions(-) create mode 100644 .phan/config.php create mode 100644 i18n/cjy-hans.json create mode 100644 i18n/cs.json create mode 100644 i18n/ia.json create mode 100644 i18n/id.json create mode 100644 i18n/ja.json create mode 100644 i18n/kum.json create mode 100644 i18n/pl.json create mode 100644 i18n/pt.json create mode 100644 i18n/ta.json create mode 100644 i18n/xmf.json create mode 100644 resources/action.edit.js create mode 100644 resources/action.view.trackclicks.js create mode 100644 resources/special.newSchema.js create mode 100644 resources/special.setSchemaLabelDescriptionAliases.edit.js create mode 100644 resources/viewSchema.less create mode 100644 src/DataAccess/EditConflict.php create mode 100644 src/DataAccess/EditConflictDetector.php create mode 100644 src/DataAccess/MediaWikiRevisionSchemaInserter.php create mode 100644 src/DataAccess/MediaWikiRevisionSchemaUpdater.php delete mode 100644 src/DataAccess/MediaWikiRevisionSchemaWriter.php create mode 100644 src/DataAccess/SchemaCleaner.php create mode 100644 src/DataAccess/SchemaEncoder.php create mode 100644 src/DataAccess/SchemaInserter.php create mode 100644 src/DataAccess/SchemaUpdater.php delete mode 100644 src/DataAccess/SchemaWriter.php create mode 100644 src/DataAccess/WatchlistUpdater.php create mode 100644 src/MediaWiki/Actions/AbstractRestoreAction.php create mode 100644 src/MediaWiki/Actions/RestoreSubmitAction.php create mode 100644 src/MediaWiki/Actions/RestoreViewAction.php create mode 100644 src/MediaWiki/Actions/SchemaEditAction.php rename src/MediaWiki/{ => Actions}/SchemaSubmitAction.php (79%) create mode 100644 src/MediaWiki/Content/WikibaseSchemaSlotViewRenderer.php delete mode 100644 src/MediaWiki/SchemaEditAction.php create mode 100644 src/MediaWiki/Specials/SchemaText.php create mode 100644 src/MediaWiki/Specials/SetSchemaLabelDescriptionAliases.php create mode 100644 src/MediaWiki/SpecificLanguageMessageLocalizer.php create mode 100644 src/MediaWiki/UndoHandler.php create mode 100644 src/MediaWiki/WikibaseSchemaHooks.php create mode 100644 src/Presentation/AutocommentFormatter.php create mode 100644 src/Presentation/ConfirmationFormRenderer.php create mode 100644 src/Presentation/DiffRenderer.php create mode 100644 src/Presentation/InputValidator.php rename src/Services/{SchemaDispatcher => SchemaConverter}/FullArraySchemaData.php (87%) rename src/Services/{SchemaDispatcher => SchemaConverter}/FullViewSchemaData.php (51%) rename src/Services/{SchemaDispatcher => SchemaConverter}/NameBadge.php (86%) create mode 100644 src/Services/SchemaConverter/PersistenceSchemaData.php rename src/Services/{SchemaDispatcher/SchemaDispatcher.php => SchemaConverter/SchemaConverter.php} (55%) delete mode 100644 src/Services/SchemaDispatcher/MonolingualSchemaData.php delete mode 100644 src/WikibaseSchemaHooks.php create mode 100644 tests/phan/stubs/WikibaseSchema.php create mode 100644 tests/phpunit/API/UndoAPITest.php create mode 100644 tests/phpunit/DataAccess/EditConflictDetectorTest.php create mode 100644 tests/phpunit/DataAccess/MediaWikiRevisionSchemaInserterTest.php create mode 100644 tests/phpunit/DataAccess/MediaWikiRevisionSchemaUpdaterTest.php delete mode 100644 tests/phpunit/DataAccess/MediaWikiRevisionSchemaWriterTest.php create mode 100644 tests/phpunit/DataAccess/SchemaCleanerTest.php create mode 100644 tests/phpunit/DataAccess/SchemaEncoderTest.php create mode 100644 tests/phpunit/DataAccess/WatchListUpdaterTest.php create mode 100644 tests/phpunit/MediaWiki/Actions/RestoreSubmitActionTest.php create mode 100644 tests/phpunit/MediaWiki/Actions/RestoreViewActionTest.php rename tests/phpunit/MediaWiki/{ => Actions}/SchemaEditActionTest.php (72%) create mode 100644 tests/phpunit/MediaWiki/Content/WikibaseSchemaContentHandlerTest.php create mode 100644 tests/phpunit/MediaWiki/Content/WikibaseSchemaSlotViewRendererTest.php create mode 100644 tests/phpunit/MediaWiki/Specials/SchemaTextTest.php create mode 100644 tests/phpunit/MediaWiki/Specials/SetSchemaLabelDescriptionAliasesTest.php create mode 100644 tests/phpunit/MediaWiki/SpecificLanguageMessageLocalizerTest.php create mode 100644 tests/phpunit/MediaWiki/UndoHandlerTest.php create mode 100644 tests/phpunit/MediaWiki/WikibaseSchemaHooksTest.php create mode 100644 tests/phpunit/Mocks/HTMLFormSpy.php create mode 100644 tests/phpunit/Presentation/AutocommentFormatterTest.php create mode 100644 tests/phpunit/Presentation/InputValidatorTest.php create mode 100644 tests/phpunit/Services/SchemaConverter/SchemaConverterTest.php delete mode 100644 tests/phpunit/Services/SchemaDispatcher/SchemaDispatcherTest.php create mode 100644 tests/selenium/pageobjects/setlabeldecriptionaliases.schema.page.js create mode 100644 tests/selenium/specs/special/setSchemaLabelDescriptionAliases.js