-
Notifications
You must be signed in to change notification settings - Fork 43
Localization
Hello! If you're looking to contribute translations to the project, you're in the right place. Thanks!
The original English text of the system is spread out between Foundry-localizable text (in en.json
) and in actors/items contained in compendia (example: starforged-moves.db
).
Much of the UI text is translated using Foundry's built-in system.
The original English text is located in en.json
, and other localizations are also located in that directory.
If you're looking to extend an existing translation, you can modify one of those files in place. If you've got a new language to introduce, there's a bit of code to modify; see #175 for an example of how that's accomplished.
Most of the text content of the game is in moves, oracles, and foes/encounters, which are packaged into compendiums, and Foundry's built-in localization system doesn't work with these. To translate these, we rely on Babele, which is a module that allows other modules to modify compendium content as it is loaded. An example of this is the ironsworn-es-es module, which when installed and activated, will replace the English text in the compendiums with Spanish. See the Babele project for information on how to create a module.
Here are some examples that show the data layout:
-
name
is the asset's title -
data.requirement
is a hint for when this asset comes into play -
data.abilties[].description
is the text of the asset's abilities -
data.fields[].name
is the label for the fillable fields (like Horse's "Name") -
data.track.name
is the name of the resource track (like Glowcat's "Health") -
data.exclusiveOptions[].name
is the text of the radio-select options (like Ironclad's "Lightly armored") -
data.conditions[].name
is the label for conditions (like Hoverbike's "Battered")
{
"_id": "2d3070fbde3039ac",
"name": "Ironclad",
"type": "asset",
"img": "icons/svg/item-bag.svg",
"data": {
"requirement": "<p>If you wear armor...</p>\n",
"category": "Combat Talent",
"color": "",
"fields": [],
"abilities": [
{
"enabled": true,
"description": "<p>When you equip or adjust your armor, choose one.</p>\n<ul>\n<li>Lightly armored: When you @Compendium[foundry-ironsworn.ironswornmoves.fdb51ee928b4fca2]{Endure Harm} in a fight, add +1 and take +1 momentum on a hit.</li>\n<li>Geared for war: Mark encumbered. When you @Compendium[foundry-ironsworn.ironswornmoves.fdb51ee928b4fca2]{Endure Harm} in a fight, add +2 and take +1 momentum on a hit.</li>\n</ul>\n"
},
{
"enabled": false,
"description": "<p>When you @Compendium[foundry-ironsworn.ironswornmoves.7e008d0f656dc8b3]{Clash} while you are geared for war, add +1.</p>\n"
},
{
"enabled": false,
"description": "<p>When you @Compendium[foundry-ironsworn.ironswornmoves.be95ca063ded2b19]{Compel} in a situation where strength of arms is a factor, add +2.</p>\n"
}
],
"track": { "enabled": false, "name": "Health", "current": 0, "max": 0 },
"exclusiveOptions": [
{ "name": "Lightly armored", "selected": false },
{ "name": "Geared for war", "selected": false }
],
"conditions": []
},
"effects": [],
"folder": null,
"sort": 0,
"permission": { "default": 0, "gXcI9ebHCY1jasJg": 3 },
"flags": {}
}
-
data.Display.Title
is used in the move-sheet sidebar as the name of the move (you've discovered that you can also remapname
to get the same effect) -
data.Text
is the full description of the move, shown when you expand it in the move sheet. Markdown is supported here. -
data.Trigger.Text
is shown in the preroll dialog -
data.Trigger.Options[].Text
is used for the bullet points in the preroll dialog -
data.Outcomes.*.Text
are used in the chat-message output of a resolved roll
{
"_id": "e6ed148eff82c171",
"name": "Face Danger",
"type": "sfmove",
"img": "icons/dice/d10black.svg",
"data": {
"dfid": "Starforged/Moves/Adventure/Face_Danger",
"Category": "Starforged/Moves/Adventure",
"Progress Move": false,
"Variant of": "",
"Text": "**When you attempt something risky or react to an imminent threat**, envision your action and roll. If you act...\n\n * With speed, mobility, or agility: Roll +edge\n * With resolve, command, or sociability: Roll +heart\n * With strength, endurance, or aggression: Roll +iron\n * With deception, stealth, or trickery: Roll +shadow\n * With expertise, focus, or observation: Roll +wits\n\nOn a **strong hit**, you are successful. Take +1 momentum.\n\nOn a **weak hit**, you succeed, but not without a cost. Make a suffer move (-1).\n\nOn a **miss**, you fail, or a momentary success is undermined by a dire turn of events. @Compendium[foundry-ironsworn.starforgedmoves.78baa51694fe37c5]{Pay the Price}.",
"Trigger": {
"Text": "When you attempt something risky or react to an imminent threat...",
"Options": [
{
"dfid": "Starforged/Moves/Adventure/Face_Danger/Trigger/Options/1",
"Text": "With speed, mobility, or agility",
"Roll type": "Action roll",
"Method": "Any",
"Using": ["Edge"]
},
// ...
],
"dfid": "Starforged/Moves/Adventure/Face_Danger/Trigger"
},
"Outcomes": {
"Strong Hit": {
"Text": "You are successful. Take +1 momentum.",
"dfid": "Starforged/Moves/Adventure/Face_Danger/Outcomes/Strong_Hit"
},
"Weak Hit": {
"Text": "You succeed, but not without a cost. Make a suffer move (-1).",
"dfid": "Starforged/Moves/Adventure/Face_Danger/Outcomes/Weak_Hit"
},
"Miss": {
"Text": "You fail, or a momentary success is undermined by a dire turn of events. @Compendium[foundry-ironsworn.starforgedmoves.78baa51694fe37c5]{Pay the Price}.",
"dfid": "Starforged/Moves/Adventure/Face_Danger/Outcomes/Miss"
},
"dfid": "Starforged/Moves/Adventure/Face_Danger/Outcomes"
},
"Oracles": [],
"Source": {
"Title": "Ironsworn: Starforged Rulebook",
"Authors": ["Shawn Tomkin"],
"Date": "050622",
"Page": 147
},
"Suggestions": {},
"Name": "Face Danger",
"Optional": false,
"Display": { "Title": "Face Danger", "Color": "#3C70A4" }
},
"effects": [],
"folder": null,
"sort": 0,
"permission": { "default": 0, "gXcI9ebHCY1jasJg": 3 },
"flags": {}
}
-
name
is the display name in the oracle tree -
description
is shown in the expanded preview in the oracle tree -
results[].text
is the text of the result, shown in the preview and the result chat message
{
"_id": "eb992ccf692d8592",
"name": "Background Assets",
"img": "icons/dice/d10black.svg",
"description": "If you want some direction for your starting paths, roll or pick from the table below and take the two paths associated with your selected background.",
"results": [
{
"_id": "7a9ce91fdedd34c5",
"range": [1, 5],
"text": "Battlefield Medic (HEALER; VETERAN)",
"type": 0,
"drawn": false,
"flags": {}
},
// ...
],
"formula": "d100",
"replacement": true,
"displayRoll": true,
"folder": null,
"sort": 0,
"permission": { "default": 0, "gXcI9ebHCY1jasJg": 3 },
"flags": {
"dfId": "Starforged/Oracles/Character_Creation/Background_Assets",
"category": "Starforged/Oracles/Character_Creation"
}
}
-
name
is shown in the compendium browser -
data.description
is the HTML of the body text of the foe
{
"_id": "09186bbb3dfdec3c",
"name": "Worldbreaker",
"type": "progress",
"img": "icons/creatures/abilities/mouth-teeth-rows-white.webp",
"data": {
"description": "\n\n<div class=\"boxgroup flexrow boxrow\" style=\"margin-bottom: 0.5rem;\">\n <div class=\"flexcol box\" style=\"justify-content: flex-start;\">\n <h4 class=\"nogrow\" style=\"margin: 0.5em;\">Features</h4>\n <p class=\"nogrow\">Titanic worm-like creatures</p>\n <p class=\"nogrow\">Gaping maw with rotating, earth-grinding teeth</p>\n <p class=\"nogrow\">Thunderous cry</p>\n </div>\n <div class=\"flexcol box\" style=\"justify-content: flex-start;\">\n <h4 class=\"nogrow\" style=\"margin: 0.5em;\">Drives</h4>\n <p class=\"nogrow\">Lurk within carved depths</p>\n <p class=\"nogrow\">Shape the landscape</p>\n <p class=\"nogrow\">Endlessly pursue prey</p>\n </div>\n <div class=\"flexcol box\" style=\"justify-content: flex-start;\">\n <h4 class=\"nogrow\" style=\"margin: 0.5em;\">Tactics</h4>\n <p class=\"nogrow\">Detect prey through vibrations</p>\n <p class=\"nogrow\">Shatter stone and steel</p>\n </div>\n</div>\n\n<p>The scale and strength of the worldbreakers is so beyond our reckoning that some consider them godlike beings. Capable of thriving on verdant jungle worlds, frozen planets, worlds scorched by volcanic activity, and even within barren asteroids in the vacuum of space, these worms possess a wisdom and a cunning that makes them a deadly threat for even the most competent spacer.</p>\n<p>Worldbreakers range in size from about the size of a cargo hauler to an unfathomable scale that dwarfs our largest starship. They bore tunnels to pursue their prey, and hibernate in those dark depths to conserve energy. Though blind, worldbreaker worms can detect even the subtlest of footfalls, and they follow these vibrations to eventually consume their quarry—along with any other creatures, starships, or structures that happen to be nearby.</p>\n\n\n<blockquote>Quest Starter: <p>On a lush world at the edge of the Terminus, a titanic worldbreaker worm holds sway. One faction seeks to destroy the worm so that the riches of this place can be harvested. Another swears to protect it. On which side do you fall?</p>\n</blockquote>\n\n<h2>Variants</h2>\n<ul>\n <li>@Compendium[foundry-ironsworn.starforgedencounters.94f8f295090cb8df]{Worldbreaker Brood}</li>\n <li>@Compendium[foundry-ironsworn.starforgedencounters.dbf123295e6b89bf]{Elder Worm}</li>\n</ul>\n\n",
"rank": "extreme",
"current": 0,
"completed": false,
"subtype": "progress",
"starred": false,
"hasTrack": true,
"hasClock": false,
"clockTicks": 0,
"clockMax": 6
},
"effects": [],
"folder": null,
"sort": 0,
"permission": { "default": 0, "gXcI9ebHCY1jasJg": 3 },
"flags": {}
}