Updated constants file

This commit is contained in:
ThomasSession 2024-09-04 10:56:32 +10:00 committed by fanchao
parent 81f56de11c
commit 86f89f8c61
4 changed files with 7 additions and 8 deletions

View File

@ -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,

View File

@ -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 -> {

View File

@ -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<DebugActivity>() }
LargeItemButton("Debug Menu", R.drawable.ic_settings) { push<DebugActivity>() }
Divider()
}

View File

@ -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`
}