Term parser ignores [TermsPopup] attributes
6 years 4 months ago #3208
by studenman
Term parser ignores [TermsPopup] attributes was created 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.
Please Log in or Create an account to join the conversation.
6 years 4 months ago #3210
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Term parser ignores [TermsPopup] attributes
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:
Hope that helps,
Frank
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.
6 years 4 months ago #3211
by studenman
Replied by studenman on topic Term parser ignores [TermsPopup] attributes
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!
Have a great night!
Please Log in or Create an account to join the conversation.
6 years 4 months ago #3212
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Term parser ignores [TermsPopup] attributes
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
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.
6 years 3 months ago #3232
by studenman
Replied by studenman on topic Term parser ignores [TermsPopup] attributes
That sounds fine then, thanks Frank.
Please Log in or Create an account to join the conversation.
Time to create page: 0.181 seconds