Issue Overview
Traduttore has a handy mergeWith option which allows to merge an existing POT file with the default generated by Traduttore. Unfortunately this option doesn't work
To Reproduce
Steps to reproduce the behavior:
Create a project with a custom POT file and the mergeWith option
Let Traduttore import the project
After import notice that the strings from the custom POT file are not there
Expected behavior
Strings from the custom POT file are also imported.
The file_exists() is used for a relative path while the current directory may not be the directory of the plugin, usually the root directory of WordPress itself. The fix would be to prefix the merge value with $source.
Issue Overview Traduttore has a handy
mergeWith
option which allows to merge an existing POT file with the default generated by Traduttore. Unfortunately this option doesn't workTo Reproduce Steps to reproduce the behavior:
mergeWith
optionExpected behavior Strings from the custom POT file are also imported.
Additional context https://github.com/wearerequired/traduttore/blob/413cff440a85a49784ea677debc1b8301907e541/inc/Updater.php#L186-L188
The
file_exists()
is used for a relative path while the current directory may not be the directory of the plugin, usually the root directory of WordPress itself. The fix would be to prefix the merge value with$source
.