Clarification of ImportSettings

In the ExistingTUsUpdateMode it has the following:

Overwrites only the current TUs where the source segment matches and leaves other existing TUs unmodified.

I could not understand "current TUs". What does that mean and how does it differ from "existing TUs"?

Parents Reply
  • Hi Romulus,

    Thanks for the help. I was having a hard time understanding, so I decided to look at the source in Importer.ImportInternal:

        case ImportSettings.TUUpdateMode.OverwriteCurrent:

        if ((previousTranslationHash == weakHashCode || flag) && !flag2)

        {

            importResult.Action = Action.Discard;

        }

        else

        {

            if (previousTranslationHash == 0 && flag)

            {

                importResult.Action = Action.Merge;

            }

       //....

       }

    If your explanation was correct, shouldn't "(previousTranslationHash == weakHashCode || flag)" be "(previousTranslationHash == weakHashCode && flag)" instead? (I may be wrong about what "previousTranslationHash" means as I couldn't find that part).

    I don't fully understand what is going on, so I might be incorrect, but it seems like the source code is wrong according to your explanation. (and sorry for the poor code formatting...)

Children