From f2c79863adc2a039e95cdc52758d76825485bed3 Mon Sep 17 00:00:00 2001 From: code-a1 <68858676+code-a1@users.noreply.github.com> Date: Sat, 23 Apr 2022 20:59:05 +0200 Subject: [PATCH] Added strings in strings.xml --- .../wallet/domain/fp/charts/ChartPeriod.kt | 10 ++- .../domain/logic/CustomerJourneyLogic.kt | 85 ++++++++----------- .../wallet/domain/logic/PreloadDataLogic.kt | 62 +++++++------- .../wallet/domain/logic/WalletAccountLogic.kt | 4 +- .../loantrasactions/LoanTransactionsCore.kt | 4 +- .../notification/TransactionReminderWorker.kt | 8 +- .../java/com/ivy/wallet/ui/RootActivity.kt | 5 +- .../java/com/ivy/wallet/ui/RootViewModel.kt | 6 +- .../main/java/com/ivy/wallet/utils/DateExt.kt | 22 ++--- app/src/main/res/values/strings.xml | 68 ++++++++++++++- 10 files changed, 169 insertions(+), 105 deletions(-) diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartPeriod.kt b/app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartPeriod.kt index 167d7393de..60019d8211 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartPeriod.kt +++ b/app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartPeriod.kt @@ -1,6 +1,8 @@ package com.ivy.wallet.domain.fp.charts +import com.ivy.wallet.R import com.ivy.wallet.domain.fp.data.ClosedTimeRange +import com.ivy.wallet.stringRes import com.ivy.wallet.utils.dateNowUTC import com.ivy.wallet.utils.endOfDayNowUTC import com.ivy.wallet.utils.endOfMonth @@ -15,10 +17,10 @@ enum class ChartPeriod { fun display(): String { return when (this) { - LAST_12_MONTHS -> "Last 12 months" - LAST_6_MONTHS -> "Last 6 months" - LAST_4_WEEKS -> "Last 4 weeks" - LAST_7_DAYS -> "Last 7 days" + LAST_12_MONTHS -> stringRes(R.string.last_12_months) + LAST_6_MONTHS -> stringRes(R.string.last_6_months) + LAST_4_WEEKS -> stringRes(R.string.last_4_weeks) + LAST_7_DAYS -> stringRes(R.string.last_7_days) } } diff --git a/app/src/main/java/com/ivy/wallet/domain/logic/CustomerJourneyLogic.kt b/app/src/main/java/com/ivy/wallet/domain/logic/CustomerJourneyLogic.kt index 695e2c9a7d..ccad0b54a4 100644 --- a/app/src/main/java/com/ivy/wallet/domain/logic/CustomerJourneyLogic.kt +++ b/app/src/main/java/com/ivy/wallet/domain/logic/CustomerJourneyLogic.kt @@ -9,6 +9,7 @@ import com.ivy.wallet.domain.logic.model.CustomerJourneyCardData import com.ivy.wallet.io.persistence.SharedPrefs import com.ivy.wallet.io.persistence.dao.PlannedPaymentRuleDao import com.ivy.wallet.io.persistence.dao.TransactionDao +import com.ivy.wallet.stringRes import com.ivy.wallet.ui.* import com.ivy.wallet.ui.home.CustomerJourneyCard import com.ivy.wallet.ui.main.MainTab @@ -66,9 +67,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount == 0L }, - title = "Adjust your initial balance", - description = "Let's get started. Go to \"Accounts\" -> Tap an account -> Tap its balance -> Enter current balance. That's it!", - cta = "To accounts", + title = stringRes(R.string.adjust_initial_balance), + description = stringRes(R.string.adjust_initial_balance_description), + cta = stringRes(R.string.to_accounts), ctaIcon = R.drawable.ic_custom_account_s, backgroundColor = Ivy, hasDismiss = false, @@ -82,10 +83,9 @@ class CustomerJourneyLogic( condition = { trnCount, plannedPaymentCount, _ -> trnCount >= 1 && plannedPaymentCount == 0L }, - title = "Create your first planned payment", - description = "Automate the tracking of recurring transactions like your subscriptions, rent, salary, etc." + - " Stay ahead of your finances by knowing how much you have to pay/get in advance.", - cta = "Add planned payment", + title = stringRes(R.string.create_first_planned_payment), + description = stringRes(R.string.create_first_planned_payment_description), + cta = stringRes(R.string.add_planned_payment), ctaIcon = R.drawable.ic_planned_payments, backgroundColor = Orange, hasDismiss = true, @@ -104,10 +104,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 3 }, - title = "Did you know?", - description = "Ivy Wallet has a cool widget that lets you add INCOME/EXPENSES/TRANSFER transactions with 1-click from your home " + - "\n\nNote: If the \"Add widget\" button doesn't work, please add it manually from your launcher's widgets menu.", - cta = "Add widget", + title = stringRes(R.string.did_you_know), + description = stringRes(R.string.widget_description), + cta = stringRes(R.string.add_widget), ctaIcon = R.drawable.ic_custom_atom_s, backgroundColor = GreenLight, hasDismiss = true, @@ -121,11 +120,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 5 }, - title = "Set a budget", - description = "Ivy Wallet not only helps you to passively track your expenses" + - " but also proactively create your financial future by setting budgets" + - " and sticking to them.", - cta = "Add budget", + title = stringRes(R.string.set_a_budget), + description = stringRes(R.string.set_a_budget_description), + cta = stringRes(R.string.add_budget), ctaIcon = R.drawable.ic_budget_xs, backgroundColor = Green2, hasDismiss = true, @@ -139,9 +136,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 7 }, - title = "Did you know?", - description = "You can see your expenses structure by categories! Try it, tap the gray/black \"Expenses\" button just below your balance.", - cta = "Expenses PieChart", + title = stringRes(R.string.did_you_know), + description = stringRes(R.string.expenses_piechart_description), + cta = stringRes(R.string.expenses_piechart), ctaIcon = R.drawable.ic_custom_bills_s, backgroundColor = Red, hasDismiss = true, @@ -155,11 +152,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 10 }, - title = "Review Ivy Wallet", - description = "Give us your feedback! Help Ivy Wallet become better and grow by writing us a review." + - " Compliments, ideas, and critics are all welcome!" + - " We do our best.\n\nCheers,\nIvy Team", - cta = "Rate us on Google Play", + title = stringRes(R.string.review_ivy_wallet), + description = stringRes(R.string.review_ivy_wallet_description), + cta = stringRes(R.string.rate_us_on_google_play), ctaIcon = R.drawable.ic_custom_star_s, backgroundColor = Green, hasDismiss = true, @@ -173,10 +168,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 14 }, - title = "Share Ivy Wallet", - description = "Help us grow so we can invest more in development and make the app better for you." + - " By sharing Ivy Wallet you'll make two developers happy and also help a friend to take control of their finances.", - cta = "Share with friends", + title = stringRes(R.string.share_ivy_wallet), + description = stringRes(R.string.help_us_grow), + cta = stringRes(R.string.share_with_friends), ctaIcon = R.drawable.ic_custom_family_s, backgroundColor = Red3, hasDismiss = true, @@ -207,11 +201,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 18 }, - title = "Did you know?", - description = "You can generate reports to get deep insights about your income and spending." + - " Filter your transactions by type, time period, category, accounts, amount, keywords and more" + - " to gain better view on your finances.", - cta = "Make a report", + title = stringRes(R.string.did_you_know), + description = stringRes(R.string.make_a_report_description), + cta = stringRes(R.string.make_a_report), ctaIcon = R.drawable.ic_statistics_xs, backgroundColor = Green2, hasDismiss = true, @@ -225,12 +217,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 22 }, - title = "Review Ivy Wallet", - description = "Want to make Ivy Wallet better? Write us a review." + - " That's the only way for us to develop what you want and need." + - " Also it help us rank higher in the PlayStore so we can spend money on the product rather than marketing." + - "\n\nWe do our best.\nIvy Team", - cta = "Rate us on Google Play", + title = stringRes(R.string.review_ivy_wallet), + description = stringRes(R.string.make_ivy_wallet_better_description), + cta = stringRes(R.string.rate_us_on_google_play), ctaIcon = R.drawable.ic_custom_star_s, backgroundColor = GreenLight, hasDismiss = true, @@ -244,13 +233,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 24 }, - title = "We need your help!", - description = "We're just a designer and a developer" + - " working on the app after our 9-5 jobs. Currently, we invest a lot of time and money" + - " to generate only losses and exhaustion." + - " If you want us to keep developing Ivy Wallet please share it with friends and family." + - "\n\nP.S. Google PlayStore reviews also helps a lot!", - cta = "Share Ivy Wallet", + title = stringRes(R.string.we_need_your_help), + description = stringRes(R.string.we_need_your_help_description), + cta = stringRes(R.string.share_ivy_wallet), ctaIcon = R.drawable.ic_custom_family_s, backgroundColor = Purple2, hasDismiss = true, @@ -264,11 +249,9 @@ class CustomerJourneyLogic( condition = { trnCount, _, _ -> trnCount >= 28 }, - title = "Ivy Wallet is open-source!", - description = "Ivy Wallet's code is open and everyone can see it." + - " We believe that transparency and ethics are must for every software product." + - " If you like our work and want to make the app better you can contribute in our public Github repository.", - cta = "Contribute", + title = stringRes(R.string.ivy_wallet_is_opensource), + description = stringRes(R.string.ivy_wallet_is_opensource_description), + cta = stringRes(R.string.contribute), ctaIcon = R.drawable.github_logo, backgroundColor = Blue3, hasDismiss = true, diff --git a/app/src/main/java/com/ivy/wallet/domain/logic/PreloadDataLogic.kt b/app/src/main/java/com/ivy/wallet/domain/logic/PreloadDataLogic.kt index 73d328f5fe..06b7ac2620 100644 --- a/app/src/main/java/com/ivy/wallet/domain/logic/PreloadDataLogic.kt +++ b/app/src/main/java/com/ivy/wallet/domain/logic/PreloadDataLogic.kt @@ -1,12 +1,14 @@ package com.ivy.wallet.domain.logic import androidx.compose.ui.graphics.toArgb +import com.ivy.wallet.R import com.ivy.wallet.domain.data.entity.Account import com.ivy.wallet.domain.data.entity.Category import com.ivy.wallet.domain.logic.model.CreateAccountData import com.ivy.wallet.domain.logic.model.CreateCategoryData import com.ivy.wallet.io.persistence.dao.AccountDao import com.ivy.wallet.io.persistence.dao.CategoryDao +import com.ivy.wallet.stringRes import com.ivy.wallet.ui.onboarding.model.AccountBalance import com.ivy.wallet.ui.theme.* @@ -24,7 +26,7 @@ class PreloadDataLogic( fun preloadAccounts() { val cash = Account( - name = "Cash", + name = stringRes(R.string.cash), currency = null, color = Green.toArgb(), icon = "cash", @@ -33,7 +35,7 @@ class PreloadDataLogic( ) val bank = Account( - name = "Bank", + name = stringRes(R.string.bank), currency = null, color = IvyDark.toArgb(), icon = "bank", @@ -47,21 +49,21 @@ class PreloadDataLogic( fun accountSuggestions(baseCurrency: String): List = listOf( CreateAccountData( - name = "Cash", + name = stringRes(R.string.cash), currency = baseCurrency, color = Green, icon = "cash", balance = 0.0 ), CreateAccountData( - name = "Bank", + name = stringRes(R.string.bank), currency = baseCurrency, color = IvyDark, icon = "bank", balance = 0.0 ), CreateAccountData( - name = "Revolut", + name = stringRes(R.string.revoult), currency = baseCurrency, color = Blue, icon = "revolut", @@ -81,61 +83,61 @@ class PreloadDataLogic( private fun preloadCategoriesCreateData() = listOf( CreateCategoryData( - name = "Food & Drinks", + name = stringRes(R.string.food_drinks), color = Green, icon = "fooddrink" ), CreateCategoryData( - name = "Bills & Fees", + name = stringRes(R.string.bills_fees), color = Red, icon = "bills" ), CreateCategoryData( - name = "Transport", + name = stringRes(R.string.transport), color = YellowLight, icon = "transport" ), CreateCategoryData( - name = "Groceries", + name = stringRes(R.string.groceries), color = GreenLight, icon = "groceries" ), CreateCategoryData( - name = "Entertainment", + name = stringRes(R.string.entertainment), color = Orange, icon = "game" ), CreateCategoryData( - name = "Shopping", + name = stringRes(R.string.shopping), color = Ivy, icon = "shopping" ), CreateCategoryData( - name = "Gifts", + name = stringRes(R.string.gifts), color = RedLight, icon = "gift" ), CreateCategoryData( - name = "Health", + name = stringRes(R.string.health), color = IvyLight, icon = "health" ), CreateCategoryData( - name = "Investments", + name = stringRes(R.string.investments), color = IvyDark, icon = "leaf" ), CreateCategoryData( - name = "Loans", + name = stringRes(R.string.loans), color = BlueDark, icon = "loan" ), @@ -159,91 +161,91 @@ class PreloadDataLogic( .plus( listOf( CreateCategoryData( - name = "Car", + name = stringRes(R.string.car), color = Blue3, icon = "vehicle" ), CreateCategoryData( - name = "Work", + name = stringRes(R.string.work), color = Blue2Light, icon = "work" ), CreateCategoryData( - name = "Home", + name = stringRes(R.string.home), color = Green2, icon = "house" ), CreateCategoryData( - name = "Restaurant", + name = stringRes(R.string.restaurant), color = Orange3, icon = "restaurant" ), CreateCategoryData( - name = "Family", + name = stringRes(R.string.family), color = Red3Light, icon = "family" ), CreateCategoryData( - name = "Social Life", + name = stringRes(R.string.social_life), color = Blue2, icon = "people" ), CreateCategoryData( - name = "Order food", + name = stringRes(R.string.order_food), color = Orange2, icon = "orderfood2" ), CreateCategoryData( - name = "Travel", + name = stringRes(R.string.travel), color = BlueLight, icon = "travel" ), CreateCategoryData( - name = "Fitness", + name = stringRes(R.string.fitness), color = Purple2, icon = "fitness" ), CreateCategoryData( - name = "Self-development", + name = stringRes(R.string.self_development), color = Yellow, icon = "selfdevelopment" ), CreateCategoryData( - name = "Clothes", + name = stringRes(R.string.clothes), color = Green2Light, icon = "clothes2" ), CreateCategoryData( - name = "Beauty", + name = stringRes(R.string.beauty), color = Red3, icon = "makeup" ), CreateCategoryData( - name = "Education", + name = stringRes(R.string.education), color = Blue, icon = "education" ), CreateCategoryData( - name = "Pet", + name = stringRes(R.string.pet), color = Orange3Light, icon = "pet" ), CreateCategoryData( - name = "Sports", + name = stringRes(R.string.sports), color = Purple1, icon = "sports" ), diff --git a/app/src/main/java/com/ivy/wallet/domain/logic/WalletAccountLogic.kt b/app/src/main/java/com/ivy/wallet/domain/logic/WalletAccountLogic.kt index 0fa61b151a..493cedf7b2 100644 --- a/app/src/main/java/com/ivy/wallet/domain/logic/WalletAccountLogic.kt +++ b/app/src/main/java/com/ivy/wallet/domain/logic/WalletAccountLogic.kt @@ -1,5 +1,6 @@ package com.ivy.wallet.domain.logic +import com.ivy.wallet.R import com.ivy.wallet.domain.data.TransactionHistoryItem import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.data.entity.Account @@ -8,6 +9,7 @@ import com.ivy.wallet.domain.logic.currency.ExchangeRatesLogic import com.ivy.wallet.io.persistence.dao.AccountDao import com.ivy.wallet.io.persistence.dao.SettingsDao import com.ivy.wallet.io.persistence.dao.TransactionDao +import com.ivy.wallet.stringRes import com.ivy.wallet.ui.onboarding.model.FromToTimeRange import com.ivy.wallet.ui.onboarding.model.filterOverdue import com.ivy.wallet.ui.onboarding.model.filterUpcoming @@ -29,7 +31,7 @@ class WalletAccountLogic( actualBalance: Double = calculateAccountBalance(account), newBalance: Double, - adjustTransactionTitle: String = "Adjust balance", + adjustTransactionTitle: String = stringRes(R.string.adjust_balance), isFiat: Boolean? = null, trnIsSyncedFlag: Boolean = false, //TODO: Remove this once Bank Integration trn sync is properly implemented diff --git a/app/src/main/java/com/ivy/wallet/domain/logic/loantrasactions/LoanTransactionsCore.kt b/app/src/main/java/com/ivy/wallet/domain/logic/loantrasactions/LoanTransactionsCore.kt index 317573060c..4d0b3e2caa 100644 --- a/app/src/main/java/com/ivy/wallet/domain/logic/loantrasactions/LoanTransactionsCore.kt +++ b/app/src/main/java/com/ivy/wallet/domain/logic/loantrasactions/LoanTransactionsCore.kt @@ -1,12 +1,14 @@ package com.ivy.wallet.domain.logic.loantrasactions import androidx.compose.ui.graphics.toArgb +import com.ivy.wallet.R import com.ivy.wallet.domain.data.LoanType import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.data.entity.* import com.ivy.wallet.domain.logic.currency.ExchangeRatesLogic import com.ivy.wallet.domain.sync.uploader.TransactionUploader import com.ivy.wallet.io.persistence.dao.* +import com.ivy.wallet.stringRes import com.ivy.wallet.ui.IvyWalletCtx import com.ivy.wallet.ui.theme.components.IVY_COLOR_PICKER_COLORS_FREE import com.ivy.wallet.utils.computationThread @@ -192,7 +194,7 @@ class LoanTransactionsCore( } ?: if (ivyContext.isPremium || categoryList.size < 12) { addCategoryToDb = true Category( - "Loans", + stringRes(R.string.loans), color = IVY_COLOR_PICKER_COLORS_FREE[4].toArgb(), icon = "loan" ) diff --git a/app/src/main/java/com/ivy/wallet/domain/logic/notification/TransactionReminderWorker.kt b/app/src/main/java/com/ivy/wallet/domain/logic/notification/TransactionReminderWorker.kt index 46e1e0f823..71964bbf66 100644 --- a/app/src/main/java/com/ivy/wallet/domain/logic/notification/TransactionReminderWorker.kt +++ b/app/src/main/java/com/ivy/wallet/domain/logic/notification/TransactionReminderWorker.kt @@ -6,10 +6,12 @@ import androidx.core.app.NotificationCompat import androidx.hilt.work.HiltWorker import androidx.work.CoroutineWorker import androidx.work.WorkerParameters +import com.ivy.wallet.R import com.ivy.wallet.android.notification.IvyNotificationChannel import com.ivy.wallet.android.notification.NotificationService import com.ivy.wallet.io.persistence.SharedPrefs import com.ivy.wallet.io.persistence.dao.TransactionDao +import com.ivy.wallet.stringRes import com.ivy.wallet.ui.RootActivity import com.ivy.wallet.utils.atEndOfDay import com.ivy.wallet.utils.dateNowUTC @@ -68,9 +70,9 @@ class TransactionReminderWorker @AssistedInject constructor( private fun randomText(): String = listOf( - "Have you made any transactions today? \uD83C\uDFC1", - "Did you track your expenses today? \uD83D\uDCB8", - "Have you recorded your transactions today? \uD83C\uDFC1", + stringRes(R.string.notification_1), + stringRes(R.string.notification_2), + stringRes(R.string.notification_3), ).shuffled().first() private fun fetchShowNotifications(): Boolean = diff --git a/app/src/main/java/com/ivy/wallet/ui/RootActivity.kt b/app/src/main/java/com/ivy/wallet/ui/RootActivity.kt index 71134d91ab..0b0a0f927d 100644 --- a/app/src/main/java/com/ivy/wallet/ui/RootActivity.kt +++ b/app/src/main/java/com/ivy/wallet/ui/RootActivity.kt @@ -45,6 +45,7 @@ import com.ivy.design.navigation.Navigation import com.ivy.design.navigation.Screen import com.ivy.wallet.BuildConfig import com.ivy.wallet.Constants +import com.ivy.wallet.R import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.logic.CustomerJourneyLogic import com.ivy.wallet.ui.analytics.AnalyticsReport @@ -390,10 +391,10 @@ class RootActivity : AppCompatActivity() { val promptInfo = BiometricPrompt.PromptInfo.Builder() .setTitle( - "Authentication required" + getString(R.string.authentication_required) ) .setSubtitle( - "Prove that you have access to this device to unlock the app." + getString(R.string.authentication_required_description) ) .setAllowedAuthenticators( BiometricManager.Authenticators.BIOMETRIC_WEAK or diff --git a/app/src/main/java/com/ivy/wallet/ui/RootViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/RootViewModel.kt index 7967fd8e0a..edaa1b9c89 100644 --- a/app/src/main/java/com/ivy/wallet/ui/RootViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/RootViewModel.kt @@ -8,6 +8,7 @@ import androidx.lifecycle.viewModelScope import com.ivy.design.l0_system.Theme import com.ivy.design.navigation.Navigation import com.ivy.wallet.Constants +import com.ivy.wallet.R import com.ivy.wallet.android.billing.IvyBilling import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.logic.PaywallLogic @@ -16,6 +17,7 @@ import com.ivy.wallet.io.network.IvyAnalytics import com.ivy.wallet.io.network.IvySession import com.ivy.wallet.io.persistence.SharedPrefs import com.ivy.wallet.io.persistence.dao.SettingsDao +import com.ivy.wallet.stringRes import com.ivy.wallet.utils.TestIdlingResource import com.ivy.wallet.utils.ioThread import com.ivy.wallet.utils.readOnly @@ -116,13 +118,13 @@ class RootViewModel @Inject constructor( ): BiometricPrompt.AuthenticationCallback { return object : BiometricPrompt.AuthenticationCallback() { override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) { - Timber.d("Authentication succeeded!") + Timber.d(stringRes(R.string.authentication_succeeded)) unlockApp() onAuthSuccess() } override fun onAuthenticationFailed() { - Timber.d("Authentication failed.") + Timber.d(stringRes(R.string.authentication_failed)) } override fun onAuthenticationError(errorCode: Int, errString: CharSequence) { diff --git a/app/src/main/java/com/ivy/wallet/utils/DateExt.kt b/app/src/main/java/com/ivy/wallet/utils/DateExt.kt index 22519154f6..92b9d386e6 100644 --- a/app/src/main/java/com/ivy/wallet/utils/DateExt.kt +++ b/app/src/main/java/com/ivy/wallet/utils/DateExt.kt @@ -3,6 +3,8 @@ package com.ivy.wallet.utils import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext +import com.ivy.wallet.R +import com.ivy.wallet.stringRes import java.time.* import java.time.format.DateTimeFormatter import java.util.* @@ -50,13 +52,13 @@ fun LocalDateTime.formatNicely( return when (this.toLocalDate()) { today -> { - "Today, ${this.formatLocal(patternNoWeekDay, zone)}" + stringRes(R.string.today_date, this.formatLocal(patternNoWeekDay, zone)) } today.minusDays(1) -> { - "Yesterday, ${this.formatLocal(patternNoWeekDay, zone)}" + stringRes(R.string.yesterday_date, this.formatLocal(patternNoWeekDay, zone)) } today.plusDays(1) -> { - "Tomorrow, ${this.formatLocal(patternNoWeekDay, zone)}" + stringRes(R.string.tomorrow_date, this.formatLocal(patternNoWeekDay, zone)) } else -> { if (isThisYear) { @@ -87,13 +89,13 @@ fun LocalDateTime.formatNicelyWithTime( return when (this.toLocalDate()) { today -> { - "Today, ${this.formatLocal(patternNoWeekDay, zone)}" + stringRes(R.string.today_date, this.formatLocal(patternNoWeekDay, zone)) } today.minusDays(1) -> { - "Yesterday, ${this.formatLocal(patternNoWeekDay, zone)}" + stringRes(R.string.yesterday_date, this.formatLocal(patternNoWeekDay, zone)) } today.plusDays(1) -> { - "Tomorrow, ${this.formatLocal(patternNoWeekDay, zone)}" + stringRes(R.string.tomorrow, this.formatLocal(patternNoWeekDay, zone)) } else -> { if (isThisYear) { @@ -140,13 +142,13 @@ fun LocalDate.closeDay(): String? { val today = dateNowUTC() return when (this) { today -> { - "Today" + stringRes(R.string.today) } today.minusDays(1) -> { - "Yesterday" + stringRes(R.string.yesterday) } today.plusDays(1) -> { - "Tomorrow" + stringRes(R.string.tomorrow) } else -> { null @@ -235,7 +237,7 @@ fun LocalDateTime.timeLeft( secondsLabel: String = "s" ): String { val timeLeftMs = this.millis() - from.millis() - if (timeLeftMs <= 0) return "Expired" + if (timeLeftMs <= 0) return stringRes(R.string.expired) val days = TimeUnit.MILLISECONDS.toDays(timeLeftMs) var timeLeftAfterCalculations = timeLeftMs - TimeUnit.DAYS.toMillis(days) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 551907488a..9c3231ae77 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -162,7 +162,7 @@ Your personal money manager #opensource Error. Try again: %1$s - Signing in... + Signing in… Success! Login with Google Offline account @@ -332,4 +332,70 @@ Submit What do you need? Explain it in one sentence. (supports markdown) + Last 12 months + Last 6 months + Last 4 weeks + Last 7 days + Today, %1$s + Yesterday, %1$s + Tomorrow, %1$s + Expired + Authentication succeeded! + Authentication failed. + Have you made any transactions today? 🏁 + Did you track your expenses today? πŸ’Έ + Have you recorded your transactions today? 🏁 + Cash + Bank + Revolut + + + Transport + Groceries + Entertainment + Shopping + Gifts + Health + Investments + Car + Work + Restaurant + Family + Social Life + Order food + Travel + Fitness + Self-development + Clothes + Beauty + Education + Pet + Sports + Adjust your initial balance + To accounts + Tap an account -> Tap its balance -> Enter current balance. That\'s it!]]> + Create your first planned payment + Automate the tracking of recurring transactions like your subscriptions, rent, salary, etc. Stay ahead of your finances by knowing how much you have to pay/get in advance. + Did you know? + Ivy Wallet has a cool widget that lets you add INCOME/EXPENSES/TRANSFER transactions with 1-click from your home\n\nNote: If the "Add widget" button doesn't work, please add it manually from your launcher's widgets menu. + Add widget + Set a budget + Ivy Wallet not only helps you to passively track your expenses but also proactively create your financial future by setting budgets and sticking to them. + You can see your expenses structure by categories! Try it, tap the gray/black Expenses button just below your balance. + Expenses PieChart + Review Ivy Wallet + Give us your feedback! Help Ivy Wallet become better and grow by writing us a review. Compliments, ideas, and critics are all welcome! We do our best.\n\nCheers,\nIvy Team + Help us grow so we can invest more in development and make the app better for you. By sharing Ivy Wallet you\'ll make two developers happy and also help a friend to take control of their finances. + Share with friends + You can generate reports to get deep insights about your income and spending. Filter your transactions by type, time period, category, accounts, amount, keywords and more to gain better view on your finances. + Make a report + Want to make Ivy Wallet better? Write us a review. That\'s the only way for us to develop what you want and need. Also it help us rank higher in the PlayStore so we can spend money on the product rather than marketing.\n\nWe do our best.\nIvy Team + We need your help! + We\'re just a designer and a developer working on the app after our 9–5 jobs. Currently, we invest a lot of time and money to generate only losses and exhaustion. If you want us to keep developing Ivy Wallet please share it with friends and family.\n\nP.S. Google PlayStore reviews also helps a lot! + Ivy Wallet is open-source! + Ivy Wallet\'s code is open and everyone can see it. We believe that transparency and ethics are must for every software product. If you like our work and want to make the app better you can contribute in our public Github repository. + Contribute + Adjust balance + Authentication required + Prove that you have access to this device to unlock the app.