PressCrew / infinity-cbox

A fork of the Infinity theme for developing the official CBOX theme
GNU General Public License v2.0
1 stars 1 forks source link

Unique i18n challenges #8

Open MrMaz opened 9 years ago

MrMaz commented 9 years ago

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.