mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 04:35:39 +03:00
Hamster is time tracking for individuals. It is a python3/gtk3 rewrite of the original hamster-applet. A flatpak exists but is rather clumsy in alpine. --- I am willing to maintain this and the adjacent xfce4-hamster-plugin.
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
From 1bfb5def3babb3d4ee9b9c865e029e485b5f07ae Mon Sep 17 00:00:00 2001
|
|
From: Hakan Erduman <hakan@erduman.de>
|
|
Date: Fri, 7 Jan 2022 09:44:04 +0100
|
|
Subject: [PATCH] Catch AttributeError if bindtextdomain isn't there
|
|
|
|
Affects musl based python compilations
|
|
and may be also useful for the *BSDs
|
|
---
|
|
src/hamster/lib/i18n.py | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/hamster/lib/i18n.py b/src/hamster/lib/i18n.py
|
|
index 7bb89773..58c435a4 100644
|
|
--- a/src/hamster/lib/i18n.py
|
|
+++ b/src/hamster/lib/i18n.py
|
|
@@ -18,10 +18,13 @@ def setup_i18n():
|
|
locale_dir = os.path.realpath(os.path.join(defs.DATA_DIR, "locale"))
|
|
|
|
for module in (locale,gettext):
|
|
- module.bindtextdomain('hamster', locale_dir)
|
|
- module.textdomain('hamster')
|
|
+ try:
|
|
+ module.bindtextdomain('hamster', locale_dir)
|
|
+ module.textdomain('hamster')
|
|
|
|
- module.bind_textdomain_codeset('hamster','utf8')
|
|
+ module.bind_textdomain_codeset('hamster','utf8')
|
|
+ except:
|
|
+ continue
|
|
|
|
gettext.install("hamster", locale_dir)
|
|
|
|
--
|
|
2.34.1
|
|
|