Open mw-martin opened 6 years ago
Hm, I guess there is no way to distinguish between "Accept the empty string as the translation" and "Accept the fallback behavior as intended" in the current file format. I think the latter case is more frequent (e.g. when you have abbreviations that are the same for most or all of the cultures).
You're right to assume that using that "accept" option in TxEditor should not have any effect on programs using the dictionary file. And it's indeed probably because now a key exists. I guess I could add a behaviour to the TxLib code to ignore XML elements when there's no text and the acceptmissing
attribute is set to "true". Because you were accepting it missing when it was empty. So it should be considered empty afterwards, too, even though it's technically there.
I'm not sure if this behavior is intentional, but it is not how I understood the documentation.
Say you have a txd file with English (as primary) and French cultures, and a key that intentionally only has a translation for english:
Then
Tx.SetCulture("fr"); Tx.T("minimum");
would result in "Min" as intended.The TxEditor shows a "Missing translation" as a problem for that key, so you click on that (so it gets a green checkmark) to accept the inconsistency and mark it as intentional. This results in:
With that file, the behavior is now different, and
Tx.SetCulture("fr"); Tx.T("minimum");
results in an empty string. I expected this to only affect the behavior in the TxEditor, not the actual translation.