Poedit fails to open PO files

  • Done
  • quality assurance status badge
Details
3 participants
  • Luis Felipe
  • (
  • Luis Felipe
Owner
unassigned
Submitted by
Luis Felipe
Severity
normal
L
L
Luis Felipe wrote on 24 Sep 2022 21:02
(name . Luis Felipe via Bug reports for GNU Guix)(address . bug-guix@gnu.org)
QpU9D0kpu_e0FL6Vtc2lBa14StqA4kE6533n1XBDNfY76GiIxAUt0wai_od13ucnRG_QVRUXw2JVRcrCzFYdruYqrGwmNfoGs5OVP0evVro=@protonmail.com
STEPS TO REPRODUCE

1. Launch Poedit
2. Open the attached PO file (guix-website-es.po)


EXPECTED RESULT

? Poedit displays the catalog correctly


UNEXPECTED RESULT

? The catalog is not displayed. Instead you see an error:

Poedit Error: Unhandled exception occurred: Cannot execute program: msgfmt -o /dev/null -c "/path/to/guix-website-es.po"


WORKAROUND

Start Poedit in a guix shell that adds gettext:

guix shell poedit gettext
poedit

Then, you can open the PO files normally.

So it seems the package definition for Poedit is missing gettext as a run-time dependency (?).


SYSTEM INFO

Guix System (guix 77e768a)

Poedit 2.2.4




---
Luis Felipe López Acevedo
Attachment: guix-website-es.po
Attachment: signature.asc
(
CN4VMLVVFQWG.1QX02ALFLRU4I@guix-aspire
On Sat Sep 24, 2022 at 8:02 PM BST, Luis Felipe via Bug reports for GNU Guix wrote:
Toggle quote (11 lines)
> WORKAROUND
>
> Start Poedit in a guix shell that adds gettext:
>
> guix shell poedit gettext
> poedit
>
> Then, you can open the PO files normally.
>
> So it seems the package definition for Poedit is missing gettext as a run-time dependency (?).

What might be referred to as a "run-time dependency" is called a
"propagated input" in Guix, where a dependency of X is installed
whenever X itself is installed. They are generally considered
undesirable and should be avoided, so when we're faced with this
sort of problem we usually do:

(inputs (list gettext))

and add a phase:

(add-after 'unpack 'patch-invocations
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/foo/bar.c"
(("\"msgfmt\"")
(string-append
"\""
(search-input-file inputs "bin/msgfmt")
"\"")))))

-- (
L
L
Luis Felipe wrote on 25 Sep 2022 15:14
(name . ()(address . paren@disroot.org)(address . 58046@debbugs.gnu.org)
aSXVl4qt85xEgN_CyCddjtO6Pt8UaKUu8XkFMoKhx5oeG6vAx8QPtHyWstPr13Eu74M_XBk3pmzVWAgGPVOFOAAXSv7f6rqV1G8QkCqqOoM=@protonmail.com
On Saturday, September 24th, 2022 at 19:25, ( <paren@disroot.org> wrote:

Toggle quote (24 lines)
>

> What might be referred to as a "run-time dependency" is called a
> "propagated input" in Guix, where a dependency of X is installed
> whenever X itself is installed. They are generally considered
> undesirable and should be avoided, so when we're faced with this
> sort of problem we usually do:
>

> (inputs (list gettext))
>

> and add a phase:
>

> (add-after 'unpack 'patch-invocations
> (lambda* (#:key inputs #:allow-other-keys)
> (substitute* "src/foo/bar.c"
> (("\"msgfmt\"")
> (string-append
> "\""
> (search-input-file inputs "bin/msgfmt")
> "\"")))))

Thanks, (, I'll try to patch it.
Attachment: signature.asc
L
L
Luis Felipe wrote on 2 Nov 16:18 +0100
Poedit fails to open PO files
(address . 58046-done@debbugs.gnu.org)
899f3688-8eb6-46eb-a885-aa2ca84c03e7@zoho.com
This issue has been solved indirectly, apparently (I don't see changes
to the package definition since 2019).
I followed the steps to reproduce the issue, but the file attached to
the initial report opens successfully:
Screenshot of Poedit 2.2.4 loading the catalog correctly.
This test was using:
guix ac19ae3
poedit 2.2.4
--
Luis Felipe López Acevedo
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 58046@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58046
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch