Coding Help Translating Bundles file

Dnksh

Farmhand
Hello, so I'm author of Polish translation, and when I translate bundles file (Not bundlenames) and start a new game, golden scrolls are causing weird bug that causes player to slide on floor without any animation and freezes camera, can't get out either. It was working fine before 7th of september. I translated these files by just adding / at the end and then translating, but now it's just named after last number of the code line. Can anyone please help, or explain to me how to fix this?
 
Well, without seeing any mod data you have, a smapi log, or screenshots. It's a little hard to tell for sure.
But, SMAPI does currently have an issue with Bundles being improperly translated in non-English languages right now.
See here: https://github.com/Pathoschild/SMAPI/issues/805

If you'd like to post your bundle translation mod; I can test on my side as well. Just so we can confirm it's not a typo, or something else.
 

Dnksh

Farmhand
Well, without seeing any mod data you have, a smapi log, or screenshots. It's a little hard to tell for sure.
But, SMAPI does currently have an issue with Bundles being improperly translated in non-English languages right now.
See here: https://github.com/Pathoschild/SMAPI/issues/805

If you'd like to post your bundle translation mod; I can test on my side as well. Just so we can confirm it's not a typo, or something else.
I can't send it here because it's too big, so I'm sending a link to mega.nz:
Here's log:
https://smapi.io/log/3172904f25934d7da67893a329fc752e
sorry
 
I can't send it here because it's too big, so I'm sending a link to mega.nz:
Here's log:
https://smapi.io/log/3172904f25934d7da67893a329fc752e
sorry
Thanks, I tried your mod out. But, it works perfectly for me.
I don't speak Polish, but I can tell the text is loading correctly. And, I'm not seeing any errors related to the golden scroll bundles on a new save.

However, the link for your log says it couldn't read the file you uploaded. Can you try again? Or zip it up, and post it here.

------------------------------
Secondly, I noticed there's some code for the Android version in your mod. Are you by any chance playing on an older version of SDV?
I'm playing on a Linux PC with SDV version 1.5.4 using SMAPI 3.12.8.


I do remember a similar old bug here: https://forums.stardewvalley.net/threads/bug-community-bundles-still-crashing.3120/
And, my post here describing the issue back then with SMAPI: https://forums.stardewvalley.net/threads/bug-community-bundles-still-crashing.3120/post-21860

Where SDV, & later SMAPI as well were creating some broken saves. I'm wondering if perhaps it might be a similar issue with your saves.
I'll upload the copy I'm using if you want to give it a try. Can you also upload your save that's bugging out?
Save location: https://stardewvalleywiki.com/Saves#Find_your_save_files
 

Attachments

Dnksh

Farmhand
Thanks, I tried your mod out. But, it works perfectly for me.
I don't speak Polish, but I can tell the text is loading correctly. And, I'm not seeing any errors related to the golden scroll bundles on a new save.

However, the link for your log says it couldn't read the file you uploaded. Can you try again? Or zip it up, and post it here.

------------------------------
Secondly, I noticed there's some code for the Android version in your mod. Are you by any chance playing on an older version of SDV?
I'm playing on a Linux PC with SDV version 1.5.4 using SMAPI 3.12.8.


I do remember a similar old bug here: https://forums.stardewvalley.net/threads/bug-community-bundles-still-crashing.3120/
And, my post here describing the issue back then with SMAPI: https://forums.stardewvalley.net/threads/bug-community-bundles-still-crashing.3120/post-21860

Where SDV, & later SMAPI as well were creating some broken saves. I'm wondering if perhaps it might be a similar issue with your saves.
I'll upload the copy I'm using if you want to give it a try. Can you also upload your save that's bugging out?
Save location: https://stardewvalleywiki.com/Saves#Find_your_save_files
For me every new save is causing this problem whenever bundles are translated, here's my save that is crashing. I'm playing on windows version of the game is 1.5.4, so no older version. It was fine before, but after some time this bug started to occur. I even tried to change "lastAppliedSaveFix" to 30 but it is still crashing.
 

Attachments

