Conditions | 5 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5 |
Changes | 0 |
1 | package timeago |
||
8 | func overwriteOutput(result string) string { |
||
9 | 1 | if !translationsAreSet() { |
|
10 | 1 | return result + " " + trans().Ago |
|
11 | } |
||
12 | |||
13 | 1 | suffix := trans().Ago |
|
14 | |||
15 | 1 | for _, translationObj := range config.Translations { |
|
16 | 1 | if translationObj.Language != config.Language { |
|
17 | 1 | continue |
|
18 | } |
||
19 | |||
20 | 1 | result, suffix = modifyResult(result, translationObj.Translations) |
|
21 | } |
||
22 | |||
23 | 1 | if suffix == "" { |
|
24 | 1 | return result |
|
25 | } |
||
26 | |||
27 | 1 | return result + " " + suffix |
|
28 | } |
||
47 |