Skip to content

Commit

Permalink
fix: Added localization for system settings.
Browse files Browse the repository at this point in the history
Also sorted all the language jsons.
  • Loading branch information
xdy committed Sep 17, 2020
1 parent ac82fe1 commit f76e2cd
Show file tree
Hide file tree
Showing 4 changed files with 424 additions and 360 deletions.
40 changes: 20 additions & 20 deletions src/module/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export const registerSettings = function ():void {

// Register any custom system settings here
game.settings.register('twodsix', 'defaultTokenSettings', {
name: 'Default Prototype Token Settings',
hint: "Automatically set advised prototype token settings to newly created Actors.",
name: game.i18n.localize("TWODSIX.Settings.defaultTokenSettings.name"),
hint: game.i18n.localize("TWODSIX.Settings.defaultTokenSettings.hint"),
scope: 'world',
config: true,
default: true,
Expand All @@ -12,8 +12,8 @@ export const registerSettings = function ():void {

const DEFAULT_INITIATIVE_FORMULA = "2d6 + @characteristics.dexterity.mod";
game.settings.register('twodsix', 'initiativeFormula', {
name: 'Initiative Formula',
hint: "Like: \"2d6 + @characteristics.dexterity.mod\"",
name: game.i18n.localize("TWODSIX.Settings.initiativeFormula.name"),
hint: game.i18n.localize("TWODSIX.Settings.initiativeFormula.hint"),
scope: 'world',
config: true,
default: DEFAULT_INITIATIVE_FORMULA,
Expand All @@ -25,17 +25,17 @@ export const registerSettings = function ():void {
_simpleUpdateInit(initFormula);

game.settings.register('twodsix', 'modifierForZeroCharacteristic', {
name: 'Modifier for characteristic value of zero.',
hint: "Leave empty to use default (-2). Does not automatically recalculate modifiers for existing characters.",
name: game.i18n.localize("TWODSIX.Settings.modifierForZeroCharacteristic.name"),
hint: game.i18n.localize("TWODSIX.Settings.modifierForZeroCharacteristic.hint"),
scope: 'world',
config: true,
default: -2,
type: Number,
});

game.settings.register('twodsix', 'maxSkillLevel', {
name: 'Maximum skill level.',
hint: "Leave empty to use default (9).",
name: game.i18n.localize("TWODSIX.Settings.maxSkillLevel.name"),
hint: game.i18n.localize("TWODSIX.Settings.maxSkillLevel.hint"),
scope: 'world',
config: true,
default: 9,
Expand All @@ -44,42 +44,42 @@ export const registerSettings = function ():void {


game.settings.register('twodsix', 'termForAdvantage', {
name: 'What you want to call rolls with advantage (3d6kh2).',
hint: "Don't use the same word as for termForDisadvantage...",
name: game.i18n.localize("TWODSIX.Settings.termForAdvantage.name"),
hint: game.i18n.localize("TWODSIX.Settings.termForAdvantage.hint"),
scope: 'world',
config: true,
default: 'advantage',
});

game.settings.register('twodsix', 'termForDisadvantage', {
name: 'What you want to call rolls with disadvantage (3d6kl2).',
hint: "Don't use the same word as for termForAdvantage...",
name: game.i18n.localize("TWODSIX.Settings.termForDisadvantage.name"),
hint: game.i18n.localize("TWODSIX.Settings.termForDisadvantage.hint"),
scope: 'world',
config: true,
default: 'disadvantage',
});

game.settings.register('twodsix', 'effectOrTotal', {
name: 'Show effect or total roll value for skill and characteristic rolls.',
hint: "true=Show effect (i.e. roll+modifiers-target number, usually 8), false=show total (i.e. roll+modifiers)",
name: game.i18n.localize("TWODSIX.Settings.effectOrTotal.name"),
hint: game.i18n.localize("TWODSIX.Settings.effectOrTotal.name"),
scope: 'world',
config: true,
default: false,
type: Boolean,
});

game.settings.register('twodsix', 'automateDamageRollOnHit', {
name: 'Automatically roll damage on skill rolls that hit (i.e. get effect > 0) with items that do damage?',
hint: "true=Roll damage, modified by effect of skill roll. false=Don't roll damage.",
name: game.i18n.localize("TWODSIX.Settings.automateDamageRollOnHit.name"),
hint: game.i18n.localize("TWODSIX.Settings.automateDamageRollOnHit.name"),
scope: 'world',
config: true,
default: false,
type: Boolean,
});

game.settings.register('twodsix', 'absoluteBonusValueForEachTimeIncrement', {
name: 'What bonus/penalty to give per each time increment change in a task.',
hint: "Leave empty to use default (+/-1). Not currently used.",
name: game.i18n.localize("TWODSIX.Settings.absoluteBonusValueForEachTimeIncrement.name"),
hint: game.i18n.localize("TWODSIX.Settings.absoluteBonusValueForEachTimeIncrement.hint"),
scope: 'world',
config: true,
default: -1,
Expand All @@ -88,8 +88,8 @@ export const registerSettings = function ():void {

//Must be the last setting in the file
game.settings.register('twodsix', 'systemMigrationVersion', {
name: 'System Schema Version',
hint: "Records the schema version for the Twodsix system. (Don't modify this unless you know what you are doing)",
name: game.i18n.localize("TWODSIX.Settings.systemMigrationVersion.name"),
hint: game.i18n.localize("TWODSIX.Settings.systemMigrationVersion.hint"),
scope: 'world',
config: true,
default: game.system.data.version,
Expand Down
Loading

0 comments on commit f76e2cd

Please sign in to comment.