Zitat von Jeff Kletsky <gnuc...@allycomm.com>:
#define ACCOUNT_OPTIONS_SECTION "Accounts"
#define TRADING_ACCOUNTS_OPTION "Trading Accounts"

Presently, make-gnucash-potfiles.in does not look at .h files for translatable strings, so even after adding
#include <glib/gi18n.h>
and marking the strings, they don't make it into POTFILES.in

What approach is recommended for resolving this?

* Add an exception to make-gnucash-potfiles.in

Yes.

* Use _(ACCOUNTS_OPTIONS_SECTION) and don't translate the raw define

Yes. In the #define lines, the strings should be marked with the N_( ... ) macro, so they are still just a const char* literal for the compiler's point of view, but they make it into gnucash.pot:

#include <glib/gi18n.h>
#define ACCOUNT_OPTIONS_SECTION N_("Accounts")

Subsequently, in places where the defines are being used for human-visible display, they need to be translated writing _(ACCOUNTS_OPTIONS_SECTION).

* Change .h to .c and leave people wondering why a .c file is being #include-d

No.

Is that explanation sufficient or did I still forget something?

Regards,

Christian

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to