Last edited:
For me every new save is causing this problem whenever bundles are translated, here's my save that is crashing. I'm playing on windows version of the game is 1.5.4, so no older version. It was fine before, but after some time this bug started to occur. I even tried to change "lastAppliedSaveFix" to 30 but it is still crashing.
Thanks, I took a look. And, it's same core issue as the thread I linked above. But, it must've somehow been reintroduced into SMAPI(assuming you're also on the latest SMAPI).

In your save; I see this:

Bundle snippet from broken save:
Code:
<bundleData>
    <item>
      <key>
        <string>Pantry/0</string>
      </key>
      <value>
        <string>Spring Crops/O 465 20/24 1 0 188 1 0 190 1 0 192 1 0/0/Wiosennych Upraw</string>
      </value>
    </item>
Notice your translation at the end of the line.
It should look like this with no translation appended to the savefile:

Bundle snippet from working save:
Code:
  <bundleData>
    <item>
      <key>
        <string>Pantry/0</string>
      </key>
      <value>
        <string>Spring Crops/O 465 20/24 1 0 188 1 0 190 1 0 192 1 0/0</string>
      </value>
    </item>
-----------------------

It seems that if you start SMAPI in Portuguese; which your mod overrides, and start a new save. It will be corrupted as shown above.
But, if you start SMAPI with any other un-modded language & create a save; it'll give you a working save. As I tested this out in English & Spanish.
I'm guessing SMAPI isn't interpreting the mod data appropriately again.

This fixed save should work; or you can try starting SMAPI in a another language & creating a save then retrying your mod.
-----------------------
Just to verify though; which version of SMAPI are you on, and can you upload a logfile per my previous comment?
The latest for SDV v1.5.4 is SMAPI "3.12.8"; found here: https://smapi.io/

So we can report this to the SMAPI bugtracker, & get it resolved: https://github.com/Pathoschild/SMAPI/issues
 

Attachments

Dnksh

Farmhand
Thanks, I took a look. And, it's same core issue as the thread I linked above. But, it must've somehow been reintroduced into SMAPI(assuming you're also on the latest SMAPI).

In your save; I see this:

Bundle snippet from broken save:
Code:
<bundleData>
    <item>
      <key>
        <string>Pantry/0</string>
      </key>
      <value>
        <string>Spring Crops/O 465 20/24 1 0 188 1 0 190 1 0 192 1 0/0/Wiosennych Upraw</string>
      </value>
    </item>
Notice your translation at the end of the line.
It should look like this with no translation appended to the savefile:

Bundle snippet from working save:
Code:
  <bundleData>
    <item>
      <key>
        <string>Pantry/0</string>
      </key>
      <value>
        <string>Spring Crops/O 465 20/24 1 0 188 1 0 190 1 0 192 1 0/0</string>
      </value>
    </item>
-----------------------

It seems that if you start SMAPI in Portuguese; which your mod overrides, and start a new save. It will be corrupted as shown above.
But, if you start SMAPI with any other un-modded language & create a save; it'll give you a working save. As I tested this out in English & Spanish.
I'm guessing SMAPI isn't interpreting the mod data appropriately again.

This fixed save should work; or you can try starting SMAPI in a another language & creating a save then retrying your mod.
-----------------------
Just to verify though; which version of SMAPI are you on, and can you upload a logfile per my previous comment?
The latest for SDV v1.5.4 is SMAPI "3.12.8"; found here: https://smapi.io/

So we can report this to the SMAPI bugtracker, & get it resolved: https://github.com/Pathoschild/SMAPI/issues
I Use the most recent version of smapi, even tried install newest version once more.
Here's my newest log:

 
I Use the most recent version of smapi, even tried install newest version once more.
Here's my newest log:

Perfect, thanks!
Yea, it seems to be SMAPI itself, and not your translation mod, or any others interfering with anything.

You could try opting into the SDV Beta: https://forums.stardewvalley.net/threads/stardew-valley-1-5-5-technical-update-beta.8893/
And, then downloading the SMAPI 3.13 beta.
I haven't tried modding that yet; so I'm unsure if there's any fixes for language issues with bundles.

But, if not; the workarounds, and save from my previous comment should work for you.
 

Dnksh

Farmhand
Perfect, thanks!
Yea, it seems to be SMAPI itself, and not your translation mod, or any others interfering with anything.

You could try opting into the SDV Beta: https://forums.stardewvalley.net/threads/stardew-valley-1-5-5-technical-update-beta.8893/
And, then downloading the SMAPI 3.13 beta.
I haven't tried modding that yet; so I'm unsure if there's any fixes for language issues with bundles.

But, if not; the workarounds, and save from my previous comment should work for you.
Alright, I'll try it on 1.5.5 version. Thanks for your help and sorry for wasting your time, I really apricieate your help. Guess i'll need to wait for a fix, well that's a relief.
 
Alright, I'll try it on 1.5.5 version. Thanks for your help and sorry for wasting your time, I really apricieate your help. Guess i'll need to wait for a fix, well that's a relief.
Glad I could help you test things out, and get to the core of the issue!
And, it was not a waste of time. We managed to find a bug, and that''ll help it get fixed for everyone going forward. ^-^

For now, I created a bug report here linking to this thread, and the information you provided to me: https://github.com/Pathoschild/SMAPI/issues/812
 
Just a second follow up, on a new post since it's a bit detailed.

Pathoschild commented on the issue I created; explaining why it happens, and his plans for it.
You can read up on it in over there.


There's another temporary workaround though.
1 .
Edit your "content.json" file.
2. Replace lines 43-49 of the mod you sent to me; with the following code.

Code:
       // Polish Bundle translation - workaround until SMAPI is fixed: https://github.com/Pathoschild/SMAPI/issues/812
       // Moved "Data/Bundles" into its own section.
        {
            "LogName": "Various Data",
            "Action": "Load",
            "Target": "Data/Achievements, Data/BigCraftablesInformation, Data/Blueprints, Data/Boots, Data/ClothingInformation, Data/Concessions, Data/CookingRecipes, Data/CraftingRecipes, Data/EngagementDialogue, Data/ExtraDialogue, Data/FarmAnimals, Data/Fish, Data/Furniture, Data/hats, Data/mail, Data/Monsters, Data/Movies, Data/MoviesReactions, Data/NPCDispositions, Data/NPCGiftTastes, Data/ObjectInformation, Data/Quests, Data/SecretNotes, Data/weapons",
            "FromFile": "assets/{{Target}}.json",
            "When": { "Language": "pt" }
        },

        {
            "LogName": "Various Data",
            "Action": "Load",
            "Target": "Data/Bundles",
            "FromFile": "assets/{{Target}}.json",
            "When": { "Language": "pt",
            "HasFlag": "canReadJunimoText" }
        },
3.
If you've changed the mod since then. Basically, we're just removing "Data/Bundles" from the initial list of targets; and moving it to its own section.
We need to do this to delay loading the bundle translations until after the savefile is created. To prevent the corruption we saw in your save.
For this, we use the "canReadJunimoText" flag.

4.
I tested on my end, and it works pretty well. Any new saves you start will work going forward.
Only minor issue I found; is that after the Wizard teaches you to read the scrolls. You should save the game, and then reload the save. As it seems to temporarily default to using the Portuguese translations. But, after reloading the save; it brings up your Polish translations.

--------------

Anyway, hope that helps as a somewhat better workaround. So you can continue your modding.
 

Dnksh

Farmhand
Just a second follow up, on a new post since it's a bit detailed.

Pathoschild commented on the issue I created; explaining why it happens, and his plans for it.
You can read up on it in over there.


There's another temporary workaround though.
1 .
Edit your "content.json" file.
2. Replace lines 43-49 of the mod you sent to me; with the following code.

Code:
       // Polish Bundle translation - workaround until SMAPI is fixed: https://github.com/Pathoschild/SMAPI/issues/812
       // Moved "Data/Bundles" into its own section.
        {
            "LogName": "Various Data",
            "Action": "Load",
            "Target": "Data/Achievements, Data/BigCraftablesInformation, Data/Blueprints, Data/Boots, Data/ClothingInformation, Data/Concessions, Data/CookingRecipes, Data/CraftingRecipes, Data/EngagementDialogue, Data/ExtraDialogue, Data/FarmAnimals, Data/Fish, Data/Furniture, Data/hats, Data/mail, Data/Monsters, Data/Movies, Data/MoviesReactions, Data/NPCDispositions, Data/NPCGiftTastes, Data/ObjectInformation, Data/Quests, Data/SecretNotes, Data/weapons",
            "FromFile": "assets/{{Target}}.json",
            "When": { "Language": "pt" }
        },

        {
            "LogName": "Various Data",
            "Action": "Load",
            "Target": "Data/Bundles",
            "FromFile": "assets/{{Target}}.json",
            "When": { "Language": "pt",
            "HasFlag": "canReadJunimoText" }
        },
3.
If you've changed the mod since then. Basically, we're just removing "Data/Bundles" from the initial list of targets; and moving it to its own section.
We need to do this to delay loading the bundle translations until after the savefile is created. To prevent the corruption we saw in your save.
For this, we use the "canReadJunimoText" flag.

4.
I tested on my end, and it works pretty well. Any new saves you start will work going forward.
Only minor issue I found; is that after the Wizard teaches you to read the scrolls. You should save the game, and then reload the save. As it seems to temporarily default to using the Portuguese translations. But, after reloading the save; it brings up your Polish translations.

--------------

Anyway, hope that helps as a somewhat better workaround. So you can continue your modding.
Now it works! Thank you, and Pathoschild for help! I think that I'll upload this fix now, but my translation has something with going to menu that whenever i do that, some of the texts are in Portuguese, So I'll tell people to restart game. Thanks again for your help!
 
Top