• Resolved aljuk

    (@aljuk)


    From what I can see, if you translate a block of text, and then edit the original, the link between the original and the translation is broken. ie. Your translation “disappears” and you have to do it over again.

    So, over time, your database contains more and more rows of redundant, broken translations, ie. orphan data.

    How to automatically delete it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    It’s true that TranslatePress can pick up a lot of text that doesn’t need a translation. Inserting text in the database even without a translation is a cost that we are aware of, but in most cases, there are no side effects. There is constant work being done on our side to better recognize what text is useful for translation and what’s not.
    In addition, we are working on a tool to clean the database build up.

    If you can identify the places where TP picks up dates and other untranslatable text you can make adjustments yourself by adding the data-no-translation attribute on the HTML. This will prevent adding them to the database as well as translating them.

    About your case, changing the original content will invalidate the translation because their are string-based. Every string has a corresponding translation (if you create one). If you change the original string, basically, you create a new string that will need to be translated.

    To facilitate translation retrieval we implemented the Translation Memory feature.
    For example, if you have a string in your default language that is translated and you go in and modify that string, the translations for it won’t appear any more at the front-end level but will continue to exist in wp_trp_* tables from your database.
    After, if you go to the translation interface and select that string, the Translation Memory feature will show you translation suggestions for that string (based on other strings that you have translated, even ones that don’t appear anymore in the front-end; so most likely, you will see the older translation as the first suggestion).
    However, this translation memory feature is not 100% accurate and also could not return any suggestion sometimes.`

    In addition, we are working on a tool to clean the database build up.

    That sounds great!
    Some time ago, I had some thoughts on about how a cleaning procedure could work. I’m sure the TranslatePress devs already have something in mind, but I think it won’t hurt to post my idea:

    Feature Request #1
    I assume, it should help to delete all the empty (= untranslated) rows from time to time. I’d like to see an “remove empty rows” next to the “remove duplicate rows”-feature. After that, translatePress will add only the strings that are still existing again.

    Feature Request #2
    To get rid of strings that actually have been translated but are not used any more, I would suggest a “last read”-column and a “log last read” debugging option for that. So, you could enable this setting for a limited time (because it would slow down the page, so only one week for example) and after that, every translation that was not used within that week would get moved to a “backup”-database. There it would be available via the translation memory function for the cases where you figure out that it is still needed even though it was not used in the logging period. And than there would be a “permanently remove unused translations” function that would empty the backup tables.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to identify and delete orphan translations?’ is closed to new replies.