• Resolved yohansolo

    (@yohansolo)


    Hi there,

    We have a problem setting up the advanced translation configuration with an extension called zionbuilder, whose pro version is provided as a second extension. The extension comes with pot files only and synchronizations are needed because these files are not quite up to date. But that’s not the point.

    Here is what is happening.

    Zionbuilder Classic is installed in a “zionbuilder” directory of the plugins directory of WordPress.

    It has a namespace named “zionbuilder”. The configuration is quite simple and everything works; no problem.

    Zionbuilder Pro is installed in a “zionbuilder-pro” directory of the WordPress plugins directory.

    It has a first namespace named “zionbuilder-pro”. This first configuration is also quite simple and everything works for it; no problem.

    But also, in Zionbuilder Pro there are strings to translate with the namespace “zionbuilder” already seen in the Classic extension.

    We did the following:
    In the advanced configuration of Zionbuilder Classic, add a set. And in “Source file paths” we put a relative path ‘../zionbuilder-pro/’ for testing.
    After validation, Loco translate systematically rejects this relative path. It deletes the “zionbuilder” portion thinking it is the same source extension… It’s quite annoying, isn’t it?

    Is there a way to tell it not to delete this relative path?

    On the other hand, if we create this same set on the Pro side, then there is a slight problem of naming and namespace overlay as the translations must absolutely land in the languages/plugins folder of WordPress to work properly… And either one overwrites the other, or the other overwrites the one ^^’

    From my point of view, the first result is for us a Loco Translate bug because it deletes a portion of a legitimate path thinking it’s doing the right thing when it shouldn’t.
    I hope I’ve been clear enough for you to help me.

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Thanks for reporting. It does look as if there’s a bug, although I suspect it’s an error rather than trying to be clever and do the right thing. I’ll look at this now.

    Separately from this problem: If you have two plugin directories and two text domains, it seems unnecessary to add two domains to one of the plugin configs. You should be able to edit both domains by going via their corresponding plugins.

    Maybe I don’t understand why you need to do this, but either way I’ll post back about the config bug in due course.

    Thread Starter yohansolo

    (@yohansolo)

    Thank you for your feedback,

    On our side, it was indeed several tests on the extension. And several ways of looking at the configurations as we looked at how it was programmed. And we came across this little bug and so we investigated by doing this protocol above which is not the one we follow for our translation.

    Actually we have other little translation issues with the extension not really accepting files being stored anywhere other than the common WordPress directory as there are json files involved as well (but we don’t really understand why it is so strict either ^^).
    And we actually go directly through the corresponding plugin to get the right namespace ??

    Thanks to you

    Plugin Author Tim W

    (@timwhitlock)

    I’ve identified the bug and deployed a fix to the current dev branch.

    The problem was bad relative path calculations. It was not comparing paths properly in some cases, so it thought (for example) that “pro” was a subfolder of “zionbuilder”. This should be ok now, but I can’t say when a new version will be released.

    Thread Starter yohansolo

    (@yohansolo)

    Faster than light ! ??

    Thank you for the support and the fix.

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bug : Loco deletes source path portion thinking it is the same source’ is closed to new replies.