Closed shaoshing closed 8 years ago
This looks like it's curing the symptom rather than the cause. We have safeFilterNameMap to figure out what we can remove from the id. Can you explain why this change had to be done in the function, essentially quieting down the error, instead of fixing it in search/libraries.js
where we're supplying the non-localizable strings?
Hi @volfied, that's a great question. The essential cause is that the ID is a mix of localizable/non-localizable strings. For example, here are some possible values of the id
param:
[""] // not localizable
["RECENT_DOC"]
["ALL_LAYER", "ARTBOARD"]
["LIBRARY", "123456.ABCD.ABCD.ABCD.123456"] // ID is not localizable
The original way was to translate the text, then look for the name from safeFilterNameMap
. If neither of them works, do nothing. This used to be working until we changed the behavior of nls.localize
to raise an error if translation not found. So the easiest fix for me is to catch the translation error.
Thanks for the explanation.
Fix for issue #3467