1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-24 23:33:50 +02:00

Fix uses of wxPLURAL and update audacity.pot ...

so that
(1) we really get msgid_plural entries in the .pot
(2) i18n-comments get extracted too (needs workaround of xgettext bug)
This commit is contained in:
Paul Licameli
2018-01-05 00:35:04 -05:00
parent d5dca050bd
commit c66eae1a46
4 changed files with 61 additions and 39 deletions

View File

@@ -233,8 +233,23 @@ extern const wxString& GetCustomSubstitution(const wxString& str1 );
#undef wxPLURAL
#endif
// Note: The strings will go to the .pot file (do not use _(...)).
#define wxPLURAL(sing, plur, n) wxGetTranslation((sing), (plur), n)
// The two string arugments will go to the .pot file, as
// msgid sing
// msgid_plural plural
//
// (You must use plain string literals. Do not use _() or wxT() or L prefix,
// which (inentionally) will fail to compile. The macro inserts wxT).
//
// Note too: it seems an i18n-hint comment is not extracted if it precedes
// wxPLURAL directly. A workaround: after the comment, insert a line
// _("dummyStringXXXX");
// where for XXXX subsitute something making this dummy string unique in the
// program. Then check in your generated audacity.pot that the dummy is
// immediately before the singular/plural entry.
//
// Your i18n-comment should therefore say something like,
// "In the string after this one, ..."
#define wxPLURAL(sing, plur, n) wxGetTranslation( wxT(sing), wxT(plur), n)
#ifdef _