-
Notifications
You must be signed in to change notification settings - Fork 47
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.
Four tour content, this goes through a bit more of a pipeline; manual input should go into a YAML file (which supports Markdown syntax), and is then pulled into the Foundry JSON files by running tour-i18n.js.
Take a look at welcome-tour.yml to see how that's done.
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:
Assets (source)
-
nameis the asset's title -
system.requirementis a hint for when this asset comes into play -
system.abilties[].descriptionis the text of the asset's abilities -
system.fields[].nameis the label for the fillable fields (like Horse's "Name") -
system.track.nameis the name of the resource track (like Glowcat's "Health") -
system.exclusiveOptions[].nameis the text of the radio-select options (like Ironclad's "Lightly armored") -
system.conditions[].nameis the label for conditions (like Hoverbike's "Battered")
{
"type": "asset",
"_id": "2d3070fbde3039ac",
"folder": "18b30f608501bf56",
"name": "Ironclad",
"system": {
"requirement": "<p>If you wear armor…</p>",
"category": "Combat Talent",
"color": null,
"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>",
"hasClock": false,
"clockTicks": 0,
"clockMax": 4
},
{
"enabled": false,
"description": "<p>When you @Compendium[foundry-ironsworn.ironswornmoves.7e008d0f656dc8b3]{Clash} while you are geared for war, add +1.</p>",
"hasClock": false,
"clockTicks": 0,
"clockMax": 4
},
{
"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>",
"hasClock": false,
"clockTicks": 0,
"clockMax": 4
}
],
"track": {
"enabled": false,
"name": "Health",
"current": 0,
"max": 5,
"value": 5,
"min": 0
},
"exclusiveOptions": [
{
"name": "Geared for War",
"selected": false
},
{
"name": "Lightly Armored",
"selected": false
}
],
"conditions": [],
"description": ""
},
"img": "icons/svg/item-bag.svg",
"effects": [],
"sort": 0,
"ownership": {
"default": 0
},
"flags": {
"foundry-ironsworn": {
"dfid": "Ironsworn/Assets/Combat_Talent/Ironclad",
"dsid": "asset:classic/combat_talent/ironclad"
}
},
"_stats": {
"systemId": "foundry-ironsworn"
},
"_key": "!items!2d3070fbde3039ac"
}Moves (source)
-
system.Display.Titleis used in the move-sheet sidebar as the name of the move (you've discovered that you can also remapnameto get the same effect) -
system.Textis the full description of the move, shown when you expand it in the move sheet. Markdown is supported here. -
system.Trigger.Textis shown in the preroll dialog -
system.Trigger.Options[].Textis used for the bullet points in the preroll dialog -
system.Outcomes.*.Textare used in the chat-message output of a resolved roll
{
"_id": "c8bacc17f73d3103",
"type": "sfmove",
"name": "Face Danger",
"img": "icons/dice/d10black.svg",
"folder": "30f9b4039e23c0c9",
"system": {
"dfid": "Ironsworn/Moves/Adventure/Face_Danger",
"Category": "Ironsworn/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, agility, or precision: Roll +edge.\n * With charm, loyalty, or courage: Roll +heart.\n * With aggressive action, forceful defense, strength, or endurance: Roll +iron.\n * With deception, stealth, or trickery: Roll +shadow.\n * With expertise, insight, or observation: Roll +wits.\n\nOn a __strong hit__, you are successful. Take +1 momentum.\n\nOn a __weak hit__, you succeed, but face a troublesome cost. Choose one.\n\n * You are delayed, lose advantage, or face a new danger: Suffer -1 momentum.\n * You are tired or hurt: @Compendium[foundry-ironsworn.ironswornmoves.fdb51ee928b4fca2]{Endure Harm} (1 harm).\n * You are dispirited or afraid: @Compendium[foundry-ironsworn.ironswornmoves.e09e2fc8bb709320]{Endure Stress} (1 stress).\n * You sacrifice resources: Suffer -1 supply.\n\nOn a __miss__, you fail, or your progress is undermined by a dramatic and costly turn of events. @Compendium[foundry-ironsworn.ironswornmoves.c10d64f58dd8c5bf]{Pay the Price}.",
"Trigger": {
"Text": "When you attempt something risky or react to an imminent threat...",
"Options": [
{
"Text": "With speed, agility, or precision",
"Roll type": "Action roll",
"Method": "Any",
"Using": [
"Edge"
]
},
{
"Text": "With charm, loyalty, or courage",
"Roll type": "Action roll",
"Method": "Any",
"Using": [
"Heart"
]
},
{
"Text": "With aggressive action, forceful defense, strength, or endurance",
"Roll type": "Action roll",
"Method": "Any",
"Using": [
"Iron"
]
},
{
"Text": "With deception, stealth, or trickery",
"Roll type": "Action roll",
"Method": "Any",
"Using": [
"Shadow"
]
},
{
"Text": "With expertise, insight, or observation",
"Roll type": "Action roll",
"Method": "Any",
"Using": [
"Wits"
]
}
]
},
"Outcomes": {
"Strong Hit": {
"Text": "On a __strong hit__, you are successful. Take +1 momentum.",
"With a Match": {
"Text": ""
}
},
"Weak Hit": {
"Text": "On a __weak hit__, you succeed, but face a troublesome cost. Choose one.\n\n * You are delayed, lose advantage, or face a new danger: Suffer -1 momentum.\n * You are tired or hurt: @Compendium[foundry-ironsworn.ironswornmoves.fdb51ee928b4fca2]{Endure Harm} (1 harm).\n * You are dispirited or afraid: @Compendium[foundry-ironsworn.ironswornmoves.e09e2fc8bb709320]{Endure Stress} (1 stress).\n * You sacrifice resources: Suffer -1 supply."
},
"Miss": {
"Text": "On a __miss__, you fail, or your progress is undermined by a dramatic and costly turn of events. @Compendium[foundry-ironsworn.ironswornmoves.c10d64f58dd8c5bf]{Pay the Price}.",
"With a Match": {
"Text": ""
}
}
},
"Oracles": [],
"dsOracleIds": [],
"Source": {
"Title": "Ironsworn Rulebook",
"Authors": [
"Shawn Tomkin"
],
"Date": "2019-06-05",
"Page": 60
},
"Suggestions": {}
},
"sort": 60,
"flags": {
"foundry-ironsworn": {
"dfid": "Ironsworn/Moves/Adventure/Face_Danger",
"dsid": "move:classic/adventure/face_danger"
}
},
"_key": "!items!c8bacc17f73d3103"
}Oracles (source)
-
nameis the display name in the oracle tree -
descriptionis shown in the expanded preview in the oracle tree -
results[].textis the text of the result, shown in the preview and the result chat message
{
"_id": "cb521e4b4d1c2d15",
"flags": {
"foundry-ironsworn": {
"dfid": "Ironsworn/Oracles/Action_and_Theme/Action",
"category": "Ironsworn/Oracles/Action_and_Theme",
"dsid": "oracle_rollable:classic/action_and_theme/action"
}
},
"name": "Action",
"description": "<p>Use this table to inspire a discovery, event, character goal, or situation. A roll on this table can be combined with a @Compendium[foundry-ironsworn.ironswornoracles.3c1a7f81062a8a8a]{Theme} to provide an action and a subject. Then, interpret the result based on the context of the question and your current situation.</p>",
"formula": "1d100",
"replacement": true,
"displayRoll": true,
"results": [
{
"range": [
1,
1
],
"text": "Scheme",
"_key": "!tables.results!cb521e4b4d1c2d15.4dba40a960d0c11b",
"_id": "4dba40a960d0c11b"
},
// ...
],
"folder": "a06b333b78c61e6e",
"sort": 174,
"img": "icons/dice/d10black.svg",
"_key": "!tables!cb521e4b4d1c2d15"
}Encounter/Foe (foes and encounters)
-
nameis shown in the compendium browser -
system.descriptionis the HTML of the body text of the foe
{
"_id": "09186bbb3dfdec3c",
"type": "progress",
"name": "Worldbreaker",
"img": "icons/creatures/abilities/mouth-teeth-rows-white.webp",
"system": {
"description": "<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<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></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>",
"rank": 4,
"current": 0,
"completed": false,
"subtype": "progress",
"starred": false,
"hasTrack": true,
"hasClock": false,
"clockTicks": 0,
"clockMax": 4
},
"effects": [],
"folder": "9a33d248aee84d89",
"sort": 0,
"flags": {
"foundry-ironsworn": {
"dsid": "npc:starforged/sample_npcs/worldbreaker"
}
},
"_key": "!items!09186bbb3dfdec3c"
}Setting Truths (source)
These are custom-type Journal Entry Pages with structured data.
Look for pages of type truth, and look at the text therein:
{
"name": "Artificial Intelligence",
"flags": {
"foundry-ironsworn": {
"dfid": "Starforged/Setting_Truths/Artificial_Intelligence",
"dsid": "truth:starforged/artificial_intelligence"
}
},
"_id": "d16a5066293b8501",
"pages": [
{
"type": "truth",
"name": "We no longer have access to advanced computer systems. Instead, we must rely on the seers we call Adepts.",
"system": {
"Subtable": [
{
"Floor": 1,
"Ceiling": 33,
"Result": "The energies of the Forge corrupt advanced systems"
},
{
"Floor": 34,
"Ceiling": 67,
"Result": "AI was outlawed in the aftermath of the machine wars"
},
{
"Floor": 68,
"Ceiling": 100,
"Result": "We have lost the knowledge to create and maintain AI"
}
],
"dsid": "truth.option:starforged/artificial_intelligence.0",
"Floor": 1,
"Ceiling": 33,
"Result": "We no longer have access to advanced computer systems. Instead, we must rely on the seers we call Adepts.",
"Description": "Our computers are limited to simple digital systems and the most basic machine intelligence. This is because:\n\n(roll below)\n\nThe Adepts serve in place of those advanced systems. They utilize mind-altering drugs to see the universe as a dazzling lattice of data, identifying trends and predicting outcomes with uncanny accuracy. But to gain this insight they sacrifice much of themselves.",
"Summary": "We no longer have access to advanced computer systems. Instead, we must rely on the seers we call Adepts.",
"Quest": "An Adept is tormented by a dire future they have seen for the inhabitants of the Forge. What does this vision show?",
"Roll template": {
"Description": "Our computers are limited to simple digital systems and the most basic machine intelligence. This is because:\n\n{{table>truth.option.oracle_rollable:starforged/artificial_intelligence.0.computer_limitation}}\n\nThe Adepts serve in place of those advanced systems. They utilize mind-altering drugs to see the universe as a dazzling lattice of data, identifying trends and predicting outcomes with uncanny accuracy. But to gain this insight they sacrifice much of themselves."
}
},
"_id": "bd9092a848a3e15f",
"title": {
"show": true,
"level": 1
},
"src": null,
"sort": 0,
"_key": "!journal.pages!d16a5066293b8501.bd9092a848a3e15f"
},
// ...
{
"name": "Character Inspiration",
"type": "text",
"text": {
"markdown": "If you are accompanied by machine intelligence, you might have a companion such as a @Compendium[foundry-ironsworn.starforgedassets.0b01e49c6b28c384]{Combat Bot}, @Compendium[foundry-ironsworn.starforgedassets.8a170a260aef1866]{Protocol Bot}, @Compendium[foundry-ironsworn.starforgedassets.b7adf924ed931610]{Survey Bot}, or @Compendium[foundry-ironsworn.starforgedassets.c06ce547c698414c]{Utility Bot}. If your ship has an AI, you might have the @Compendium[foundry-ironsworn.starforgedassets.70aef39e95ed202f]{Overseer} module. If AI in your campaign is rare or unavailable, these units will operate using very basic machine intelligence. If AI is common and advanced, they may have their own sentient personalities.",
"format": 2,
"content": "<p>If you are accompanied by machine intelligence, you might have a companion such as a @Compendium[foundry-ironsworn.starforgedassets.0b01e49c6b28c384]{Combat Bot}, @Compendium[foundry-ironsworn.starforgedassets.8a170a260aef1866]{Protocol Bot}, @Compendium[foundry-ironsworn.starforgedassets.b7adf924ed931610]{Survey Bot}, or @Compendium[foundry-ironsworn.starforgedassets.c06ce547c698414c]{Utility Bot}. If your ship has an AI, you might have the @Compendium[foundry-ironsworn.starforgedassets.70aef39e95ed202f]{Overseer} module. If AI in your campaign is rare or unavailable, these units will operate using very basic machine intelligence. If AI is common and advanced, they may have their own sentient personalities.</p>"
},
"_id": "c8ae93b24ae12587",
"title": {
"show": true,
"level": 1
},
"src": null,
"sort": 0,
"_key": "!journal.pages!d16a5066293b8501.c8ae93b24ae12587"
}
],
"folder": null,
"sort": 94,
"_key": "!journal!d16a5066293b8501"
}