Skip to content

Commit a27a6ec

Browse files
committed
layout editor: Don't use gettext.install to set up the locale.
This resets it for the entire process, so any Cinnamon translations would be left out if lookups occurred after opening the Actions module. Fixes #12695.
1 parent c5bab9b commit a27a6ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

action-layout-editor/nemo_action_layout_editor.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@
99
from pathlib import Path
1010
import uuid
1111
import gettext
12+
import locale
1213
import subprocess
1314
import os
1415

1516
import leconfig
1617

17-
gettext.install(leconfig.PACKAGE, leconfig.LOCALE_DIR)
18+
locale.bindtextdomain("nemo", leconfig.LOCALE_DIR)
19+
gettext.bindtextdomain("nemo", leconfig.LOCALE_DIR)
20+
gettext.textdomain("nemo")
21+
_ = gettext.gettext
1822

1923
gresources = Gio.Resource.load(os.path.join(leconfig.PKG_DATADIR, "nemo-action-layout-editor-resources.gresource"))
2024
gresources._register()

0 commit comments

Comments
 (0)