Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
782 changes: 779 additions & 3 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"standard-version": "^9.5.0",
"svelte": "^4.2.19",
"svelte-dnd-action": "^0.9.50",
"svelte-i18n": "^4.0.1",
"svelte-loader": "^3.2.3",
"svelte-multiselect": "^10.2.0",
"svelte-preprocess": "^6.0.2",
Expand Down
9 changes: 5 additions & 4 deletions src/combatant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { Bestiary } from "src/bestiary/bestiary";
import type StatBlockPlugin from "src/main";
import { MonsterSuggestionModal } from "src/util/creature";
import { t } from "src/util/i18n";

export const CREATURE_VIEW = "fantasy-statblocks-creature-pane";

Expand Down Expand Up @@ -44,7 +45,7 @@ export class CreatureView extends ItemView {
}
onload() {
const search = new SearchComponent(this.topEl).setPlaceholder(
"Find a creature"
t("Find a creature")
);
const suggester = new MonsterSuggestionModal(
this.plugin.app,
Expand All @@ -62,7 +63,7 @@ export class CreatureView extends ItemView {
});
new ExtraButtonComponent(this.topEl)
.setIcon("cross")
.setTooltip("Close Statblock")
.setTooltip(t("Close Statblock"))
.onClick(async () => {
await this.render();
search.setValue("");
Expand All @@ -72,7 +73,7 @@ export class CreatureView extends ItemView {
this.statblockEl.empty();
if (!creature) {
this.statblockEl.createEl("em", {
text: "Select a creature to view it here."
text: t("Select a creature to view it here.")
});
return;
}
Expand All @@ -81,7 +82,7 @@ export class CreatureView extends ItemView {
}

getDisplayText(): string {
return "Combatant";
return t("Combatant");
}
getIcon(): string {
return "skull";
Expand Down
314 changes: 314 additions & 0 deletions src/data/translations/pt-br.json

Large diffs are not rendered by default.

314 changes: 314 additions & 0 deletions src/data/translations/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,314 @@
{
" (current monster being rendered) parameters available in the callback.": "",
" (the matched text), ": "",
" (the RegExpMatchArray), and ": "",
"A source could not be found for some imported monsters. Do you wish to manually add one?": "",
"A valid property must be supplied.": "",
"Ability Modifier Calculation": "",
"Action": "",
"Actions": "",
"Add ": "",
"Add an example, for reference only.": "",
"Add Condition": "",
"Add Creature": "",
"Add Dice Roller dice to statblocks by default. Use ": "",
"Add new condition": "",
"Add New Layout": "",
"Add Property as CSS Class": "Adicionar Propriedade como Classe CSS","Add Block": "",
"Added": "",
"Advanced Settings": "",
"All conditions must return a true/false value. For example:": "",
"All nested elements inside this group container will receive this CSS class. If blank, no class will be applied.": "",
"Allows a custom modifier for the stat.": "",
"always": "",
"Always try to split into this many columns, regardless of height.": "",
" and ": "",
"and %d more": "",
" and all objects must have the ": "",
"are accessible, use these to calculate the modifier.": "",
"Are you sure?": "",
"Are you sure you want to import this layout?": "",
"Armor Class": "",
"as-is": "",
"Automatically Parse Frontmatter for Creatures": "",
" be ran.": "",
"Bestiary": "",
"Bestiary Folder": "",
"Block Has Rule": "",
"Blocks": "",
"Bonus Actions": "",
"Both": "",
"Buy me a coffee": "",
"Calculate Modifiers": "",
"Callback": "",
"Cancel": "",
"Cha": "",
"Charisma": "",
"Challenge": "",
"Change the default statblock layout used, if not specified.": "",
"Choose a Command to run when this action is executed.": "",
"Choose File(s)": "",
"Choose the icon to use for the button.": "",
"Close Statblock": "",
"Collapse": "",
"Column width": "",
"Columns": "",
"Combatant": "",
"Con": "",
"Conditional": "",
"Conditioned": "",
"Conditions are used to determine what block is rendered. Conditions are evaluated top to bottom - the first to evaluate to": "",
"Constitution": "",
"Condition Immunities": "",
"Copy YAML": "",
"Create Copy": "",
"Create Layout": "",
"Creature YAML copied to clipboard": "",
"creature%s": "",
"Creatures must be given a name.": "",
"CSS Container Class": "",
"Current:": "",
"Damage Immunities": "",
"Damage Resistances": "",
"Damage Vulnerabilities": "",
"Dark": "",
"Debug messages will be displayed by the file parser.": "",
"Default Layout": "",
"Delete": "",
"Delete Block": "",
"Delete filtered creatures": "",
"Dex": "",
"Dexterity": "",
"Dice Callback": "",
"Dice Parsing": "",
"Disable this to prevent adding the property to the containing HTML element as a CSS class. This can be used to avoid collisions with native Obsidian CSS.": "",
"Display Text": "",
" display the text entered here.": "",
"Edit": "",
"Edit Block": "",
"Edit Name": "",
"Editing Dice Parser": "",
"Enable Debug Messages": "",
"Enable 5e SRD": "",
"Error importing Pathbuilder file": "",
"Example": "",
"Executing the action will run the callback. Any registered commands will ": "",
"Export as JSON": "",
"Export as PNG": "",
"Fallback": "",
"Fantasy StatBlocks loaded": "",
"Fantasy Statblocks Settings": "",
"Fantasy StatBlocks unloaded": "",
"Fantasy Statblocks:": "",
"Fantasy Statblocks: Adding %d paths to queue": "",
"Fantasy Statblocks: Adding %s1 to bestiary from %s2": "",
"Fantasy Statblocks: found Statblock: %s": "",
"Fantasy Statblocks: Frontmatter Parsing complete.": "",
"Fantasy Statblocks: Frontmatter Parsing Complete in %d seconds.": "",
"Fantasy Statblocks: Handling rename of %s1 to %s2": "",
"Fantasy Statblocks: Multiple image properties provided, using first.": "",
"Fantasy Statblocks: Parsing %s for statblocks (%d to go)": "",
"Fantasy Statblocks: Process Content: %s": "",
"Fantasy Statblocks: Received queue message for %d paths": "",
"Fantasy Statblocks: Removing %s from bestiary": "",
"Fantasy Statblocks: Reparsing": "",
"Fantasy Statblocks: Starting Frontmatter Parsing.": "",
"Find a creature": "",
"For example: ": "",
"Force columns": "",
" freckles.": "",
"General Settings": "",
"Has Callback": "",
"Has Heading": "",
"Has Rule": "",
"header": "",
"Header Size": "",
"Hit Points": "",
"Homebrew": "",
"Icon": "",
"If not present, this text will be displayed.": "",
"If present, the block will have a horizontal rule placed after it.": "",
"Ignore available space when calculating columns.": "",
"Import": "",
"Import 5e.tools Data": "",
"Import a custom layout from a JSON file.": "",
"Import a PC or NPC exported from Pathbuilder2e.": "",
"Import and don't ask again": "",
"Import creatures from creature files. Monsters are stored by name, so only the last creature by that name will be saved. This is destructive - any saved creature will be overwritten.": "",
"Import CritterDB Data": "",
"Import DnDAppFile": "",
"Import DnDAppFile Data": "",
"Import From JSON": "",
"Import Generic Data": "",
"Import generic JSON files. JSON objects will be imported ": "",
"Import Homebrew Creatures": "",
"Import Improved Initiative Data": "",
"Import Pathbuilder Data": "",
"Import PF2eMonsterTools Data": "",
"Import TetraCube Data": "",
"Int": "",
"Intelligence": "",
"Integrate Dice Roller": "",
"Invalid layout imported": "",
"Invalid layout imported: layout does not have a name": "",
"Invalid layout imported: no blocks defined in layout.": "",
"Invalid monster": "",
"Invalid monster JSON provided.": "",
"Invalid monster JSON provided. Must be array or object.": "",
"Invalid monster.": "",
"is the condition that will be used. If the last condition is left blank and no others were true, it will be used.": "",
"JavaScript": "",
"JavaScript blocks can be used to do highly advanced HTML elements. The JavaScript code will be provided the ": "",
"JSON": "",
"knows the following spells:": "",
"Languages": "",
"Layout": "",
"Layout Editor": "",
"Layout to Insert": "",
"Layouts": "",
"Legendary Actions": "",
"Light": "",
"Link Dice to Property": "",
"Link Monster Properties": "",
"Link Monster Property": "",
"Mode: Dark": "",
"Mode: Light": "",
"Name to display for the Spellcasting trait. Defaults to Spellcasting if not provided.": "",
"New Dice Parser": "",
"New statblock layouts can be created and managed here. A specific layout can be used for a creature using the ": "",
"No": "",
"No condition set": "",
"No image could be loaded": "",
"No layout selected": "",
"not": "",
"Note Parsing": "",
"Obsidian Statblock Error:": "",
"Only import content that you own.": "",
"Open by Default": "",
"Open Creature pane": "",
"Open new Creature pane": "",
"optional, shown in parenthesis": "",
" parameter.": "",
" parameter. ": "",
" parameter. The callback should return a string. For example: ": "",
"parameter, which can be used to access properties of the monster being rendered, and the ": "",
"parameter, which is a reference to the Fantasy Statblocks plugin and can be used for accessing app and plugin settings.": "",
"parameters and should return a HTML element, which will be attached to the block's container element.": "",
"parameters. Dice callbacks should return an array of strings and objects, with the objects defining the dice rolls:": "",
" parameters. The callback should return a string. For example: ": "",
" parameters. The callback should return an object with a single key and value. For example: ": "",
"Parse for Dice": "",
"per page": "",
"Please note: these links will not be added to the graph.": "",
"Please Note: This will not run if a dice callback is provided.": "",
"Proficiency Bonus": "",
" property.": "",
"Reactions": "",
"regular expressions": "",
"Regular Expression": "",
"Remove default parsers": "",
"Render Dice Rolls": "",
"Render markdown enabled": "",
"Reset Dice": "",
"Restore Default Layouts": "",
"Restore default parsers": "",
"Reveal Creature pane": "",
"Roll graphical dice inside statblocks by default. Use ": "",
"Save": "",
"Save Changes": "",
"Save to Bestiary": "",
"Saves": "",
"Scale:": "",
"Scale preview": "",
"Search Creatures": "",
"Section Heading": "",
"Section Subheading Text": "",
"Select a creature to preview the layout, or enter your own definition below.": "",
"Select a creature to view it here.": "",
"Senses": "",
"Separator": "",
"Set colors for...": "",
"Set Sources": "",
"Set theme mode": "",
"Show Advanced Options": "",
"Show advanced options when editing layout blocks.": "",
"Skills": "",
"Sources": "",
"Speed": "",
"Spellcasting": "",
"Str": "",
"Strength": "",
"string to be parsed into a dice roll": "",
"Successfully imported %d Monsters": "",
"Table Headers": "",
"Text entered here will appear directly after the section heading, before the actual traits. Use ": "",
"Text separating properties": "",
"Text to Show": "",
"The block will ": "",
"The block will attempt to calculate modifiers for table values.": "",
"The block will not be added if the associated properties are not present.": "",
"The block will run the callback and use the returned string as the property.": "",
"The block will run the callback and use the returned values for the dice strings.": "",
"The block will run the callback on each save object and use the returned object as the save.": "",
"The block will run the callback on each trait and use the returned string as the trait description.": "",
"The block will start open.": "",
"The callback should return an instance of:": "",
"The callback will have the ": "",
"The callback will receive the ": "",
"The dice parser callback needs to parse the results of the regular expression and return the correct dice string to display.": "",
"The dice roller will parse this property instead of the original.": "",
"The expression receives the ": "",
"The heading will use this size.": "",
"The monster guesses you have: ": "",
"The \"Parse Frontmatter for Creatures\" command can also be used.": "",
"The plugin will attempt to add dice rollers as specified.": "",
"The plugin will attempt to detect wikilinks inside Statblocks.": "",
"The plugin will only parse notes inside these folders and their children.": "",
"The plugin will watch the vault for creatures defined in note frontmatter.": "",
"The Section heading will be set to the value of the specified property.": "",
"The section will use this property for the section heading. If the property does not exist or is blank, the section heading will not appear.": "",
"These are parsed in order, and the first one to trigger is what will be used.": "",
"There was an error creating the image:": "",
"There was an error displaying the settings tab for 5e Statblocks.": "",
"There was an error executing the command for the action block.": "",
"There was an error executing the provided callback for": "",
"There was an error executing the provided callback for the action block.": "",
"There was an error executing the provided dice callback for": "",
"There was an error importing the file.": "",
"There was an error parsing the at-will spells.": "",
"There was an error parsing the ritual spells.": "",
"There was an error parsing the spells.": "",
"There was an error parsing the Statblock in %s:": "",
"There was an error rendering the statblock:": "",
"There was an error saving the creaturen": "",
"There was an issue copying the yaml:": "",
"This can cause issues sometimes when using sync services.": "",
"This layout does not have any dice parsers defined. Add one to begin parsing for dice.": "",
"This Layout includes JavaScript blocks. JavaScript blocks can execute code in your vault, which could cause loss or corruption of data.": "",
"This layout is currently using the default dice parsers. Add a custom dice parser to override this behavior.": "",
"This setting is only usable with the Dice Roller plugin enabled.": "",
"This setting is currently disabled.": "",
"This text will be used for the property name.": "",
"This text will be used for the section heading. Can be left blank.": "",
"This will cause to plugin to save data to a temporary file before saving the actual data file in an attempt to prevent data loss.": "",
"This will overwrite an existing monster in settings. Are you sure?": "",
" to detect dice rolls inside your layout.": "",
" to disable per-statblock.": "",
" to insert the current monster's name.": "",
"Trait Name": "",
"Try to Render Wikilinks": "",
"Try to Save Data Atomically": "",
"Updated": "",
"Unknown": "",
"Unknown source:": "",
"Use Monster Property for Heading": "",
"Use the Dungeons & Dragons 5th Edition System Reference Document monsters.": "",
"Variables ": "",
"View": "",
"Width in pixels. Default: 400px": "",
"Will Parse for Dice Rolls": "",
"Wis": "",
"Wisdom": "",
"YAML": "",
"Yes": ""
}
Loading