Conversation
|
I'll have a look when I get back home later for both the update and why Korean i18n isn't working. Since the extra options aren't home manager options, I see no reason why we can't just make a module for packet to have a programs.packet attribute set that adds these options |
Yes, you're right. I would like to see in other PR |
|
Sure! |
|
It compiles and runs fine on my machine! I use en-US as a locale so I can't reproduce your issue unless I use a VM. However from what I can see, it's supposed to be included in the |
|
Other than that, lgtm |
|
Currently, the extension only looks in two locale directories, the one given by Flatpak, and another being what python considers to be the default locale directory1 Where are the Footnotes |
|
For now you might want to patch the None with a hard coded locale directory that's available in the installed nix package? - locale_dirs: List[Path | None] = [None] # None for system default locale dir
+ locale_dirs: List[Path] = [Path("/path/to/localedir/containing/packet.po's")] |
|
That's exactly what my code suggestion does: Adds the local dir path on build |
|
Thank you all. It works well |
|
Interesting, I think I can just fix it on my end then, by having another directory to look for which is |
Actually no, I forgot that I had already thought of this and got rid of the idea, since for a Flatpak build, the meson Not sure if the resulting path would be useful for a nixpkg though, you may try locally building with this patch and see if it works or not: diff --git a/data/resources/plugins/meson.build b/data/resources/plugins/meson.build
index ac60edd..9e055b8 100644
--- a/data/resources/plugins/meson.build
+++ b/data/resources/plugins/meson.build
@@ -1,6 +1,7 @@
plugins_conf = configuration_data()
plugins_conf.set('APP_ID', application_id)
plugins_conf.set('LOCALE_DOMAIN', gettext_package)
+plugins_conf.set('LOCALE_DIR', localedir)
configure_file(
input: 'packet_nautilus.py.in',
diff --git a/data/resources/plugins/packet_nautilus.py.in b/data/resources/plugins/packet_nautilus.py.in
index 9c5e71e..7288ee9 100755
--- a/data/resources/plugins/packet_nautilus.py.in
+++ b/data/resources/plugins/packet_nautilus.py.in
@@ -23,7 +23,8 @@ def log(*vals: Any):
# TODO: Maybe have a separate gettext package for plugin scripts that gets
# copied over alongside the script. Seems more robust?
def init_i18n() -> gettext.NullTranslations | gettext.GNUTranslations:
- locale_dirs: List[Path | None] = [None] # None for system default locale dir
+ # `None` is for system default locale dir
+ locale_dirs: List[Path | None] = [None, Path("@LOCALE_DIR@")]
(lang, enc) = locale.getlocale()
flatpak_info = None |
|
Sorry to bother you @wolfgangwalther, but the approval label seems to be doing wrong here. It added |
Yes, that seems to be the case 🙈 Thanks for the report! Fix in #416668 |
And please keep reporting anything that seems wrong, I appreciate those reports! |
Have another locale directory to look for which is based on meson's `DESTDIR`. `DESTDIR/share/locale` is where the locale seems to be stored for the built nixpkg. References: - NixOS/nixpkgs#416076 (comment)
I'll have it in the next release. |
|
Awesome, I'll also make a nix module for this package to have enable the necessary options for nautilus integration |


https://github.com/nozwock/packet/releases/tag/0.5.0
https://github.com/nozwock/packet/releases/tag/0.5.0-1
https://github.com/nozwock/packet/releases/tag/0.5.1
NOTE: This update includes the Nautilus extension. Some additional configuration is required to make it work. See honnip/dotfiles@4a4c01c or nautilus-open-any-terminal module
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.