Skip to content

Unique i18n challenges #8

Description

@MrMaz

WordPress now requires that all theme text-domains exactly match the "slug" of the theme directory name as currently installed. This causes massive headaches for theme forks, because you inherit all of the upstream code which references it's own text domain.

I'm not a fan of mass replacing the text domain calls and committing them permanently because that severely hampers any kind of fork-to-upstream merge in the future that has to do with translated strings.

I have other themes with the same problem, and the solution I am leaning towards is to replace the strings during the build process and calling makepot.php to create a unique pot file for the theme right before zipping it up.

This leads to another issue though... now there are two sets of .po files. There are gettext utilities available for merging these together (and tons of tutorials about how to do it), but I don't have experience with them yet as far as if they really work reliably or not. I'm also concerned about orphaned strings that might never get removed from the "downstream" .po files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions