The common name for the macro to merely mark strings as translatable without actually making any call is `N_()`, not `_()`.
Also, streamline the way i18n is conditionally enabled, similar to what is done in src/support.h.
Follow-up to 3f8733f083e72be58e00ab2dde1e2584fe276cc5 and 201ac64545ea0d2857f55dcd7440b07a1672bbcb. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3408
-- Commit Summary --
* tagmanager: Use more common i18n macros
-- File Changes --
M src/tagmanager/tm_parser.c (500)
-- Patch Links --
https://github.com/geany/geany/pull/3408.patch https://github.com/geany/geany/pull/3408.diff
@b4n commented on this pull request.
-#ifdef GETTEXT_PACKAGE
- return g_dgettext(GETTEXT_PACKAGE, name); -#else + return name; -#endif
The `if (group == 0)` case didn't change because now `_()` means `gettext()`, so it does the translation directly -- hence why not doing it here anymore.
@techee approved this pull request.
Yeah, I basically had no idea what I was doing here, I just wanted to make it compile and normal `_()` which called `gettext()` didn't work so I ended up with this. Making it more idiomatic is definitely a good thing
Merged #3408 into master.
github-comments@lists.geany.org