Unverified Commit bc5f0ac7 authored by liuche's avatar liuche Committed by GitHub
Browse files

#274-android-l10n: Update create account string to avoid partial translations. (#16065)


Co-authored-by: default avatarmcarare <mihai.carare.dev@gmail.com>
parent e514ede6
......@@ -6,7 +6,6 @@ package org.mozilla.fenix.settings.account
import android.Manifest
import android.os.Bundle
import android.text.Spanned
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
......@@ -26,7 +25,6 @@ import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.FenixSnackbar
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.addUnderline
import org.mozilla.fenix.ext.requireComponents
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.showToolbar
......@@ -125,17 +123,10 @@ class TurnOnSyncFragment : Fragment(), AccountObserver {
DefaultSyncController(activity = activity as HomeActivity)
)
val createAccountActionText = getString(R.string.sign_in_create_account_link)
val fullText = getString(R.string.sign_in_create_account_text, createAccountActionText)
val spanStart = fullText.indexOf(createAccountActionText, 0, false)
val spanEnd = spanStart + createAccountActionText.length
view.createAccount.apply {
text = fullText
addUnderline(
spanStart,
spanEnd,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
text = HtmlCompat.fromHtml(
getString(R.string.sign_in_create_account_text),
HtmlCompat.FROM_HTML_MODE_LEGACY
)
setOnClickListener(createAccountClickListener)
}
......
......@@ -1144,11 +1144,8 @@
<string name="sign_in_with_camera">Sign in with your camera</string>
<!-- Text shown for settings option for sign with email -->
<string name="sign_in_with_email">Use email instead</string>
<!-- Text shown for settings option for create new account description.
'Firefox' intentionally hardcoded here. %s is to be replaced with the create account link text-->
<string name="sign_in_create_account_text">No account? %s to sync Firefox between devices.</string>
<!--Text shown for settings option for create new account link -->
<string name="sign_in_create_account_link">Create one</string>
<!-- Text shown for settings option for create new account text.'Firefox' intentionally hardcoded here.-->
<string name="sign_in_create_account_text"><![CDATA[No account? <u>Create one</u> to sync Firefox between devices.]]></string>
<!-- Text shown in confirmation dialog to sign out of account -->
<string name="sign_out_confirmation_message">Firefox will stop syncing with your account, but won’t delete any of your browsing data on this device.</string>
<!-- Text shown in confirmation dialog to sign out of account. The first parameter is the name of the app (e.g. Firefox Preview) -->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment