Skip to content

Commit

Permalink
feat: Issue xdy#66 Support translating the system to other languages …
Browse files Browse the repository at this point in the history
…(excluding compendiums, as we have none). Added quick and dirty Swedish translation as an example.

I am absolutely convinced I have missed words. But, this will have to do for now. Please do pull requests with fixes as you discover them.

För eventuella svenskar som läser detta, jag tar inget som helst ansvar för översättningskvaliteten, fort men fel, det är mitt motto. :)
  • Loading branch information
xdy committed Aug 31, 2020
1 parent c9c9d41 commit 78bc9f8
Show file tree
Hide file tree
Showing 22 changed files with 795 additions and 459 deletions.
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/module/sheets/TwodsixActorSheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ export class TwodsixActorSheet extends ActorSheet {
this.rollSkill(itemId, event, dataset);
} else {
const roll = new Roll(dataset.roll, this.actor.data.data);
const label = dataset.label ? `Rolling ${dataset.label}` : '';
const label = dataset.label ? game.i18n.localize("TWODSIX.Actor.Rolling") + ` ${dataset.label}` : '';

roll.roll().toMessage({
speaker: ChatMessage.getSpeaker({actor: this.actor}),
flavor: label
Expand Down
10 changes: 5 additions & 5 deletions src/module/utils/TwodsixRolls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export class TwodsixRolls {
const dialogData = {
formula: usefulParts.join(' '),
data: data,
rollType: "Normal",
rollType: game.i18n.localize("Normal"),
rollTypes: CONFIG.TWODSIX.ROLLTYPES,
difficulty: "Average",
difficulty: game.i18n.localize("Average"),
difficulties: CONFIG.TWODSIX.DIFFICULTIES,
rollMode: game.settings.get('core', 'rollMode'),
rollModes: CONFIG.Dice.rollModes
Expand All @@ -39,7 +39,7 @@ export class TwodsixRolls {
},
cancel: {
icon: '<i class="fas fa-times"></i>',
label: "Cancel",
label: game.i18n.localize("Cancel"),
},
};

Expand Down Expand Up @@ -78,12 +78,12 @@ export class TwodsixRolls {
flavorParts.unshift(`${data['difficulty']}`);
}

flavorParts.unshift("Rolling:");
flavorParts.unshift(game.i18n.localize("TWODSIX.Rolls.Rolling") + ":");

if (data['rollType'] && data['rollType'].length > 0) {
rollParts[0] = CONFIG.TWODSIX.ROLLTYPES[data['rollType']];
if (data['rollType'] != 'Normal') {
flavorParts.push("with");
flavorParts.push(game.i18n.localize("TWODSIX.Rolls.With"));
flavorParts.push(`${data['rollType']}`);
}
}
Expand Down
Loading

0 comments on commit 78bc9f8

Please sign in to comment.