(contentType, withLevelSuffix = true, withProjectSuffix = false)
| 383 | // `withLevelSuffix` will append 'Level' to the names for practice/capstone/challenge levels |
| 384 | // `withProjectSuffix` will append 'Project' to the capstone name |
| 385 | export function getGameContentDisplayType (contentType, withLevelSuffix = true, withProjectSuffix = false) { |
| 386 | if (!contentType) { |
| 387 | contentType = 'hero' |
| 388 | } |
| 389 | if (contentType.startsWith('practice')) { |
| 390 | return internationalizeLevelType('practice', withLevelSuffix, withProjectSuffix) |
| 391 | } else if (contentType.startsWith('capstone')) { |
| 392 | return internationalizeLevelType('capstone', withLevelSuffix, withProjectSuffix) |
| 393 | } else if (contentType.startsWith('challenge')) { |
| 394 | return internationalizeLevelType('challenge', withLevelSuffix, withProjectSuffix) |
| 395 | } else { |
| 396 | return internationalizeContentType(contentType) |
| 397 | } |
| 398 | } |
no test coverage detected