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

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
User avatar
OldFritz
Inserter
Inserter
Posts: 39
Joined: Mon Feb 06, 2017 2:52 pm
Contact:

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

Post 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? ;)

Loewchen
Global Moderator
Global Moderator
Posts: 8307
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

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

Post by Loewchen »

Would be simpler if you just post the mod.

User avatar
OldFritz
Inserter
Inserter
Posts: 39
Joined: Mon Feb 06, 2017 2:52 pm
Contact:

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

Post 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.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

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

Post 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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

User avatar
OldFritz
Inserter
Inserter
Posts: 39
Joined: Mon Feb 06, 2017 2:52 pm
Contact:

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

Post 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!

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

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

Post 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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

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

Post 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.
quick links: log file | graphical issues | wiki

User avatar
OldFritz
Inserter
Inserter
Posts: 39
Joined: Mon Feb 06, 2017 2:52 pm
Contact:

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

Post 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. :)

Diedel
Inserter
Inserter
Posts: 30
Joined: Wed Jul 06, 2016 8:03 pm
Contact:

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

Post 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.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

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

Post 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
quick links: log file | graphical issues | wiki

rANALAN
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Nov 02, 2017 6:53 am
Contact:

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

Post by rANALAN »

All the entity names for modding purposes can be found here, FYI https://wiki.factorio.com/Data.raw

Koub
Global Moderator
Global Moderator
Posts: 7199
Joined: Fri May 30, 2014 8:54 am
Contact:

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

Post by Koub »

This topic is half a year old, maybe can you let it rest in peace ? :roll:
Koub - Please consider English is not my native language.

Post Reply

Return to “Technical Help”