Add macros to translation resource
Unsolved
General and Desktop
-
I have a C++ Qt project with ID-based translation mechanism. I have some macros, for instance:
#define EXAMPLE_NAME_ID 42 #define EXAMPLE_NAME_TEXT "Example Name"
Given these two macros, is it possible to add in C++ source a new translatable text with identifier resource-text-42, and source text "Example Name"? Something like the following (which for many many reasons obviously doesn't work):
\\% EXAMPLE_NAME_TEXT QT_TRID_NOOP("resource-text-" ## EXAMPLE_NAME_ID);
I know all the reasons why this doesn't work. This "code" is meant to convey intent, not to work. The question is can it be done some other way?