Project Zomboid

Project Zomboid

TV & Radio ReInvented
Title names does not match for another languages
Hi, guys. In debug mode, print() entries with the name TV in Russian are dropped, when i click to any TV and no interface actually appears.
[img]https://imgur.com/rndvz2j[/img]

i fix it for myself by change code to check Base internal name, but not Title of window:
2 places to change:
[img]https://imgur.com/1Pl9ceT[/img]
[img]https://imgur.com/yjAga1v[/img]

upd! more optimized fix - https://drive.google.com/file/d/1IcJixcwijZ0NqavKpzXvYsmBxFIqhBZm/view?usp=drive_link



@tealera, There may still be places to go before I go any further. but could you conduct a code review, you might want to act in the same way, in my humble opinion, this is a solution to the problems with language mods. and please don't be angry that I got into your code, I just wanted to see how it was supposed to work. ))
Last edited by karimoff; 5 Feb @ 1:04am
< >
Showing 1-15 of 18 comments
bonsly 4 Feb @ 11:29pm 
Привет, изменение кода в отладке решает проблему с отображением именно радиоприемников, магнитол и телевизоров? Заранее благодарю за ответ.
karimoff 4 Feb @ 11:32pm 
@bonsly, да изменение кода в ISRadioWindow.lua в двух местах, как показано на скрине решает, кроме раций, которые в инвентаре или на ремне, если стоят на земле, то тоже работает
Last edited by karimoff; 4 Feb @ 11:35pm
bonsly 5 Feb @ 12:09am 
Добавил, но ничего не изменилось. Вероятно где-то ошибся?
https://imgur.com/a/nu15eYT
karimoff 5 Feb @ 12:15am 
ну не то чтобы ошибся, там ниже тоже надо менять где по английски названия написаны.
могу файлик куда-нибудь выложить, если надо
bonsly 5 Feb @ 12:18am 
Да, буду очень благодарен)
bonsly 5 Feb @ 12:43am 
Заработало! Спасибо :steamthumbsup:
panda 5 Feb @ 1:51am 
omg, man you just fixed it, great!
@panda, glad to hear this, what language in game enabled?
tealera  [developer] 5 Feb @ 2:51am 
Interesting solution. Good job, karimoff!

Did you identify what mod causes this problem?
Because Vanilla B41 and B42 work in all languages.
B41 checks for translated names in translation files.
B42 checks for English name, since getDeviceName() should always get an English name.
@tealera, i use my translation mod https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3388178510
and getDeviceName() return russian names of every objects, like you can see in first screenshot of debug file.

i dont now maybe vanilla translations files some languages dont have exact records and when default its english return.
and i think @panda use another mod, i believe he is not russian )
tealera  [developer] 5 Feb @ 3:51am 
Originally posted by karimoff:
@tealera, i use my translation mod https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3388178510
and getDeviceName() return russian names of every objects, like you can see in first screenshot of debug file.

i dont now maybe vanilla translations files some languages dont have exact records and when default its english return.
and i think @panda use another mod, i believe he is not russian )

It's actually pretty weird.
I just checked Vanilla russian translation files and there are names for every item.
So there is no way that it's some fallback to English.
In theory, your translation mod should just overwrite translations and not affect the way getDeviceName() works, but apparently it does.
It's pretty strange.

I already have checks for translated names in B41 with getItemNameFromFullType().
It checks for translated names, but the problem is that if I do the same thing in B42 files then it will work for people with custom translation mods, but it will break for people who play with Vanilla translation.
If you'll have some ideas, please let me know.
@tealera, i just check vanilla translation file itemname_ru.txt i see only ItemName_RADIO.TvAntique = "Старый телевизор",
but not
ItemName_Base.TvAntique = "Старый телевизор",
every objects same problem, have ItemName_Radio. and not ItemName_Base

my mod has and ItemName_Radio and ItemName_Base
i believe what getDeviceName() used ItemName_Base records (maybe b41 - "radio", and b42 - new "base")
Last edited by karimoff; 5 Feb @ 4:09am
SKhon 7 Feb @ 5:31am 
Originally posted by karimoff:
@bonsly, https://drive.google.com/file/d/1IcJixcwijZ0NqavKpzXvYsmBxFIqhBZm/view?usp=drive_link
А это файлик подходит только для 42 билда? Или можно использовать и для 41?
tealera уже прописал себе фикс, файл не актуален. а что у тебя в b41 не работает?
< >
Showing 1-15 of 18 comments
Per page: 1530 50