Created
December 24, 2010 13:31
-
-
Save agateau/754235 to your computer and use it in GitHub Desktop.
Debug issues when strings get too wide to fit a window by prefixing translated strings with a custom string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QString wide_prefix() | |
{ | |
return qgetenv("WIDE"); | |
} | |
inline QString wide_i18n(const char* txt) | |
{ | |
return wide_prefix() + i18n(txt); | |
} | |
template <typename A1> | |
inline QString wide_i18n(const char* txt, const A1& a1) | |
{ | |
return wide_prefix() + i18n(txt, a1); | |
} | |
#define i18n(x, ...) wide_i18n((x), ## __VA_ARGS__) | |
#define i18nc(c, x, ...) i18n((x), ## __VA_ARGS__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment