HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Localization Table Editor error  (Read 6023 times)

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Localization Table Editor error
« on: May 31, 16, 12:05:03 PM »

Hi.

Today I tried to add some new strings to my localization table. And I got this error:

Code: [Select]
Server Script Error
Area: 36268000006 Instance: 0
 [DebugSystem] SCRIPT ERROR: Localization: Loc_UniverseLocaleList failed(ERROR) due to(
ERROR: INVALID_KEY (reserved invalid key ID) is not a valid key ID. )
Time:05/31/2016 16:55:33 UTC
Call trace:
  Script _LocalizationClassMethods line 319 me[9223372064015021550]
starting method/function LOC_ONAPICALLFAILED
starting me[id=9223372064015021550 class=_Localization]

This was my first try to work with editor after last update.
Strings which already added to table, loading as usuall, without any issue.
« Last Edit: Jun 03, 16, 02:09:37 AM by GlorianLanTarini »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Localization Table Editor error
« Reply #1 on: Jun 10, 16, 12:37:36 PM »

Hi,
Did a quick double check to see if there were any changes in the last update related to Localization, and there havent been any changes in a very long time on that.

I looked at this method/function and its very specific in the way it gives the error.

I cannot get this error to reproduce however.  Its possible it has nothing to do with your new string, it could be coincidence. 

I would begin tracing the code from this error, backwards until you find anything suspicious

Do you have any additional errors/code you could point to that we might look at to help furhter?

Can you post the code where you are adding the new string?

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Localization Table Editor error
« Reply #2 on: Jun 10, 16, 08:39:30 PM »

Sorry, maybe I said not clearly.
I mean that error occurs when opening the editor. That is, I don't adding a line using my code, but just trying to open the editor to add through it.
Localization files in place. Old strings are displayed normally. For example, the default localized label displays the strings with no error messages.
« Last Edit: Jun 10, 16, 08:45:38 PM by GlorianLanTarini »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Localization Table Editor error
« Reply #3 on: Jun 10, 16, 10:27:40 PM »

I see.

I'm having some issues even getting the editor to load at all.

Haven't tried it in quite a while.

Seems some controls are not getting built or at least their id's arent getting stored.

Config file loads the first time , but after closing the editor, the config file isn't loading due to it
already being loaded it says, not sure if thats part of the issue or a symptom or what.

Maybe someone else can repro it as well:
hit F5 go to tools, open the Localization table editor.
I don't have a custom override for that system so I can't test much beyond that.

clicking on anything just throws an error (node 0, its not finding the table viewer dropdown).

Didnt notice it earlier as I didn't do enough prodding in the editor. (also didnt try to reopen it again after closing it)
« Last Edit: Jun 10, 16, 10:29:17 PM by ToY-Krun »
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Localization Table Editor error
« Reply #4 on: Jul 06, 16, 02:22:28 PM »

I have made a lot of modifications to the way the localization script works.  One fix I found is in the client script _GUILocalizationTextInputBoxClassMethods.  There is this method:

Quote
method _LocalizationSaveTextInput(b as NodeRef of Class GUITextInputBox)
  #if debug
    println("SaveSmartTextInput()")
  #endif
  where me is kindof GUIControl
    var myParent = me.parent
    if myParent <> None
      if HasMethod(myParent, "_LocalizationSaveTextInput")
        myParent.SaveSmartTextInput(me)
      .
    .
    if (me <> None) // cause above may have handled it and killed the control
      if me.script <> None
        if HasFunction(me.script, "_LocalizationSaveTextInput")
          me.script:SaveSmartTextInputBox(me)
        .
      .
    .
  .
 
  if $LOCALIZE._LOC_GetLocalizationTableViewFilter()._localizationUserIsTyping
    $LOCALIZE._LOC_GetLocalizationTableViewFilter()._localizationUserIsTyping = false
  .
.

I believe the text in red should be switched with the text in blue.  This probably isn't what is causing your problem, but it is something to look at, anyways.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Localization Table Editor error
« Reply #5 on: Jul 06, 16, 04:05:08 PM »

Hrm, I haven't begun work on localization yet, but have played with it a "little" in the past. 

