Skip to content

Feature Request: equivalent command for msgmerge #278

@EvanShaw

Description

@EvanShaw

Feature Request

Describe your use case and the problem you are facing

As far as I know, wp-cli i18n doesn't provide an equivalent for gettext's msgmerge command. This command is really useful for updating existing po files by merging a pot template created with make-pot. So, for example, if I add a new __ call in my plugin like this:

$newtranslation = __('Translate me please', 'domain');

I can update the messages.pot file with make-pot, but I have to update existing po files with the new translation by hand.

Describe the solution you'd like

To get around this, I've been calling msgmerge directly to update my po files:

find ./languages -name "*.po" | xargs -I % msgmerge -o % % languages/messages.pot

This merges the new translations of messages.pot into all existing po files in the languages directory. It would be great if the i18n command had a similar update-pos or merge-pot command to accomplish the same thing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions