Project Zomboid

Project Zomboid

Food Expiration Date and Bar
rez  [developer] Apr 7, 2018 @ 5:18pm
Feedback
Please post feedback here.
Note that this mod is supplied 'as is' with no warranties or liabilities.
Last edited by rez; Apr 30, 2019 @ 1:43pm
< >
Showing 1-15 of 26 comments
Chardazar Apr 11, 2018 @ 5:44am 
Really good mod. I like it! I just get frame-rate drops and the text in my loot windows seem to be in extra thick bold for some reason. Besides that, I love this mod
rez  [developer] Apr 11, 2018 @ 8:24am 
Originally posted by Chardazar:
Really good mod. I like it! I just get frame-rate drops and the text in my loot windows seem to be in extra thick bold for some reason. Besides that, I love this mod
So it differs from what is seen on the screenshots in the description?
Could you please make some screenshots, state your game version and maybe share your 'console.txt' file (from C:\Users\%username%\Zomboid)? I may want to look at it to reproduce and fix if possible, because text should not become bold. The mod should not touch anything apart from tooltip.
cocoayoc Apr 13, 2018 @ 12:50pm 
can you add an option to sort the food in inventory by how soon they'll go stale/rotten? that'd be a nice way to know which food to focus on first
rez  [developer] Apr 14, 2018 @ 9:59am 
Originally posted by cocoayoc:
can you add an option to sort the food in inventory by how soon they'll go stale/rotten? that'd be a nice way to know which food to focus on first
Thought about that, that would be perfect, but most likely for sort to work it would have to be a new field in item properties displayed as a new column (we have only 2 of them now: name and category). I doubt that it is doable without changing in-game mechanics, but there's a chance TIS developers will have anything to say.
If you come across a mod with any additional columns that is not Hydrocraft scale, there is a chance someone had already found a way, so ping me, will try to implement.
hOtaRcticsTunt Jun 13, 2018 @ 2:47am 
I guess mod is trying to be translated on russian and ♥♥♥♥♥♥♥ up cuz what i see instead of "fresh" or "rotten" are random symbols.
How can i fix this? How can i play russian ver of game with eng ver of mod for example?
rez  [developer] Jun 13, 2018 @ 8:39am 
Originally posted by hOtaRcticsTunt!:
I guess mod is trying to be translated on russian and ♥♥♥♥♥♥♥ up cuz what i see instead of "fresh" or "rotten" are random symbols.
How can i fix this? How can i play russian ver of game with eng ver of mod for example?
We can approach this differently: you can send me screenshots of what you see and I can try to fix it, or we can find a workaround, for example, you should be able to locally replace russian localization files with english ones or remove russian localization from the mod altogether.

I'd prefer to fix the localization. The guy who sent it to me supposedly did not test it with new vehicle release.
Last edited by rez; Jun 13, 2018 @ 8:41am
rez  [developer] Jun 13, 2018 @ 9:36am 
Originally posted by hOtaRcticsTunt!:
How can i fix this? How can i play russian ver of game with eng ver of mod for example?

I have probably fixed the encoding issue, found it in both RU and PL translations.
Please try the new release.
Misha Jun 30, 2018 @ 12:36am 
How to translate to another language? (add new)
rez  [developer] Jun 30, 2018 @ 1:18am 
Originally posted by Misha:
How to translate to another language? (add new)
1. open '/SteamLibrary/SteamApps/workshop/content/108600/1355561500/mods/ExpirationFoodR/media/lua/shared/Translate/' directory in your file manager;
2. copy 'EN' directory and rename it according to your language (use Zomboid languages for reference at '/SteamLibrary/SteamApps/common/ProjectZomboid/media/lua/shared/Translate/');
3. translate strings in 'UI_EN.txt' and rename it to 'UI_(lang).txt', where '(lang)' is the same 2 capital letters you used in step 2;
4. use the translation yourself or upload it somewhere for me to add it for everyone.
Last edited by rez; Jun 30, 2018 @ 1:31am
Misha Jun 30, 2018 @ 4:15am 
Originally posted by rez:
Originally posted by Misha:
How to translate to another language? (add new)
1. open '/SteamLibrary/SteamApps/workshop/content/108600/1355561500/mods/ExpirationFoodR/media/lua/shared/Translate/' directory in your file manager;
2. copy 'EN' directory and rename it according to your language (use Zomboid languages for reference at '/SteamLibrary/SteamApps/common/ProjectZomboid/media/lua/shared/Translate/');
3. translate strings in 'UI_EN.txt' and rename it to 'UI_(lang).txt', where '(lang)' is the same 2 capital letters you used in step 2;
4. use the translation yourself or upload it somewhere for me to add it for everyone.
I found some text can't be translate.
1. "stale in"
2. "rotten in"

And it display seems not perfect in Asian languages.
rez  [developer] Jun 30, 2018 @ 7:36am 
Originally posted by Misha:
I found some text can't be translate.
1. "stale in"
2. "rotten in"

And it display seems not perfect in Asian languages.
Yes, these 2 parts are hardcoded in lua files. To fix this I need to move them to translation files and a translation for them in every language the mod has. I speak only English and Russian, so kinda hard for me, and I left it as it was in English. Apart from that, you should be able to translate everything else, or if you really want, you can replace those 2 strings in base lua file (just search for them). I just can't do that for everyone, sorry, because people speak different languages.

But I plan to push those 2 strings to translation files anyway some time after 39.x is stable to not aggravate people.
Misha Jun 30, 2018 @ 8:30am 
Originally posted by rez:
Originally posted by Misha:
I found some text can't be translate.
1. "stale in"
2. "rotten in"

And it display seems not perfect in Asian languages.
Yes, these 2 parts are hardcoded in lua files. To fix this I need to move them to translation files and a translation for them in every language the mod has. I speak only English and Russian, so kinda hard for me, and I left it as it was in English. Apart from that, you should be able to translate everything else, or if you really want, you can replace those 2 strings in base lua file (just search for them). I just can't do that for everyone, sorry, because people speak different languages.

But I plan to push those 2 strings to translation files anyway some time after 39.x is stable to not aggravate people.
How to move "UI_status_NOROTTEN" display in another line?

I need it looks like this:
UI_status_NOROTTEN = "<LINE> No Expiration Date"

Without this, the "UI_tooltip" will overlap with "UI_tooltip".

Or move it far away? It's up to you.


BTW, replace strings failure, it doesn't support UTF-8 or Unicode, seems like only English, so it can't be translated by replacing.
Last edited by Misha; Jun 30, 2018 @ 10:24am
rez  [developer] Jun 30, 2018 @ 11:59am 
Originally posted by Misha:
How to move "UI_status_NOROTTEN" display in another line?
For moving and reformatting see 'tooltip.lua':
-- this is non-perishable food m = string.format("%s", getText("UI_status_NOROTTEN"));
The "%s" is the part that is replaced, so you can insert anything before, like this:
-- this is non-perishable food m = string.format("<anything_you_want> %s", getText("UI_status_NOROTTEN"));
If all you need is a line break, you should be able to use '\n' in the string, as simple as that:
UI_status_NOROTTEN = "\n No Expiration Date"

Originally posted by Misha:
BTW, replace strings failure, it doesn't support UTF-8 or Unicode, seems like only English, so it can't be translated by replacing.
Well it supports it in native encoding instead of Unicode at the moment. Take a look at '/SteamLibrary/SteamApps/common/ProjectZomboid/media/lua/shared/Translate/', it contains files for the base game with the translation. Or you can send it to me and I will try to update the mod with your translation.
Misha Jun 30, 2018 @ 2:21pm 
Originally posted by rez:
Originally posted by Misha:
How to move "UI_status_NOROTTEN" display in another line?
For moving and reformatting see 'tooltip.lua':
-- this is non-perishable food m = string.format("%s", getText("UI_status_NOROTTEN"));
The "%s" is the part that is replaced, so you can insert anything before, like this:
-- this is non-perishable food m = string.format("<anything_you_want> %s", getText("UI_status_NOROTTEN"));
If all you need is a line break, you should be able to use '\n' in the string, as simple as that:
UI_status_NOROTTEN = "\n No Expiration Date"

Originally posted by Misha:
BTW, replace strings failure, it doesn't support UTF-8 or Unicode, seems like only English, so it can't be translated by replacing.
Well it supports it in native encoding instead of Unicode at the moment. Take a look at '/SteamLibrary/SteamApps/common/ProjectZomboid/media/lua/shared/Translate/', it contains files for the base game with the translation. Or you can send it to me and I will try to update the mod with your translation.
The interesting thing is the base game support UTF-8 translation. See Japanese or Chinese.

Here is the tooltip.lua file for Chinese.
https://pastebin.com/wJKtQgCz
Can you make the state text to align to right like the other status?


One more question, where the "UI_have_daysoff" use on?
Without this information, I can't translate accurately.
rez  [developer] Jun 30, 2018 @ 4:08pm 
Originally posted by Misha:
The interesting thing is the base game support UTF-8 translation. See Japanese or Chinese.
It does. Sometimes =) Several files use UTF-8, several — Big5, several — ANSI etc.
With PL and RU languages I had to select 'native' encoding and mark it as ANSI. The file in text editor looked wrong, but in-game it was correctly displayed. That basically means that it depends on string functions used, in case of this mod I'm mostly positive that selecting proper national encoding and then saving it as ANSI may do the trick for you.

Originally posted by Misha:
Here is the tooltip.lua file for Chinese.
https://pastebin.com/wJKtQgCz
Can you make the state text to align to right like the other status?
I've got the file, but could you please elaborate where the right align should be used? Because I don't remember having it anywhere in the mod... Could you make a picture of what you'd like to get?

Originally posted by Misha:
One more question, where the "UI_have_daysoff" use on?
Without this information, I can't translate accurately.
You can remove it as it is a legacy thing. I will remove it now from all the translations too, that will be pushed into next release, thank you for reporting this!
< >
Showing 1-15 of 26 comments
Per page: 1530 50