| Conditions | 7 |
| Total Lines | 28 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package timeago |
||
| 10 | func overwriteOutput(result string) string { |
||
| 11 | suffix := trans().Ago |
||
| 12 | |||
| 13 | if !translationsAreSet() { |
||
| 14 | if config.Language == "de" { |
||
| 15 | return suffix + " " + result |
||
| 16 | } |
||
| 17 | |||
| 18 | return result + " " + suffix |
||
| 19 | } |
||
| 20 | |||
| 21 | for _, translationObj := range config.Translations { |
||
| 22 | if translationObj.Language != config.Language { |
||
| 23 | continue |
||
| 24 | } |
||
| 25 | |||
| 26 | result, suffix = modifyResult(result, translationObj.Translations) |
||
| 27 | } |
||
| 28 | |||
| 29 | if suffix == "" { |
||
| 30 | return result |
||
| 31 | } |
||
| 32 | |||
| 33 | if config.Language == "de" { |
||
| 34 | return suffix + " " + result |
||
| 35 | } |
||
| 36 | |||
| 37 | return result + " " + suffix |
||
| 38 | } |
||
| 57 |