Term parser ignores [TermsPopup] attributes

More
6 years 2 months ago #3208 by studenman
When the term parser is counting references, it needs to look for string properties with the attribute [TermsPopup] and consider these a reference. Currently, it only seems to care about Localize components, not custom components with [TermsPopup] attributes.

Follow Tiny Bubbles Development:
Twitter | Facebook | Web

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #3210 by Frank
Nice suggestion.

2.8.8a4 now checks all your object with custom scripts. And counts the terms in LocalizedString and those regular strings marked as [TermsPopup].
That happens for both variables and properties.

Also, as always, it detects when you do something like this in your code:
x = LocalizationManager.GetTranslation("Term");


Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #3211 by studenman
Cool, thanks! I'm curious if this adds any additional performance overhead? Is parsing always done manually? I would suspect it is done, for example, after importing from a Google document, which I do quite frequently. I personally would prefer that it does the parsing only when I want to look for missing or unreferenced terms.
Have a great night!

Follow Tiny Bubbles Development:
Twitter | Facebook | Web

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #3212 by Frank
It does add some overhead.
Because it has to find all object for custom scripts and then all the variables and properties of those scripts, and also check if they have the attribute assigned.
Parsing scripts for LocalizationManager.GetTranslation and ScriptLocalization.XXX is also slow.
I mean, it takes 2-3 seconds in a heavy project.

That's why the parsing was divided in two situations.
When you open the LanguageSource it does a quick parsing that only looks for terms inside the Localize components. Generally thats quite fast.
Then, if you click the refresh button at the top of the Term's list or go to the Tools \ Parse Terms and select the Scripts checkbox. Then, it does a full Parsing (Localize+ scripts(.cs)+objects with custom scripts).

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The following user(s) said Thank You: studenman

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #3232 by studenman
That sounds fine then, thanks Frank.

Follow Tiny Bubbles Development:
Twitter | Facebook | Web

Please Log in or Create an account to join the conversation.

Time to create page: 0.144 seconds
Template by JoomlaShine