Closed swissspidy closed 5 years ago
Looks like #107 uses the project's text domain for the file name but omits the locale in the process 🤦♂️
Will look into this as part of #108.
Do you think it's possible to fix this also without #108? It's a bit unfortunate for users who are using the current master branch as it generates broken language packs.
Issue Overview As reported in #100, Traduttore creates translation files with names like
<project-slug>.mo
.The project slug in GlotPress and the actual slug of the WordPress plugin or theme can be different.
So if your GlotPress project's slug is
example-corp/example-plugin
, but the plugin's actual slug (and thus text domain) is justexample
, Traduttore createsexample-plugin.mo
while WordPress is looking forexample.mo
.As suggested in https://github.com/wearerequired/traduttore/pull/100#issuecomment-437057906 we should determine the text domain upon POT file generation / translation import and save that information in the database.
After that, when generating the language packs we use that text domain for the file names.
Additional context
100.