From 86f89f8c61aa5383c7c0bd408e00cf2480ae388a Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Wed, 4 Sep 2024 10:56:32 +1000 Subject: [PATCH] Updated constants file --- .../main/java/org/thoughtcrime/securesms/home/EmptyView.kt | 3 +-- .../thoughtcrime/securesms/onboarding/landing/Landing.kt | 6 ++---- .../thoughtcrime/securesms/preferences/SettingsActivity.kt | 2 +- .../libsession/utilities/NonTranslatableStringConstants.kt | 4 +++- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/EmptyView.kt b/app/src/main/java/org/thoughtcrime/securesms/home/EmptyView.kt index 1457d731d7..2ab5cad673 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/EmptyView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/EmptyView.kt @@ -18,7 +18,6 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import com.squareup.phrase.Phrase import network.loki.messenger.R -import org.session.libsession.utilities.NonTranslatableStringConstants.WAVING_HAND_EMOJI import org.session.libsession.utilities.StringSubstitutionConstants.APP_NAME_KEY import org.session.libsession.utilities.StringSubstitutionConstants.EMOJI_KEY import org.thoughtcrime.securesms.ui.Divider @@ -53,7 +52,7 @@ internal fun EmptyView(newAccount: Boolean) { val c = LocalContext.current Phrase.from(txt) .put(APP_NAME_KEY, c.getString(R.string.app_name)) - .put(EMOJI_KEY, WAVING_HAND_EMOJI) + .put(EMOJI_KEY, "\uD83D\uDC4B") // this hardcoded emoji might be moved to NonTranslatableConstants eventually .format().toString() }, style = LocalType.current.base, diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt index 9a478e6ecc..aab1421185 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt @@ -37,8 +37,6 @@ import androidx.compose.ui.unit.dp import com.squareup.phrase.Phrase import kotlinx.coroutines.delay import network.loki.messenger.R -import org.session.libsession.utilities.NonTranslatableStringConstants.BACKHAND_INDEX_POINTING_DOWN_EMOJI -import org.session.libsession.utilities.NonTranslatableStringConstants.WAVING_HAND_EMOJI import org.session.libsession.utilities.StringSubstitutionConstants.APP_NAME_KEY import org.session.libsession.utilities.StringSubstitutionConstants.EMOJI_KEY import org.thoughtcrime.securesms.ui.AlertDialog @@ -139,7 +137,7 @@ internal fun LandingScreen( R.string.onboardingBubbleWelcomeToSession -> { Phrase.from(stringResource(item.stringId)) .put(APP_NAME_KEY, stringResource(R.string.app_name)) - .put(EMOJI_KEY, WAVING_HAND_EMOJI) + .put(EMOJI_KEY, "\uD83D\uDC4B") // this hardcoded emoji might be moved to NonTranslatableConstants eventually .format().toString() } R.string.onboardingBubbleSessionIsEngineered -> { @@ -149,7 +147,7 @@ internal fun LandingScreen( } R.string.onboardingBubbleCreatingAnAccountIsEasy -> { Phrase.from(stringResource(item.stringId)) - .put(EMOJI_KEY, BACKHAND_INDEX_POINTING_DOWN_EMOJI) + .put(EMOJI_KEY, "\uD83D\uDC47") // this hardcoded emoji might be moved to NonTranslatableConstants eventually .format().toString() } else -> { diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt index bfba7377a7..c6fa5998d0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt @@ -523,7 +523,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() { Column { // add the debug menu in non release builds if (BuildConfig.BUILD_TYPE != "release") { - LargeItemButton(DEBUG_MENU, R.drawable.ic_settings) { push() } + LargeItemButton("Debug Menu", R.drawable.ic_settings) { push() } Divider() } diff --git a/libsession/src/main/java/org/session/libsession/utilities/NonTranslatableStringConstants.kt b/libsession/src/main/java/org/session/libsession/utilities/NonTranslatableStringConstants.kt index 78691fb1a5..af63265e97 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/NonTranslatableStringConstants.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/NonTranslatableStringConstants.kt @@ -1,10 +1,12 @@ package org.session.libsession.utilities -// Non-translatable strings for UI substitutions + +// Non-translatable strings for use with the UI object NonTranslatableStringConstants { const val APP_NAME = "Session" const val DEBUG_MENU = "Debug Menu" const val GIF = "GIF" + const val SESSION_DOWNLOAD_URL = "https://getsession.org/download" const val WAVING_HAND_EMOJI = "\uD83D\uDC4B" // Used on the landing page & substituted into `onboardingBubbleWelcomeToSession` const val BACKHAND_INDEX_POINTING_DOWN_EMOJI = "\uD83D\uDC47" // Used on the landing page & substituted into `onboardingBubbleCreatingAnAccountIsEasy` } \ No newline at end of file