Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gettext integration with tools #358

Merged
merged 4 commits into from
Mar 5, 2021
Merged

Conversation

ueno
Copy link
Member

@ueno ueno commented Mar 5, 2021

Fixes: #357

@coveralls
Copy link

coveralls commented Mar 5, 2021

Coverage Status

Coverage increased (+0.0008%) to 71.872% when pulling dffd7c1 on ueno:wip/dueno/nls into 58c8ef1 on p11-glue:master.

@ueno ueno force-pushed the wip/dueno/nls branch 2 times, most recently from 3d966cd to cf36139 Compare March 5, 2021 14:43
Copy link

@tomato42 tomato42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get the use of N_...

#else
#define _(x) (x)
#endif
#define N_(x) (x)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this for?

Copy link
Member Author

@ueno ueno Mar 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a marker for the xgettext program to extract translatable strings into POT files, but not replace the text at run time:
https://developer.gnome.org/glib/stable/glib-I18N.html#N-:CAPS

@@ -54,12 +54,14 @@
#include <stdlib.h>
#include <unistd.h>

#define N_(x) (x)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too, why N_?

Copy link

@tomato42 tomato42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ueno
Copy link
Member Author

ueno commented Mar 5, 2021

Thanks for the review.

@ueno ueno merged commit cdff966 into p11-glue:master Mar 5, 2021
@ueno ueno added this to the 0.24.0 milestone Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weird situation around internationalization
3 participants