| 667 | |
| 668 | |
| 669 | std::string translate(const std::string& id) { |
| 670 | std::string s = translate(id, settings::language); |
| 671 | if (!s.empty()) |
| 672 | return s; |
| 673 | |
| 674 | // English fallback |
| 675 | if (settings::language != "en") { |
| 676 | return translate(id, "en"); |
| 677 | } |
| 678 | return ""; |
| 679 | } |
| 680 | |
| 681 | |
| 682 | std::string translate(const std::string& id, const std::string& language) { |
no test coverage detected