wikimedia/mediawiki-extensions-Translate

View on GitHub

Showing 1,238 of 1,238 total issues

Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

        WANObjectCache $cache,
        Collation $collation,
        MessageGroups $messageGroupFactory,
        NamespaceInfo $namespaceInfo,
        MessageIndex $messageIndex,
Severity: Major
Found in src/TranslatorInterface/EntitySearch.php - About 50 mins to fix

    Method onChangesListSpecialPageQuery has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            $pageName,
            &$tables,
            &$fields,
            &$conds,
            &$query_options,
    Severity: Major
    Found in src/RecentChangesTranslationFilterHookHandler.php - About 50 mins to fix

      Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              Config $config,
              JobQueueGroup $jobQueueGroup,
              MessageGroupStatsTableFactory $messageGroupStatsTableFactory,
              EntitySearch $entitySearch,
              MessagePrefixStats $messagePrefixStats,
      Severity: Major
      Found in src/Statistics/MessageGroupStatsSpecialPage.php - About 50 mins to fix

        Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                GroupSynchronizationCache $groupSynchronizationCache,
                JobQueueGroup $jobQueueGroup,
                LoggerInterface $logger,
                MessageIndex $messageIndex,
                TitleFactory $titleFactory,
        Severity: Major
        Found in src/Synchronization/ExternalMessageSourceStateImporter.php - About 50 mins to fix

          Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  StatsTable $table,
                  LinkRenderer $linkRenderer,
                  MessageLocalizer $localizer,
                  Language $interfaceLanguage,
                  MessageGroupReviewStore $groupReviewStore,
          Severity: Major
          Found in src/Statistics/MessageGroupStatsTable.php - About 50 mins to fix

            Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    MessageIndex $messageIndex,
                    JobQueueGroup $jobQueue,
                    RevTagStore $revTagStore,
                    IConnectionProvider $dbProvider,
                    TranslatableBundleStatusStore $translatableBundleStatusStore,
            Severity: Major
            Found in src/MessageGroupProcessing/TranslatablePageStore.php - About 50 mins to fix

              Method makeRow has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      StatsTable $table,
                      string $languageCode,
                      array $stats,
                      MessageGroup $group,
                      int $rowCount,
              Severity: Major
              Found in src/Statistics/MessageGroupStatsTable.php - About 50 mins to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    } else if (rf(model.x)) {
                        xAlign = 'right';
                
                        // Is tooltip too wide and goes outside left edge of canvas?
                        if (orf(model.x)) {
                Severity: Minor
                Found in resources/lib/Chart.js/Chart.js and 1 other location - About 50 mins to fix
                resources/lib/Chart.js/Chart.js on lines 8514..8530

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 52.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    if (lf(model.x)) {
                        xAlign = 'left';
                
                        // Is tooltip too wide and goes over the right side of the chart.?
                        if (olf(model.x)) {
                Severity: Minor
                Found in resources/lib/Chart.js/Chart.js and 1 other location - About 50 mins to fix
                resources/lib/Chart.js/Chart.js on lines 8522..8530

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 52.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                            setAsNew( keyData.groupId, keyData.msgKey ).done( function ( data ) {
                                if ( data.managemessagegroups && data.managemessagegroups.success ) {
                                    location.reload();
                                    isReloading = true;
                                }
                Severity: Major
                Found in resources/js/ext.translate.special.managegroups.js and 2 other locations - About 50 mins to fix
                resources/js/ext.translate.special.managegroups.js on lines 18..29
                resources/js/ext.translate.special.managegroups.js on lines 68..84

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                            getRenames( keyData.groupId, keyData.msgKey )
                                .done( function ( data ) {
                                // Open the dialog, and display possible renames.
                                    windowManager.openWindow( renameDialog, {
                                        messages: data.managemessagegroups[ 0 ],
                Severity: Major
                Found in resources/js/ext.translate.special.managegroups.js and 2 other locations - About 50 mins to fix
                resources/js/ext.translate.special.managegroups.js on lines 18..29
                resources/js/ext.translate.special.managegroups.js on lines 98..110

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        if ( group.priorityforce ) {
                            headerMessage = mw.message(
                                'tpt-discouraged-language-force-header',
                                $.uls.data.getAutonym( language )
                            );
                Severity: Minor
                Found in resources/js/ext.translate.special.translate.js and 1 other location - About 50 mins to fix
                resources/js/ext.translate.special.translate.js on lines 301..310

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                                if (gridLines.drawOnChartArea) {
                                    ctx.moveTo(item.x1, item.y1);
                                    ctx.lineTo(item.x2, item.y2);
                                }
                Severity: Minor
                Found in resources/lib/Chart.js/Chart.js and 1 other location - About 50 mins to fix
                resources/lib/Chart.js/Chart.js on lines 12331..12334

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            atOffset = data.at[ 0 ] === 'left' ?
                                data.targetWidth :
                                data.at[ 0 ] === 'right' ?
                                    -data.targetWidth :
                                    0,
                Severity: Minor
                Found in resources/src/ext.translate.groupselector/ui.position.js and 1 other location - About 50 mins to fix
                resources/src/ext.translate.groupselector/ui.position.js on lines 176..180

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    delay = ( function () {
                        var timer = 0;
                
                        return function ( callback, milliseconds ) {
                            clearTimeout( timer );
                Severity: Minor
                Found in resources/src/ext.translate.groupselector/index.js and 1 other location - About 50 mins to fix
                resources/js/ext.translate.special.managetranslatorsandbox.js on lines 729..736

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                                if (gridLines.drawTicks) {
                                    ctx.moveTo(item.tx1, item.ty1);
                                    ctx.lineTo(item.tx2, item.ty2);
                                }
                Severity: Minor
                Found in resources/lib/Chart.js/Chart.js and 1 other location - About 50 mins to fix
                resources/lib/Chart.js/Chart.js on lines 12336..12339

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                                new OO.ui.MenuOptionWidget( {
                                    data: {
                                        type: 'group',
                                        data: groups[ i ].group
                                    },
                Severity: Minor
                Found in resources/src/ext.translate.entity.selector/index.js and 1 other location - About 50 mins to fix
                resources/src/ext.translate.entity.selector/index.js on lines 185..191

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            var messageOption = new OO.ui.MenuOptionWidget( {
                                data: {
                                    type: 'message',
                                    data: messages[ i ].pattern
                                },
                Severity: Minor
                Found in resources/src/ext.translate.entity.selector/index.js and 1 other location - About 50 mins to fix
                resources/src/ext.translate.entity.selector/index.js on lines 168..174

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            $message.pagemode( {
                                message: message,
                                sourcelangcode: this.$container.data( 'sourcelangcode' ),
                                targetlangcode: this.$container.data( 'targetlangcode' )
                            } );
                Severity: Minor
                Found in resources/js/ext.translate.messagetable.js and 1 other location - About 50 mins to fix
                resources/js/ext.translate.messagetable.js on lines 254..258

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        } else {
                            headerMessage = mw.message(
                                'tpt-discouraged-language-header',
                                $.uls.data.getAutonym( language )
                            );
                Severity: Minor
                Found in resources/js/ext.translate.special.translate.js and 1 other location - About 50 mins to fix
                resources/js/ext.translate.special.translate.js on lines 292..301

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 51.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language