Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Doug Wollison

    (@dougwollison)

    Oh frell, I never thought of that. I built this to maintain custom translation files; it slipped my mind that others would be replaced via updates.

    As it stands I have no solution. I can add basic backup of the latest version stored in wp-content on each save, but I’m not sure how well that would work.

    I’ll try to look into adding some sort of diff tracker so it can attempt to re-apply the changes you made but I’m not sure how well it’ll work.

    Thread Starter hnhn2

    (@hnhn2)

    Understood. It’d nice to have any solution for this (I’m not aware of any plugin that handles this right).

    Automated patching can fail, what then?

    Doesn’t wordpress look up the .mo files in multiple locations? Could the customized .mo be placed in a path that’s searched first? Perhaps with overloading the .mo lookup functions?

    Then there’s still the problem with synchronization after plugin update, but at least the original changes would be retained.

    Plugin Author Doug Wollison

    (@dougwollison)

    I’ll work on a update for this week which would at least add backup saving of the file, and a check to see if the current was changed from what it was during the last edit and offer a restore/merge option.

    Plugin Author Doug Wollison

    (@dougwollison)

    So sorry about the delay on this; work has been hectic and this got lost in the chaos.

    As of writing I haven’t published it to the plugin repo yet, but I’ve just finished reworking the file management system to solve your issue.

    Edited files are now stored in a separate directory in wp-content, and will be loaded in place of their originals provided they are newer. This way updating a theme/plugin won’t break your edits, however, after updating you’ll want to check if there were changes to the original translation files and replicate them as needed on the edited version.

    Basically, the recommended workflow is you update the theme/plugin, see the notification, click the link to edit the file, which now includes a link to the original, and once you update/re-save the edited version, it’ll take over again.

    I hope this helps. There’s also some comment editing capabilities that I was working on earlier included in this update.

    https://github.com/dougwollison/pomo-editor/releases/tag/v1.2

    Great plugin, nicely written.
    I only need to change a few entries in my theme’s texts, because I think they are confusing for my type of users. I am also concerned about maintenance: how can my ‘patches’ survive updates of the original theme text files?
    I was wondering if this plugin could keep the changes in a separate file and then merge them when WP is started, overwriting existing keys in the original file with patches.
    Thanks for your great work.

    • This reply was modified 8 years, 4 months ago by polev.
    Plugin Author Doug Wollison

    (@dougwollison)

    Hi @polev,

    The best I’ve been able to manage so far is keeping the updated file elsewhere, so when you update you’ll be able to pull up the modified version (it’ll default to using the latest version at the moment), and update it (with or without changes) so that it’ll be used by the system again.

    I’m not sure if I’ll be able to build in proper version control since while updating tweaked translations isn’t an issue, I’m not sure how to handle changes to the original strings or for adding new entries.

    You can download the update here: https://github.com/dougwollison/pomo-editor/releases/tag/v1.2

    I have yet to actually publish this release to the repo since it ended up including some other improvements I hadn’t fully tested yet.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Translations are lost on plugin l10n update.’ is closed to new replies.