better gettext support (thanks to Michael Schulz)

This commit is contained in:
Dominic Radermacher committed 2025-08-03 09:42:30 +02:00
1 parent 1f450d9124
commit efa48162a8
5 files changed
+89 -8

No files matched your search

+5 -1
View File
@@ -535,7 +535,11 @@ int main(int argc, char *argv[])
ptouch_dev ptdev = NULL;
setlocale(LC_ALL, "");
bindtextdomain("ptouch-print", "/usr/share/locale/");
const char *textdomain_dir = getenv("TEXTDOMAINDIR");
if (!textdomain_dir) {
textdomain_dir = "/usr/share/locale/";
}
bindtextdomain("ptouch-print", textdomain_dir);
textdomain("ptouch-print");
int i = parse_args(argc, argv);
if (i != argc) {