Completed
Push — master ( 2d7ea1...6bf93f )
by Craig
08:35
created

$(document).ready   B

Complexity

Conditions 1
Paths 256

Size

Total Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 256
nop 0
dl 0
loc 23
rs 7.7326
c 0
b 0
f 0

4 Functions

Rating   Name   Duplication   Size   Complexity  
A 0 6 3
A 0 5 3
A 0 5 3
A 0 5 3
1
// Copyright Zikula Foundation, licensed MIT.
2
3
// This function extends vendor/willdurand/js-translation-bundle/Bazinga/Bundle/JsTranslationBundle/Resources/js/translator.js
4
// it MUST be loaded afterwards
5
( function($) {
6
    $(document).ready(function() {
7
        Translator.__ = function (key, domain, locale) {
0 ignored issues
show
Bug introduced by
The variable Translator seems to be never declared. If this is a global, consider adding a /** global: Translator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
8
            domain = typeof domain !== 'undefined' ? domain : Translator.defaultDomain;
0 ignored issues
show
Bug introduced by
The variable Translator seems to be never declared. If this is a global, consider adding a /** global: Translator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
9
            locale = typeof locale !== 'undefined' ? locale : Translator.locale;
10
            return Translator.trans(key, {}, domain, locale);
11
        };
12
        Translator.__f = function (key, params, domain, locale) {
13
            domain = typeof domain !== 'undefined' ? domain : Translator.defaultDomain;
0 ignored issues
show
Bug introduced by
The variable Translator seems to be never declared. If this is a global, consider adding a /** global: Translator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
14
            locale = typeof locale !== 'undefined' ? locale : Translator.locale;
15
            return Translator.trans(key, params, domain, locale);
16
        };
17
        Translator._n = function (singular, plural, count, domain, locale) {
18
            domain = typeof domain !== 'undefined' ? domain : Translator.defaultDomain;
0 ignored issues
show
Bug introduced by
The variable Translator seems to be never declared. If this is a global, consider adding a /** global: Translator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
19
            locale = typeof locale !== 'undefined' ? locale : Translator.locale;
20
            return Translator.transChoice(singular+'|'+plural, count, {count: count}, domain, locale);
21
        };
22
        Translator._fn = function (singular, plural, count, params, domain, locale) {
23
            domain = typeof domain !== 'undefined' ? domain : Translator.defaultDomain;
0 ignored issues
show
Bug introduced by
The variable Translator seems to be never declared. If this is a global, consider adding a /** global: Translator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
24
            locale = typeof locale !== 'undefined' ? locale : Translator.locale;
25
            params.count = count;
26
            return Translator.transChoice(singular+'|'+plural, count, params, domain, locale);
27
        };
28
    });
29
})(jQuery);
30