It does look like something got broken since i tried it last, but thanks for that input Scott,
I'll make a copy of that for future reference.

If i get a chance I'll test it out, it "could" possibly be part of the current problem, at least
regarding the issue I found where the editor itself is acting up.  Could even be the root of it.


Thanks

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: Localization Table Editor error
« Reply #6 on: Jul 06, 16, 07:39:10 PM »

Maybe someone else can repro it as well:
hit F5 go to tools, open the Localization table editor.

clicking on anything just throws an error (node 0, its not finding the table viewer dropdown).

Didnt notice it earlier as I didn't do enough prodding in the editor. (also didnt try to reopen it again after closing it)

I can open it and click in the boxes, nothing wrong with that part. I type things in "Add New String ..." and nothing seems to get saved when hitting enter. The filter seems to filter everything out, even copy paste of the values. I close and open again, nothing changed or saved.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Localization Table Editor error
« Reply #7 on: Jul 06, 16, 11:05:05 PM »

Thazager, do you have an error in error tab, or script error tab during opening or working with editor? Also, do you have some localized strings in table? And if you have, can you see it in editor?

At my side, I have table with strings with two languages. And when I use, for exemple, _LabelLocalized - I got this strings normally. And I can open editor just like you. But I have error which I described at starting post. And I can't see my strings in editor.

But, I have some new and intresting details. If I put something to "filter" box, it's give me my strings, and throw same error again. Ofcourse, I see not all strings, but only which contain "filter" value.
Also, I found that my strings have no text box for second language starting from #21. But, if I use filter to leave one string only, editor show me both languages regardless of the numbers of string. It's look really strange.
And, just like you, I can't add or change strings by editor.

And I get errors for each action. Different errors, but its all about "not a valid key ID"
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: Localization Table Editor error
« Reply #8 on: Jul 07, 16, 01:08:21 PM »

I have not made any changes to it. It still has the sample string in there. NO errors showing in either script error tab or error tab. I have not made any localized strings.

I'm not sure what the localized table would be used for, we are thinking on adding in pictures as they are easily understood.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Localization Table Editor error
« Reply #9 on: Jul 07, 16, 08:11:14 PM »

from what I've tested it will only begin erroring out once you've added/attempted to add a new string.

I'd say its something that "slipped through the cracks" since its not be heavily used by alot of folks yet, and
the error went unnoticed.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Localization Table Editor error
« Reply #10 on: Jul 07, 16, 10:42:46 PM »

Quote
I'm not sure what the localized table would be used for, we are thinking on adding in pictures as they are easily understood.
Universally understood icons are certainly a good thing to use where you can.  But it would be pretty tough to make a game without any text at all, and this tool (when it works) makes it easy for a user to choose their preferred language and then instantly have all the text translated for them.

It can help your game reach as large an audience as possible.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Localization Table Editor error
« Reply #11 on: Jul 07, 16, 11:25:16 PM »

Quote
Strings which already added to table, loading as usuall, without any issue.
If you edit those strings already added, does it cause an error?
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Localization Table Editor error
« Reply #12 on: Jul 07, 16, 11:53:15 PM »

Quote
Strings which already added to table, loading as usuall, without any issue.
If you edit those strings already added, does it cause an error?

Yes, it does. And changes don't save.

By the way, the editor worked more or less well only when I first came to the Hero Cloud. Almost three years ago. Then I added the first strings. After several updates - not sure, didn't worked with the text at that time, the error appeared. It got to the point that I started adding a new strings manually into the localization files. But, it is very inconvenient, especially when mass adding. Due to the specific file syntax and you must insert the text into several files in different syntaxes. And this is really error-prone. That's why I went back to trying to work with the editor.
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Localization Table Editor error
« Reply #13 on: Jul 08, 16, 10:32:53 AM »

Did you put in this fix I added to our previous conversation?

https://community.heroengine.com/forums/index.php/topic,5668.msg33000.html#msg33000
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Localization Table Editor error
« Reply #14 on: Jul 09, 16, 01:36:25 AM »

No, I don't.

I will try and say what happen.

EDIT:

I did it. Nothing changed.
« Last Edit: Jul 09, 16, 01:44:47 AM by GlorianLanTarini »
Logged