Passed
Push — 1 ( f8e5cb...ba63b3 )
by Robbie
03:44
created

client/lang/[email protected]   A

Size

Lines of Code 1

Duplication

Duplicated Lines 1
Ratio 100 %

Importance

Changes 0
Metric Value
dl 1
loc 1
rs 10
c 0
b 0
f 0
noi 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
// This file was generated by silverstripe/cow from client/lang/src/[email protected].
2
// See https://github.com/tractorcow/cow for details
3
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
4
  if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
5
    console.error('Class ss.i18n not defined');  // eslint-disable-line no-console
6
  }
7
} else {
8
  ss.i18n.addDictionary('sr@latin', {
9
    "CampaignAdmin.ADDCAMPAIGN": "Add campaign",
10
    "CampaignAdmin.DELETECAMPAIGN": "Are you sure you want to delete this record?",
11
    "CampaignAdmin.DRAFT": "Draft",
12
    "CampaignAdmin.ITEM_SUMMARY_PLURAL": "%s items",
13
    "CampaignAdmin.ITEM_SUMMARY_SINGULAR": "%s item",
14
    "CampaignAdmin.MODIFIED": "Modified",
15
    "CampaignAdmin.NO_CHANGES": "No changes",
16
    "CampaignAdmin.PUBLISHCAMPAIGN": "Publish campaign",
17
    "CampaignAdmin.REMOVED": "Removed",
18
    "CampaignAdmin.REVERTCAMPAIGN": "Revert"
19
});
20
}