Backed out changeset ef5037b7a3cd (bug 1501571) requested by dev for concerns regarding localization. a=backout

This commit is contained in:
Daniel Varga 2018-10-30 13:21:59 +02:00
Родитель fc3d974254
Коммит 3105b9546c
3 изменённых файлов: 17 добавлений и 26 удалений

Просмотреть файл

@ -861,29 +861,23 @@ public class GeckoPreferences
pref.setEnabled(isHealthReportEnabled);
// Instruct the user on how to enable Health Report
final String healthReportSettingPath =
getString(R.string.pref_feature_tips_notification_enabling_path);
final String enableHealthReportHint =
getString(R.string.pref_feature_tips_notification_enabling_hint);
final int healthReportPathFirstCharIndex =
enableHealthReportHint.indexOf(healthReportSettingPath);
if (healthReportPathFirstCharIndex < 0) {
return;
}
final int healthReportPathLastCharIndex =
healthReportPathFirstCharIndex + healthReportSettingPath.length();
final SpannableString enableHealthReportBoldedHint =
new SpannableString(enableHealthReportHint);
enableHealthReportBoldedHint.setSpan(new StyleSpan(Typeface.BOLD),
healthReportPathFirstCharIndex, healthReportPathLastCharIndex,
Spannable.SPAN_INCLUSIVE_INCLUSIVE);
final String RIGHT_CHEVRON_SPACE_PADDED = " > ";
StringBuilder healthReportSettingPath = new StringBuilder()
.append(getString(R.string.pref_category_privacy_short))
.append(RIGHT_CHEVRON_SPACE_PADDED)
.append(getString(R.string.pref_category_datareporting))
.append(RIGHT_CHEVRON_SPACE_PADDED)
.append(getString(R.string.datareporting_fhr_title));
SpannableString boldSettingsLocation = new SpannableString(healthReportSettingPath);
boldSettingsLocation.setSpan(new StyleSpan(Typeface.BOLD),
0, healthReportSettingPath.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
SpannableStringBuilder summaryTextBuilder = new SpannableStringBuilder()
.append(getString(R.string.pref_feature_tips_notification_summary))
.append("\n\n")
.append(enableHealthReportBoldedHint);
.append(getString(R.string.pref_feature_tips_notification_enabling_hint))
.append(" ")
.append(boldSettingsLocation);
pref.setSummary(summaryTextBuilder);
}

Просмотреть файл

@ -290,12 +290,10 @@
<!-- Localization note (pref_feature_tips_notification_summary): Description of a new toggleable setting in Settings-Notifications screen.
Similar to the already existing "pref_whats_new_notification_summary"-->
<!ENTITY pref_feature_tips_notification_summary "Learn more about using &brandShortName; and other &vendorShortName; products">
<!-- Localization note (pref_feature_tips_notification_enabling_path):
Nothing to translate. Simple concatenation of already localized strings. Result is used below. -->
<!ENTITY pref_feature_tips_notification_enabling_path "&pref_category_privacy_short; > &pref_category_datareporting; > &datareporting_fhr_title;">
<!-- Localization note (pref_feature_tips_notification_enabling_hint):
Describe the action the user should do to enable this preference. -->
<!ENTITY pref_feature_tips_notification_enabling_hint2 "Turn on &pref_feature_tips_notification_enabling_path;">
Describe the action the user should do to enable this preference
Will be used in the context "<Turn on> ... to enable this feature" -->
<!ENTITY pref_feature_tips_notification_enabling_hint "Turn on">
<!-- Localization note (pref_category_experimental): Title of a sub category in the 'advanced' category
for experimental features. -->

Просмотреть файл

@ -224,8 +224,7 @@
<string name="pref_feature_tips_notification">&pref_feature_tips_notification;</string>
<string name="pref_feature_tips_notification_summary">&pref_feature_tips_notification_summary;</string>
<string name="pref_feature_tips_notification_enabling_path">&pref_feature_tips_notification_enabling_path;</string>
<string name="pref_feature_tips_notification_enabling_hint">&pref_feature_tips_notification_enabling_hint2;</string>
<string name="pref_feature_tips_notification_enabling_hint">&pref_feature_tips_notification_enabling_hint;</string>
<string name="pref_category_experimental">&pref_category_experimental;</string>