Welcome, Guest
Username: Password: Remember me

TOPIC: Term parser ignores [TermsPopup] attributes

Term parser ignores [TermsPopup] attributes 1 month 5 days ago #3208

  • studenman
  • studenman's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 1
  • Karma: 1
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
The administrator has disabled public write access.

Term parser ignores [TermsPopup] attributes 1 month 5 days ago #3210

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1123
  • Thank you received: 240
  • Karma: 70
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
The administrator has disabled public write access.

Term parser ignores [TermsPopup] attributes 1 month 5 days ago #3211

  • studenman
  • studenman's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 1
  • Karma: 1
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
The administrator has disabled public write access.

Term parser ignores [TermsPopup] attributes 1 month 5 days ago #3212

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1123
  • Thank you received: 240
  • Karma: 70
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 administrator has disabled public write access.
The following user(s) said Thank You: studenman

Term parser ignores [TermsPopup] attributes 1 week 3 days ago #3232

  • studenman
  • studenman's Avatar
  • Offline
  • Senior Member
  • Posts: 62
  • Thank you received: 1
  • Karma: 1
That sounds fine then, thanks Frank.
Follow Tiny Bubbles Development:
Twitter | Facebook | Web
The administrator has disabled public write access.
Time to create page: 0.152 seconds
Colors