Skip to content

Commit 629c3da

Browse files
authored
fix: update project settings model (#182)
1 parent 8bfcc36 commit 629c3da

3 files changed

Lines changed: 19 additions & 17 deletions

File tree

src/main/java/com/crowdin/client/projectsgroups/model/ProjectSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ public class ProjectSettings extends Project {
3939
private Map<String, Map<String, String>> languageMapping;
4040
private Boolean delayedWorkflowStart;
4141
private NotificationSettings notificationSettings;
42-
private TmPenalties tmPenalties;
42+
private TmPenalties[] tmPenalties;
4343

4444
}

src/test/java/com/crowdin/client/projectsgroups/ProjectsGroupsApiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public void getProjectSettingsTest() {
174174
assertFalse(qaChecksIgnorableCategories.getDuplicate());
175175
assertFalse(qaChecksIgnorableCategories.getFtl());
176176

177-
TmPenalties tmPenalties = projectSettings.getTmPenalties();
177+
TmPenalties tmPenalties = projectSettings.getTmPenalties()[0];
178178
assertNotNull(tmPenalties);
179179
assertEquals(1, tmPenalties.getAutoSubstitution());
180180
assertEquals(1, tmPenalties.getMultipleTranslations());

src/test/resources/api/projectsgroups/projectSettings.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,23 @@
8383
"managerNewStrings": false,
8484
"managerLanguageCompleted": false
8585
},
86-
"tmPenalties": {
87-
"autoSubstitution": 1,
88-
"tmPriority": {
89-
"priority": 2,
90-
"penalty": 1
91-
},
92-
"multipleTranslations": 1,
93-
"timeSinceLastUsage": {
94-
"months": 2,
95-
"penalty": 1
96-
},
97-
"timeSinceLastModified": {
98-
"months": 2,
99-
"penalty": 1
86+
"tmPenalties": [
87+
{
88+
"autoSubstitution": 1,
89+
"tmPriority": {
90+
"priority": 2,
91+
"penalty": 1
92+
},
93+
"multipleTranslations": 1,
94+
"timeSinceLastUsage": {
95+
"months": 2,
96+
"penalty": 1
97+
},
98+
"timeSinceLastModified": {
99+
"months": 2,
100+
"penalty": 1
101+
}
100102
}
101-
}
103+
]
102104
}
103105
}

0 commit comments

Comments
 (0)