1
0
mirror of https://git.familie-radermacher.ch/linux/ptouch-print.git synced 2025-11-21 04:42:04 +00:00

better gettext support (thanks to Michael Schulz)

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

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) {