Skip to content

Commit

Permalink
Update sub perk gem & hourglasses bubble text
Browse files Browse the repository at this point in the history
Ex: '25 Gems a month', 'Hourglass in 3 months" and '4 Hourglasses'
  • Loading branch information
Hafizzle committed Sep 17, 2023
1 parent 200e407 commit 66409c0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Habitica/res/layout/purchase_subscription_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/subscription_box_bg"
android:background="@drawable/subscription_type_box_bg"
android:gravity="center"
android:minHeight="106dp"
android:layout_marginBottom="8dp">
Expand Down
8 changes: 4 additions & 4 deletions Habitica/res/values-en-rGB/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,10 @@
<string name="login_incentive">Unlock by logging into Habitica regularly</string>
<string name="create_account">Unlock by creating an account</string>
<string name="subscription_duration_norenew">For %s</string>
<string name="subscribe1month_gemcap">25 Gem cap</string>
<string name="subscribe3month_gemcap">30 Gem cap</string>
<string name="subscribe6month_gemcap">35 Gem cap</string>
<string name="subscribe12month_gemcap">45 Gem cap</string>
<string name="subscribe1month_gemcap">25 Gems a month</string>
<string name="subscribe3month_gemcap">30 Gems a month</string>
<string name="subscribe6month_gemcap">35 Gems a month</string>
<string name="subscribe12month_gemcap">45 Gems a month</string>
<string name="due">Due</string>
<string name="inbox">Messages</string>
<string name="welcome_text">Oh, you must be new here. I’m Justin, I’ll be your guide in Habitica.
Expand Down
11 changes: 6 additions & 5 deletions Habitica/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,12 @@
<string name="subscribe_listitem4_description">Receive the Royal Purple Jackalope pet when you become a new subscriber.</string>
<string name="subscribe_listitemFaint_description">You’ll have the option of a second chance when you run out of HP.</string>
<string name="subscribe_listitem5_description">Discover even more items in Habitica with a 2x bonus daily drop cap.</string>
<string name="subscribe1month_gemcap">25 Gem cap</string>
<string name="subscribe3month_gemcap">30 Gem cap</string>
<string name="subscribe6month_gemcap">35 Gem cap</string>
<string name="subscribe12month_gemcap">45 Gem cap</string>
<string name="subscription_hourglasses">+%d Mystic Hourglass</string>
<string name="subscribe1month_gemcap">25 Gems a month</string>
<string name="subscribe3month_gemcap">30 Gem a month</string>
<string name="subscribe6month_gemcap">35 Gem a month</string>
<string name="subscribe12month_gemcap">45 Gem a month</string>
<string name="subscription_hourglasses_3month_timeframe">Hourglass in 3 months</string>
<string name="subscription_hourglasses">%d Hourglasses</string>
<string name="payment_method">Payment method</string>
<string name="subscription">Subscription</string>
<string name="subscription_credit_canceling">"Your <b>+%d</b> months of subscription credit will activate after canceling</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class SubscriptionOptionView(context: Context, attrs: AttributeSet) : FrameLayou
binding.gemCapTextView.text = a.getText(R.styleable.SubscriptionOptionView_gemCapText)
setFlagText(a.getText(R.styleable.SubscriptionOptionView_flagText))
val hourGlassCount = a.getInteger(R.styleable.SubscriptionOptionView_hourGlassCount, 0)
binding.hourglassTextView.visibility = View.VISIBLE
if (hourGlassCount != 0) {
binding.hourglassTextView.text = context.getString(R.string.subscription_hourglasses, hourGlassCount)
binding.hourglassTextView.visibility = View.VISIBLE
} else {
binding.hourglassTextView.visibility = View.GONE
binding.hourglassTextView.text = context.getString(R.string.subscription_hourglasses_3month_timeframe)
}
}

Expand Down

0 comments on commit 66409c0

Please sign in to comment.