why is po_update() separate from po_extract()?
I might be missing something obvious but why is po_update() separate from po_extract() when we always have to run it after po_extract()?
They're definitely closely related... One reason to keep them separate is we might prefer the translator to do po_update() themselves because of the fuzzy/deprecated messages. The package author may have no context on whether a fuzzy message still makes sense after the update.
@hadley I notice now po_update() is not mentioned in either of the new vignettes. Do you have notes handy on the design here / should we add an explanation to the vignette(s)?
Hmmmm, good question. Maybe po_extract() could automatically run po_update() if there are existing translations?
In our current workflow for {data.table}, we:
- Open a PR with the
po_extract()output to update the .pot files (cf https://github.com/Rdatatable/data.table/pull/6773) - Open a series of PRs with the
po_update()output for each available translation; this PR is assigned to the corresponding translation team (a GitHub alias like@Rdatatable/chinese) (cf https://github.com/Rdatatable/data.table/pull/6774)
So I do think it makes sense to keep the two functions separate. This also maps onto the underlying gettext tools: po_extract() generates .pot files, matching xgettext; po_update() generates .po files, matching msgmerge (or msginit).
Closing for now, but may revisit as we iterate on what workflow is most productive.