Skip to content

Commit

Permalink
Merge pull request #142 from Tmktahu/tk-various-bugs-squashed
Browse files Browse the repository at this point in the history
Various Bug Fixes + Translation Keys
  • Loading branch information
Tmktahu authored Feb 28, 2024
2 parents c7d5911 + 0c307ae commit fa3976e
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wakfu-wizard",
"version": "2.5.3",
"version": "2.5.4",
"private": true,
"scripts": {
"serve": "vite",
Expand Down
2 changes: 0 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ import { useSpells } from '@/models/spells/useSpells';
import { useLevels } from '@/models/useLevels';
import { useAutoBuilder } from '@/models/useAutoBuilder';
console.log(masterData);
import OldDataDialog from '@/components/OldDataDialog.vue';
import AppSidebar from '@/components/AppSidebar.vue';
Expand Down
22 changes: 13 additions & 9 deletions src/components/characterSheet/EditEquipmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
</div>

<div v-if="randomMasteryEffect" class="random-mastery-section flex flex-column px-3">
<div v-if="!defaultsMode" class="text-center w-full text-lg mb-2 pt-2">+{{ randomMasteryEffect.values[0] }} Mastery Assignment</div>
<div v-if="!defaultsMode" class="text-center w-full text-lg mb-2 pt-2">
{{ $t('characterSheet.equipmentContent.masteryAssignment', { num: randomMasteryEffect.values[0] }) }}
</div>
<div class="flex justify-content-center gap-2 px-3" :class="{ 'mt-3': defaultsMode }">
<template v-for="index in randomMasteryEffect.values[2]" :key="index">
<p-dropdown
Expand Down Expand Up @@ -57,7 +59,7 @@

<template v-slot:option="slotProps">
<div class="flex align-items-center py-1 px-2">
<div class="capitalize">{{ slotProps.option.label }}</div>
<div class="capitalize">{{ $t(slotProps.option.label) }}</div>
</div>
</template>
</p-dropdown>
Expand All @@ -66,7 +68,9 @@
</div>

<div v-if="randomResistanceEffect" class="random-resistance-section flex flex-column px-3">
<div v-if="!defaultsMode" class="text-center w-full text-lg mb-2 pt-2">+{{ randomResistanceEffect.values[0] }} Resistance Assignment</div>
<div v-if="!defaultsMode" class="text-center w-full text-lg mb-2 pt-2">
{{ $t('characterSheet.equipmentContent.resistanceAssignment', { num: randomResistanceEffect.values[0] }) }}
</div>
<div class="flex justify-content-center gap-2 px-3" :class="{ 'mt-3': defaultsMode }">
<template v-for="index in randomResistanceEffect.values[2]" :key="index">
<p-dropdown
Expand Down Expand Up @@ -104,7 +108,7 @@
</div>

<div class="flex justify-content-center mt-2">
<p-button class="py-2" label="Apply to all Items" @click="onApplyToAll" />
<p-button class="py-2" :label="$t('characterSheet.equipmentContent.applyToAllItems')" @click="onApplyToAll" />
</div>
</div>
</p-dialog>
Expand All @@ -130,11 +134,11 @@ const item = ref(null);
const inputModels = ref({});
const elementOptions = [
{ value: 'empty', label: 'None', icon: 'empty_coin' },
{ value: 'water', label: 'Water', icon: 'water_coin' },
{ value: 'earth', label: 'Earth', icon: 'earth_coin' },
{ value: 'air', label: 'Air', icon: 'air_coin' },
{ value: 'fire', label: 'Fire', icon: 'fire_coin' },
{ value: 'empty', label: 'equipmentContent.itemFilters.none', icon: 'empty_coin' },
{ value: 'water', label: 'characterSheet.statsDisplay.water', icon: 'water_coin' },
{ value: 'earth', label: 'characterSheet.statsDisplay.earth', icon: 'earth_coin' },
{ value: 'air', label: 'characterSheet.statsDisplay.air', icon: 'air_coin' },
{ value: 'fire', label: 'characterSheet.statsDisplay.fire', icon: 'fire_coin' },
];
const randomMasteryEffect = computed(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/characterSheet/EquipmentButtons.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div class="flex equipment-slots-wrapper">
<div v-if="withDefaultElemSelector" class="flex flex-column h-full">
<div v-if="withDefaultElemSelector" class="flex flex-column h-full" style="max-height: 60px">
<div>
<tippy>
<div class="random-defaults-button flex align-items-center justify-content-center w-full" @click="onEditDefaults(defaultRandomMasteries, 'mastery', $event)">
<p-image v-for="type in defaultRandomMasteries" :key="type" :src="`https://tmktahu.github.io/WakfuAssets/statistics/${type}_coin.png`" image-style="width: 24px" />
</div>

<template v-slot:content>
<div class="simple-tooltip">Random Mastery Defaults</div>
<div class="simple-tooltip">{{ $t('characterSheet.equipmentContent.randomMasteryDefaults') }}</div>
</template>
</tippy>
</div>
Expand All @@ -21,7 +21,7 @@
<p-image v-for="type in defaultRandomResistances" :key="type" :src="`https://tmktahu.github.io/WakfuAssets/statistics/${type}_coin.png`" image-style="width: 24px" />
</div>
<template v-slot:content>
<div class="simple-tooltip">Random Resistance Defaults</div>
<div class="simple-tooltip">{{ $t('characterSheet.equipmentContent.randomResistanceDefaults') }}</div>
</template>
</tippy>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/characterSheet/StatDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -337,28 +337,28 @@

<div class="stat-block pr-2 ml-1">
<p-image class="stat-icon element" src="https://tmktahu.github.io/WakfuAssets/statistics/water_coin.png" />
<span class="ml-1">{{ $t('characterSheet.statsDisplay.effectiveHpAgainst', { type: 'Water' }) }}</span>
<span class="ml-1">{{ $t('characterSheet.statsDisplay.effectiveHpAgainst', { type: $t('characterSheet.statsDisplay.water') }) }}</span>
<div class="flex-grow-1" />
<span>{{ calcEffectiveHp('water') }}</span>
</div>

<div class="stat-block pr-2 ml-1">
<p-image class="stat-icon element" src="https://tmktahu.github.io/WakfuAssets/statistics/air_coin.png" />
<span class="ml-1">{{ $t('characterSheet.statsDisplay.effectiveHpAgainst', { type: 'Air' }) }}</span>
<span class="ml-1">{{ $t('characterSheet.statsDisplay.effectiveHpAgainst', { type: $t('characterSheet.statsDisplay.air') }) }}</span>
<div class="flex-grow-1" />
<span>{{ calcEffectiveHp('air') }}</span>
</div>

<div class="stat-block pr-2 ml-1">
<p-image class="stat-icon element" src="https://tmktahu.github.io/WakfuAssets/statistics/earth_coin.png" />
<span class="ml-1">{{ $t('characterSheet.statsDisplay.effectiveHpAgainst', { type: 'Earth' }) }}</span>
<span class="ml-1">{{ $t('characterSheet.statsDisplay.effectiveHpAgainst', { type: $t('characterSheet.statsDisplay.earth') }) }}</span>
<div class="flex-grow-1" />
<span>{{ calcEffectiveHp('earth') }}</span>
</div>

<div class="stat-block pr-2 ml-1">
<p-image class="stat-icon element" src="https://tmktahu.github.io/WakfuAssets/statistics/fire_coin.png" />
<span class="ml-1">{{ $t('characterSheet.statsDisplay.effectiveHpAgainst', { type: 'Fire' }) }}</span>
<span class="ml-1">{{ $t('characterSheet.statsDisplay.effectiveHpAgainst', { type: $t('characterSheet.statsDisplay.fire') }) }}</span>
<div class="flex-grow-1" />
<span>{{ calcEffectiveHp('fire') }}</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/models/useConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ export const EFFECT_TYPE_DATA = {
harvestingQuantity: { id: 'harvestingQuantity', rawIds: [2001], text: 'constants.harvestingQuantity' }, // TODO figure this one out

// ones below this point were picked out manually
armorGiven: { id: 'armorGiven', rawIds: [10000], text: 'constants.percentArmorGiven' },
armorReceived: { id: 'armorReceived', rawIds: [10001, 39, 40], text: 'constants.percentArmorReceived' },
armorGiven: { id: 'armorGiven', rawIds: [10000, 39], text: 'constants.percentArmorGiven' },
armorReceived: { id: 'armorReceived', rawIds: [10001, 40], text: 'constants.percentArmorReceived' },
healsPerformed: { id: 'healsPerformed', rawIds: [10002], text: 'constants.percentHealsPerformed' },
indirectDamageInflicted: { id: 'indirectDamageInflicted', rawIds: [10003], text: 'constants.percentIndirectDamageInflicted' },
dodgeOverride: { id: 'dodgeOverride', rawIds: [10004], text: 'constants.dodgeOverride' },
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ export const en = {
relicAndSecondWeaponWarning: 'You have two handed weapon and a Relic item already equipped. Both will be removed if you do this. Are you sure?',
epicAndTwoHandedWarning: 'You have an item in your second weapon slot and an Epic item already equipped. Both will be removed if you do this. Are you sure?',
epicAndSecondWeaponWarning: 'You have two handed weapon and an Epic item already equipped. Both will be removed if you do this. Are you sure?',
randomResistanceDefaults: 'Random Resistance Defaults',
randomMasteryDefaults: 'Random Mastery Defaults',
masteryAssignment: '+{num} Mastery Assignment',
resistanceAssignment: '+{num} Resistance Assignment',
applyToAllItems: 'Apply to all Items',

itemFilters: {
searchItems: 'Search Items',
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/i18n/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ export const es = {
relicAndSecondWeaponWarning: 'Ya tienes un arma a dos manos y un objeto Reliquia equipados. Ambos serán removidos si haces esto. ¿Estás seguro?',
epicAndTwoHandedWarning: 'Tienes un objeto en tu segunda ranura de arma y un objeto Épico ya equipado. Ambos serán removidos si haces esto. ¿Estás seguro?',
epicAndSecondWeaponWarning: 'Ya tienes equipados un arma a dos manos y un objeto Épico ya equipiado. Ambos serán removidos si haces esto. ¿Estás seguro?',
randomResistanceDefaults: 'Random Resistance Defaults', // NEEDS TRANSLATION
randomMasteryDefaults: 'Random Mastery Defaults', // NEEDS TRANSLATION
masteryAssignment: '+{num} Mastery Assignment', // NEEDS TRANSLATION
resistanceAssignment: '+{num} Resistance Assignment', // NEEDS TRANSLATION
applyToAllItems: 'Apply to all Items', // NEEDS TRANSLATION

itemFilters: {
searchItems: 'Buscar Objetos',
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ export const fr = {
epicAndTwoHandedWarning:
"Vous avez un Item dans le slot d'arme secondaire et un Item Epique équipés. Ces derniers seront retirés avec cette action. Êtes-vous sûr ?",
epicAndSecondWeaponWarning: 'Vous avez une arme à deux main et un Item Epique équipés. Ces derniers seront retirés avec cette action. Êtes-vous sûr ?',
randomResistanceDefaults: 'Random Resistance Defaults', // NEEDS TRANSLATION
randomMasteryDefaults: 'Random Mastery Defaults', // NEEDS TRANSLATION
masteryAssignment: '+{num} Mastery Assignment', // NEEDS TRANSLATION
resistanceAssignment: '+{num} Resistance Assignment', // NEEDS TRANSLATION
applyToAllItems: 'Apply to all Items', // NEEDS TRANSLATION

itemFilters: {
searchItems: 'Recherche Items',
Expand Down

0 comments on commit fa3976e

Please sign in to comment.