Skip to content

Commit

Permalink
Fixed eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
llech committed Sep 28, 2018
1 parent 579dafd commit 872200f
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions test/jquery.i18n.test.js
Expand Up @@ -345,31 +345,32 @@
'Arabic plural test for 郯郾鄄鄢鄞鄣鄱鄯鄹酃' );
} );

QUnit.test( 'Message parse plural tests for German', function ( assert ) {
var i18n;
$.i18n();
i18n = $(document).data('i18n');
// Switch to locale locally
i18n.locale = 'de';
assert.strictEqual(i18n.locale, 'de', 'Locale is German');
var key = '$1 {{plural:$1|Meldung|Meldungen}}';
assert.strictEqual($.i18n(key, 1), '1 Meldung', "German plural test for one")
assert.strictEqual($.i18n(key, 2), '2 Meldungen', "German plural test for few")
assert.strictEqual($.i18n(key, 5), '5 Meldungen', "German plural test for many")
} );

QUnit.test( 'Message parse plural tests for Polish', function ( assert ) {
var i18n;
$.i18n();
i18n = $(document).data('i18n');
// Switch to locale locally
i18n.locale = 'pl';
assert.strictEqual(i18n.locale, 'pl', 'Locale is Polish');
var key = '$1 {{plural:$1|b艂膮d|b艂臋dy|b艂臋d贸w}}';
assert.strictEqual($.i18n(key, 1), '1 b艂膮d', "Polish plural test for one")
assert.strictEqual($.i18n(key, 2), '2 b艂臋dy', "Polish plural test for few")
assert.strictEqual($.i18n(key, 5), '5 b艂臋d贸w', "Polish plural test for many")
} );
QUnit.test( 'Message parse plural tests for German', function ( assert ) {
var i18n, key = '$1 {{plural:$1|Meldung|Meldungen}}';
$.i18n();
i18n = $( document ).data( 'i18n' );
// Switch to locale locally
i18n.locale = 'de';
assert.strictEqual( i18n.locale, 'de', 'Locale is German' );
assert.strictEqual( $.i18n( key, 1 ), '1 Meldung', 'German plural test for one' );
assert.strictEqual( $.i18n( key, 2 ), '2 Meldungen', 'German plural test for few' );
assert.strictEqual( $.i18n( key, 5 ), '5 Meldungen', 'German plural test for many' );
assert.strictEqual( $.i18n( key, 21 ), '21 Meldungen', 'German plural test for few' );
} );

QUnit.test( 'Message parse plural tests for Polish', function ( assert ) {
var i18n, key = '$1 {{plural:$1|b艂膮d|b艂臋dy|b艂臋d贸w}}';
$.i18n();
i18n = $( document ).data( 'i18n' );
// Switch to locale locally
i18n.locale = 'pl';
assert.strictEqual( i18n.locale, 'pl', 'Locale is Polish' );
assert.strictEqual( $.i18n( key, 1 ), '1 b艂膮d', 'Polish plural test for one' );
assert.strictEqual( $.i18n( key, 2 ), '2 b艂臋dy', 'Polish plural test for few' );
assert.strictEqual( $.i18n( key, 5 ), '5 b艂臋d贸w', 'Polish plural test for many' );
assert.strictEqual( $.i18n( key, 21 ), '21 b艂臋d贸w', 'Polish plural test for 21 (many)' );
assert.strictEqual( $.i18n( key, 22 ), '22 b艂臋dy', 'Polish plural test for 22 (few)' );
} );

QUnit.test( 'Test explicit plural forms', function ( assert ) {
$.i18n();
Expand Down

0 comments on commit 872200f

Please sign in to comment.