Better cross-platform logic in catrridges.in
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# cartridges.in
|
# cartridges.in
|
||||||
#
|
#
|
||||||
# Copyright 2022-2023 kramo
|
# Copyright 2022-2024 kramo
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -24,6 +24,7 @@ import locale
|
|||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
|
from platform import system
|
||||||
|
|
||||||
VERSION = "@VERSION@"
|
VERSION = "@VERSION@"
|
||||||
|
|
||||||
@@ -36,7 +37,7 @@ else:
|
|||||||
sys.path.insert(1, PKGDATADIR)
|
sys.path.insert(1, PKGDATADIR)
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
|
|
||||||
if os.name != "nt":
|
if system() == "Linux":
|
||||||
locale.bindtextdomain("cartridges", LOCALEDIR)
|
locale.bindtextdomain("cartridges", LOCALEDIR)
|
||||||
locale.textdomain("cartridges")
|
locale.textdomain("cartridges")
|
||||||
gettext.install("cartridges", LOCALEDIR)
|
gettext.install("cartridges", LOCALEDIR)
|
||||||
|
|||||||
Reference in New Issue
Block a user