Coding Help Trouble translating a mod using i18n tokens

hikary02

Newcomer
I have no idea how to code, but I really want to translate some mods. I'm translating this mod; I created the `i18n` folder with `default` and `es`, and I also added the keys to `content`. Somehow, I just can't get the Spanish translation to work. I don't know what's wrong, I'm using Claude for helping myself

Code:
{
   "Format": "2.1.0",
   "ConfigSchema": {
      "Harvey Flower Dance Edit": {
         "AllowValues": "true, false",
         "Default": "true",
         "Description": "Changes the 'I'm working up the courage to ask someone to dance with me.' line"
      },
      "Harvey Luau Edit": {
         "AllowValues": "true, false",
         "Default": "true",
         "Description": "Changes the 'I wonder if Maru could use some sunscreen on her shoulders?' line"
      },
      "Maru Luau Edit": {
         "AllowValues": "true, false",
         "Default": "true",
         "Description": "Changes the 'Harvey keeps trying to talk to me.' line"
      },
      "Maru Harvey Not Her Type Edit": {
         "AllowValues": "true, false",
         "Default": "true",
         "Description": "Changes the 'Dr. Harvey? He's nice, but not really my type...' line"
      },
      "Penny mentions Maru X Harvey Edit": {
         "AllowValues": "true, false",
         "Default": "true",
         "Description": "I wonder if Maru and Dr. Harvey will ever get together' line"
      }
   },
   "Changes": [
      {
         "Action": "EditData",
         "Target": "Data/Festivals/spring24",
         "Entries": {
            "Harvey": "{{i18n:harvey.flowerdance.spring24}}"
         },
         "When": {
            "Harvey Flower Dance Edit": true
         }
      },
      {
         "Action": "EditData",
         "Target": "characters/dialogue/Harvey",
         "Entries": {
            "FlowerDance_Decline": "{{i18n:harvey.flowerdance.decline}}"
         },
         "When": {
            "Harvey Flower Dance Edit": true
         }
      },
      {
         "Action": "EditData",
         "Target": "Data/Festivals/summer11",
         "Entries": {
            "Harvey": "{{i18n:harvey.luau.summer11}}"
         },
         "When": {
            "Harvey Luau Edit": true
         }
      },
      {
         "Action": "EditData",
         "Target": "characters/dialogue/Maru",
         "Entries": {
            "Wed8": "{{i18n:maru.notmytype.wed8}}"
         },
         "When": {
            "Maru Harvey Not Her Type Edit": true
         }
      },
      {
         "Action": "EditData",
         "Target": "Data/Festivals/summer11",
         "Entries": {
            "Maru_Spouse": "{{i18n:maru.luau.summer11.spouse}}"
         },
         "When": {
            "Maru Luau Edit": true
         }
      },
      {
         "Action": "EditData",
         "Target": "characters/dialogue/MarriageDialoguePenny",
         "Entries": {
            "Rainy_Day_1": "{{i18n:penny.mentions.rainyday1}}"
         },
         "When": {
            "Penny mentions Maru X Harvey Edit": true
         }
      }
   ]
}
Code:
{
    "harvey.flowerdance.spring24": "Es tradición del festival contar siempre con algunos grupos de bailarines. #$b# A veces, Maru y yo nos ofrecemos voluntarios si Lewis nos lo pide, aunque, para ser sincero, no soy muy bueno bailando.$s",
    "harvey.flowerdance.decline": "¡Oh! Lo siento... Yo, eh... preferiría no hacerlo...$s",

    "harvey.luau.summer11": "Asegúrate de ponerte protector solar; hoy hace calor.",
    "maru.luau.summer11.spouse": "Harvey sigue intentando hablar del trabajo, pero creo que hoy es un buen día para que simplemente nos relajemos.",

    "maru.notmytype.wed8": "Me alegra tener trabajo en la clínica... Harvey fue muy amable al ofrecérmelo.$h",

    "penny.mentions.rainyday1": "Me pregunto cómo le va a Maru trabajando con el Dr. Harvey en la clínica. #$b# ¡Espero que se esté divirtiendo!$h"
}
 

Lenora Rose

Farmer
Despite you using Claude, I don't instantly recognize any errors in your code. It looks like a match to the original mod (which I actually have on one farmer) except for adding in an i18n token.

How do you choose the game language?
 

hikary02

Newcomer
Despite you using Claude, I don't instantly recognize any errors in your code. It looks like a match to the original mod (which I actually have on one farmer) except for adding in an i18n token.

How do you choose the game language?
I just change the language in settings and reload translations with the SMAPI console
 

veronicaab

Farmhand
A couple questions:

1. Do you have the original mod installed? If so, it might be overriding what you have
2. What do you mean when you say it doesn't work? Are there errors in the SMAPI log? Does it display the vanilla dialog? Does it display the modded dialog but in English? Something else?
 

hikary02

Newcomer
A couple questions:

1. Do you have the original mod installed? If so, it might be overriding what you have
2. What do you mean when you say it doesn't work? Are there errors in the SMAPI log? Does it display the vanilla dialog? Does it display the modded dialog but in English? Something else?
1. Nope
2. No erros in the log, it displays the modded dialog in English

I'll attach everything I have done so you can check if necessary
 

Attachments

Top