potools
potools copied to clipboard
Consider `po_uncompile()`?
We encountered a use case in pkgdown where we wanted to extract information (e.g. Language-Team) from package *.po files to build a table of available languages in a vignette.
But because only the compiled *.mo files are available in an installed package, we decided it was too fiddly to implement "uncompile()" (perhaps there is a better name) to decompress the *.mo files on the fly with msgunfmt. I might have considered it if it were already implemented in potools, hence the issue.
I also wonder if there is an alternative to this issue that I'm missing?
It's a reasonable request. One thing I have in mind is that msgunfmt does not give a unique representation:
https://github.com/Rdatatable/data.table/pull/6469
This is only a concern depending on how the output is used -- we were trying to check that .po and .mo are in sync, which is not easy to do.