Page 1 of 1

unknown key: "item-name-xx." -non mod author fix?

Posted: Tue Mar 14, 2017 8:47 pm
by OldFritz
Hey fellow automatons,

first off, pardon me if this is the wrong forum section. I had to guess where to put this and hoped this would be the most fitting place.


I guess some, if not most people run across this description: unknown key: "item-name-xx." when hovering about an item/icon from a mod. Unfortunately i know nothing about modding (yet :geek: ), so i asked myself; is there a possibility that a regular user can fix this? Where the errorsource is,i do not know of course. But naive as i am, i guessed, all it takes to fix, is some good smashes with my wrench in hand.


So, anybody feel generous to enlighten me? ;)

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Tue Mar 14, 2017 9:04 pm
by Loewchen
Would be simpler if you just post the mod.

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Tue Mar 14, 2017 9:09 pm
by OldFritz
Speaking of hitting things with a wrench... *points to braincase*

One noticed is "beyond"
https://mods.factorio.com/mods/Simdezimon/Beyond
The included "silicon ore" shows this behavior.

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Tue Mar 14, 2017 9:45 pm
by Adil
This error is the translation missing.
You open the mod folder,
open\create folder named "locale",
open\create folder named "en" (for english translation),
open\create file which name (unimportant itself) ends with ".cfg",
find\add "[item-name]"
below that add "`xx`= `translation`".

`xx` is the last part of error text you see, `translation` is something your'd rather see instead.
Optionally, you share that in the relevant mod thread.

Alternatively, you just nag the mod dev.

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Tue Mar 14, 2017 10:37 pm
by OldFritz
Hm, i fumbled some variations, but none seems to be the right one.

The item in world map is refered to as "Quartz Sand", in other folders it is silicon ore. I tried both on the first line; [name].
same with the translation path. Actually there is not that much to screw up, yet im doing it. :D

Tomorrow, with a fresh start, i try more variations, capitalisation and so forth.

A big thanks though to you Adil, for this "workaround" tutorial!

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Tue Mar 14, 2017 11:18 pm
by Adil
I don't understand what are doing but you are doing it wrong.
You just take that long text you think an error is and the last one is the name you need to translate. The fraction of text before the dot in the message gives you the group to which this name belongs in the locale.cfg .
No variations, no capitalizations, no other folders.
You say it is "silicon-ore" that is not localized.
There indeed seems to be such item in the data.
In the file "locale/en/base.cfg" there is no item-name for it however.
Open that file, find line "[item-name]"
On the next one put the following: "silicon-ore=Quartz sand"
Without quotes.
Now close factorio program and start it again, the name will appear.

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Tue Mar 14, 2017 11:21 pm
by daniel34
Just adding

Code: Select all

silicon-ore=Quartz sand
under the already existing [item-name] in locale\en\base.cfg fixes it for me.

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Wed Mar 15, 2017 2:12 pm
by OldFritz
Oh my...

yeah, i totaly misunderstood where to look for and where to add sth... my bad.
open\create folder named "en" (for english translation),
open\create file which name (unimportant itself) ends with ".cfg",
find\add "[item-name]"
that in particular i misunderstood. But, in the end, i finally got it and could fix it.

Thanks to both of you, for helping me out. Learned just a bit more. :)

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Sat Apr 29, 2017 9:30 am
by Diedel
I have a question that might be somewhat related to this, though i am actually wondering if i am missing a config setting or something, because i have a few mods that throw the unknown key error with the same "bug". The problem i see is that all these mods have extra space around the "=". If i just remove the extra space as in "aasas = asasas" to "aasas=asasas" they work fine, but as so many mods do it with spaces, i wonder if i am missing something to fix this without changing all the locale files.

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Sat Apr 29, 2017 10:29 am
by daniel34
Diedel wrote:I have a question that might be somewhat related to this, though i am actually wondering if i am missing a config setting or something, because i have a few mods that throw the unknown key error with the same "bug". The problem i see is that all these mods have extra space around the "=". If i just remove the extra space as in "aasas = asasas" to "aasas=asasas" they work fine, but as so many mods do it with spaces, i wonder if i am missing something to fix this without changing all the locale files.
They have changed it in 0.15, you'll need to change all locale files.
See this thread: viewtopic.php?f=23&t=45283

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Thu Nov 02, 2017 6:56 am
by rANALAN
All the entity names for modding purposes can be found here, FYI https://wiki.factorio.com/Data.raw

Re: unknown key: "item-name-xx." -non mod author fix?

Posted: Thu Nov 02, 2017 9:52 am
by Koub
This topic is half a year old, maybe can you let it rest in peace ? :roll: