potools icon indicating copy to clipboard operation
potools copied to clipboard

Drop probably unneeded metadata

Open hadley opened this issue 1 year ago • 3 comments

It'd be nice to drop these:

"Project-Id-Version: pkgdown 2.0.9.9000\n"
"POT-Creation-Date: 2024-04-18 17:22-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"

The version and dates cause spurious git diffs and the translator info is duplicative with what you'll get from git anyway.

hadley avatar Apr 18 '24 22:04 hadley

We do need those for consistency with base:

https://github.com/search?q=repo%3Ar-devel%2Fr-svn+path%3Apo+%2FProject-Id-Version%2F&type=code

I'm also not sure if these are required by gettext. But certainly we could expose an option to supply those manually --> allow idempotency.

MichaelChirico avatar Apr 18 '24 22:04 MichaelChirico

Maybe there could be an argument to suppress them, and it would default to true if the current project root contained a .git directory?

hadley avatar Apr 19 '24 13:04 hadley

I'm still loath to suppress them by default. Project-Id-Version is pretty ubiquitous -- 4.9 million hits on GitHub:

https://github.com/search?q=path%3A.po%20%2FProject-Id-Version%3A%2F&type=code

Similar for POT-Creation-Date and PO-Revision-Date.

So I understand why we can suppress them and back up on git to track this info, but would do so only optionally.

These are populated by msginit by default:

https://www.gnu.org/software/gettext/manual/gettext.html#msginit-Invocation

MichaelChirico avatar May 02 '24 17:05 MichaelChirico