Skip to content

Commit

Permalink
Merge pull request #45 from Carifio24/tweak-cast-toast
Browse files Browse the repository at this point in the history
Tweak wording of Toast after spell is cast
  • Loading branch information
Carifio24 authored Oct 18, 2023
2 parents b15d319 + c1d7ceb commit 9efa82b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
applicationId "dnd.jon.spellbook"
minSdkVersion 24
targetSdkVersion 33
versionCode 300400
versionCode 3004000
versionName "3.4.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.release
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/dnd/jon/spellbook/SpellbookViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,9 @@ private void castSpell(Spell spell, int level, boolean levelInMessage) {

String message;
if (status.getTotalSlots(level) == 0) {
message = context.getString(R.string.no_slots_of_level, name, level);
} else if (status.getAvailableSlots(level) == 0) {
message = context.getString(R.string.no_slots_remaining_of_level, name, level);
message = context.getString(R.string.no_slots_of_level_or_above, name, level);
} else if (status.getTotalSlots(level) == 0 || status.getAvailableSlots(level) == 0) {
message = context.getString(R.string.no_slots_remaining_of_level_or_above, name, level);
} else if (levelInMessage) {
message = context.getString(R.string.cast_spell_with_level, spell.getName(), level);
} else {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@
<string name="cast_spell_with_level">%1$s foi lançado no nível %2$d</string>
<string name="select_slot_level">Selecione o Nível do Slot</string>
<string name="no_slots_of_level">%1$s não tem vagas no nível %2$d!</string>
<string name="no_slots_remaining_of_level">%1$s não tem vagas restantes no nível %2$d ou acima!</string>
<string name="no_slots_of_level_or_above">%1$s não tem vagas no nível %2$d ou acima!</string>
<string name="no_slots_remaining_of_level_or_above">%1$s não tem vagas restantes no nível %2$d ou acima!</string>
<string name="slot_level_prompt">Nível do slot:</string>
<string name="use_higher_level_slot_query">Usar slot mais alto?</string>
<string name="want_to_cast_next_available_level">%1$s não tem vagas restantes no nível %2$d. Você gostaria de usar um slot de nível %3$d?</string>
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@
<string name="cast_spell_with_level">%1$s was cast at level %2$d</string>
<string name="select_slot_level">Select Slot Level</string>
<string name="no_slots_of_level">%1$s has no slots of level %2$d!</string>
<string name="no_slots_remaining_of_level">%1$s has no remaining slots of level %2$d or above!</string>
<string name="no_slots_of_level_or_above">%1$s has no slots of level %2$d or above!</string>
<string name="no_slots_remaining_of_level_or_above">%1$s has no remaining slots of level %2$d or above!</string>
<string name="slot_level_prompt">Slot level:</string>
<string name="use_higher_level_slot_query">Use higher slot?</string>
<string name="want_to_cast_next_available_level">%1$s has no slots of level %2$d remaining. Would you like to use a slot of level %3$d?</string>
Expand Down

0 comments on commit 9efa82b

Please sign in to comment.