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 7b0a1bd5a8..1457d731d7 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,9 @@ 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 import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.theme.LocalDimensions @@ -49,7 +51,10 @@ internal fun EmptyView(newAccount: Boolean) { Text( stringResource(R.string.onboardingBubbleWelcomeToSession).let { txt -> val c = LocalContext.current - Phrase.from(txt).put(APP_NAME_KEY, c.getString(R.string.app_name)).format().toString() + Phrase.from(txt) + .put(APP_NAME_KEY, c.getString(R.string.app_name)) + .put(EMOJI_KEY, WAVING_HAND_EMOJI) + .format().toString() }, style = LocalType.current.base, color = LocalColors.current.primary, 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 0bd011a162..9a478e6ecc 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,7 +37,10 @@ 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 import org.thoughtcrime.securesms.ui.DialogButtonModel import org.thoughtcrime.securesms.ui.GetString @@ -132,12 +135,28 @@ internal fun LandingScreen( key = { it.stringId } ) { item -> // Perform string substitution only in the bubbles that require it - val bubbleTxt = if (item.stringId == R.string.onboardingBubbleWelcomeToSession || - item.stringId == R.string.onboardingBubbleSessionIsEngineered) { - Phrase.from(stringResource(item.stringId)).put(APP_NAME_KEY, stringResource(R.string.app_name)).format().toString() - } else { - stringResource(item.stringId) + val bubbleTxt = when (item.stringId) { + R.string.onboardingBubbleWelcomeToSession -> { + Phrase.from(stringResource(item.stringId)) + .put(APP_NAME_KEY, stringResource(R.string.app_name)) + .put(EMOJI_KEY, WAVING_HAND_EMOJI) + .format().toString() + } + R.string.onboardingBubbleSessionIsEngineered -> { + Phrase.from(stringResource(item.stringId)) + .put(APP_NAME_KEY, stringResource(R.string.app_name)) + .format().toString() + } + R.string.onboardingBubbleCreatingAnAccountIsEasy -> { + Phrase.from(stringResource(item.stringId)) + .put(EMOJI_KEY, BACKHAND_INDEX_POINTING_DOWN_EMOJI) + .format().toString() + } + else -> { + stringResource(item.stringId) + } } + AnimateMessageText( bubbleTxt, item.isOutgoing 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 da23762e0c..69041a35e7 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/NonTranslatableStringConstants.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/NonTranslatableStringConstants.kt @@ -1,14 +1,16 @@ package org.session.libsession.utilities -// Non-translatable strings for use with the UI +// Non-translatable strings for UI substitutions object NonTranslatableStringConstants { - const val APP_NAME = "Session" - const val ARBISCAN = "Arbiscan" - const val ARBITRUM = "Arbitrum" - const val DEBUG_MENU = "Debug Menu" - const val ETHEREUM = "Ethereum" - const val NETWORK_NAME = "Session Network" - const val TOKEN_NAME_LONG = "Session Token" - const val TOKEN_NAME_LONG_PLURAL = "Session Tokens" - const val TOKEN_NAME_SHORT = "SENT" + const val APP_NAME = "Session" + const val ARBISCAN = "Arbiscan" + const val ARBITRUM = "Arbitrum" + const val DEBUG_MENU = "Debug Menu" + const val ETHEREUM = "Ethereum" + const val NETWORK_NAME = "Session Network" + const val TOKEN_NAME_LONG = "Session Token" + const val TOKEN_NAME_LONG_PLURAL = "Session Tokens" + const val TOKEN_NAME_SHORT = "SENT" + 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 diff --git a/libsession/src/main/res/values/strings.xml b/libsession/src/main/res/values/strings.xml index 524c808fb2..c2a6c520b4 100644 --- a/libsession/src/main/res/values/strings.xml +++ b/libsession/src/main/res/values/strings.xml @@ -613,11 +613,11 @@ NOTE: Strings with blank lines have manually been replaced with '\n\n' - this wi I have an account You cannot go back further. In order to cancel your account creation, {app_name} needs to quit. You cannot go back further. In order to stop loading your account, {app_name} needs to quit. - Creating an account is instant, free, and anonymous + Creating an account is instant, free, and anonymous {emoji} You don\'t even need a phone number to sign up. Privacy in your pocket. {app_name} is engineered to protect your privacy. - Welcome to {app_name} + Welcome to {app_name} {emoji} Hit the plus button to start a chat, create a group, or join an official community! There are two ways {app_name} can notify you of new messages. Privacy Policy