mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-11 16:49:26 +00:00
Drop redundant fallbacks from parsoid-styles directory
These .less files are pointless because these languages have fallbacks, and the .less file for the fallback is identical. The behavior on the cluster will not change when we remove these files. Another file with the same rules will be loaded instead. I made this patch algorithmically by writing a piece of code that iterates all existing .less files, checks if the language does have fallbacks, and if one of the fallback .less files is identical. I also updated the existing test case to reflect what's going on. Change-Id: Iab647956f7bf45e59da1af33ff2b3e81ad016b4c
This commit is contained in:
parent
f1bd3175fd
commit
5ef0ccdaa6
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1,11 +0,0 @@
|
|||
.mw-ref > a[ style~='mw-Ref' ]::after {
|
||||
content: '[' counter( mw-Ref, myanmar ) ']';
|
||||
}
|
||||
|
||||
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
|
||||
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, myanmar ) ']';
|
||||
}
|
||||
|
||||
span[ rel='mw:referencedBy' ] > a::before {
|
||||
content: counter( mw-references, myanmar ) '.' counter( mw-ref-linkback, myanmar );
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
.mw-ref > a[ style~='mw-Ref' ]::after {
|
||||
content: '[' counter( mw-Ref, bengali ) ']';
|
||||
}
|
||||
|
||||
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
|
||||
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, bengali ) ']';
|
||||
}
|
||||
|
||||
span[ rel='mw:referencedBy' ] > a::before {
|
||||
content: counter( mw-references, bengali ) '.' counter( mw-ref-linkback, bengali );
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1,11 +0,0 @@
|
|||
.mw-ref > a[ style~='mw-Ref' ]::after {
|
||||
content: '[' counter( mw-Ref, myanmar ) ']';
|
||||
}
|
||||
|
||||
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
|
||||
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, myanmar ) ']';
|
||||
}
|
||||
|
||||
span[ rel='mw:referencedBy' ] > a::before {
|
||||
content: counter( mw-references, myanmar ) '.' counter( mw-ref-linkback, myanmar );
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1,11 +0,0 @@
|
|||
.mw-ref > a[ style~='mw-Ref' ]::after {
|
||||
content: '[' counter( mw-Ref, myanmar ) ']';
|
||||
}
|
||||
|
||||
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
|
||||
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, myanmar ) ']';
|
||||
}
|
||||
|
||||
span[ rel='mw:referencedBy' ] > a::before {
|
||||
content: counter( mw-references, myanmar ) '.' counter( mw-ref-linkback, myanmar );
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1,11 +0,0 @@
|
|||
.mw-ref > a[ style~='mw-Ref' ]::after {
|
||||
content: '[' counter( mw-Ref, devanagari ) ']';
|
||||
}
|
||||
|
||||
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
|
||||
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
|
||||
}
|
||||
|
||||
span[ rel='mw:referencedBy' ] > a::before {
|
||||
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
.mw-ref > a[ style~='mw-Ref' ]::after {
|
||||
content: '[' counter( mw-Ref, myanmar ) ']';
|
||||
}
|
||||
|
||||
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
|
||||
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, myanmar ) ']';
|
||||
}
|
||||
|
||||
span[ rel='mw:referencedBy' ] > a::before {
|
||||
content: counter( mw-references, myanmar ) '.' counter( mw-ref-linkback, myanmar );
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1,11 +0,0 @@
|
|||
.mw-ref > a[ style~='mw-Ref' ]::after {
|
||||
content: '[' counter( mw-Ref, devanagari ) ']';
|
||||
}
|
||||
|
||||
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
|
||||
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
|
||||
}
|
||||
|
||||
span[ rel='mw:referencedBy' ] > a::before {
|
||||
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -1 +0,0 @@
|
|||
@import 'ext.cite.parsoid.comma-instead-of-dot.less';
|
|
@ -16,14 +16,14 @@ class CiteCSSFileModuleTest extends \MediaWikiIntegrationTestCase {
|
|||
|
||||
$this->setService(
|
||||
'ContentLanguage',
|
||||
$this->getServiceContainer()->getLanguageFactory()->getLanguage( 'fa' )
|
||||
$this->getServiceContainer()->getLanguageFactory()->getLanguage( 'wa' )
|
||||
);
|
||||
}
|
||||
|
||||
public function testModule() {
|
||||
$module = new CiteCSSFileModule( [], __DIR__ . '/../../modules/parsoid-styles' );
|
||||
$styles = $module->getStyleFiles( $this->createMock( Context::class ) );
|
||||
$this->assertSame( [ 'ext.cite.style.fa.less' ], $styles['all'] );
|
||||
$this->assertSame( [ 'ext.cite.style.fr.less' ], $styles['all'] );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue