Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,8 @@ public void setHelpDelegate(Runnable aDelegate) {
}
}

public void setDescription(@NonNull String description) {
mSwitchDescription.setText(description);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -737,17 +737,7 @@ public void showButtonPrompt(String title, @NonNull String msg, @NonNull String[
mConfirmPrompt.show(REQUEST_FOCUS);
}

public void showAppDialog(@NonNull @StringRes int title, @NonNull @StringRes int description, @NonNull @StringRes int [] btnMsg, @NonNull AppDialogWidget.Delegate callback) {
mAppDialog = new AppDialogWidget(getContext());
mAppDialog.mWidgetPlacement.parentHandle = getHandle();
mAppDialog.setTitle(title);
mAppDialog.setMessage(description);
mAppDialog.setButtons(btnMsg);
mAppDialog.setDelegate(callback);
mAppDialog.show(REQUEST_FOCUS);
}

public void showAppDialog(@NonNull String title, @NonNull String description, @NonNull String[] btnMsg, @NonNull AppDialogWidget.Delegate callback) {
public void showAppDialog(@NonNull String title, @NonNull @StringRes int description, @NonNull @StringRes int [] btnMsg, @NonNull AppDialogWidget.Delegate callback) {
mAppDialog = new AppDialogWidget(getContext());
mAppDialog.mWidgetPlacement.parentHandle = getHandle();
mAppDialog.setTitle(title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public void show(@ShowFlags int aShowFlags) {

} else {
mWidgetManager.getFocusedWindow().showAppDialog(
R.string.voice_samples_collect_dialog_title,
getResources().getString(R.string.voice_samples_collect_dialog_title, getResources().getString(R.string.app_name)),
R.string.voice_samples_collect_dialog_description,
new int[]{
R.string.voice_samples_collect_dialog_do_not_allow,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,8 @@ public void setHelpClickListener(@NonNull View.OnClickListener listener) {
mBinding.setHelpClickListener(listener);
}

public void setTitle(@NonNull String title) {
mBinding.setTitle(title);
}

}
2 changes: 1 addition & 1 deletion app/src/main/res/layout/options_language_display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:title="@string/settings_language_choose_language_display_title" />
app:title="@{String.format(@string/settings_language_choose_language_display_title, @string/app_name)}" />

<ScrollView
android:id="@+id/scrollbar"
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/options_privacy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
style="@style/settingsDescription"
android:height="40dp"
android:gravity="center_vertical"
android:text="@string/security_options_speech_data_title" />
android:text="@{String.format(@string/security_options_speech_data_title, @string/app_name)}" />

<org.mozilla.vrbrowser.ui.views.settings.SwitchSetting
android:id="@+id/speechDataSwitch"
Expand All @@ -124,7 +124,7 @@
android:layout_marginStart="40dp"
app:on_text="@string/permission_allow"
app:off_text="@string/permission_reject"
app:description="@string/security_options_speech_data" />
app:description="@{String.format(@string/security_options_speech_data, @string/app_name)}" />

<org.mozilla.vrbrowser.ui.views.settings.SwitchSetting
android:id="@+id/telemetryDataSwitch"
Expand All @@ -133,7 +133,7 @@
android:layout_marginStart="40dp"
app:on_text="@string/permission_allow"
app:off_text="@string/permission_reject"
app:description="@string/security_options_telemetry_data" />
app:description="@{String.format(@string/security_options_telemetry_data, @string/app_name)}" />

<org.mozilla.vrbrowser.ui.views.settings.SwitchSetting
android:id="@+id/crashReportsDataSwitch"
Expand All @@ -142,7 +142,7 @@
android:layout_marginStart="40dp"
app:on_text="@string/permission_allow"
app:off_text="@string/permission_reject"
app:description="@string/security_options_crash_reports_data" />
app:description="@{String.format(@string/security_options_crash_reports_data, @string/app_name)}" />

</LinearLayout>
</ScrollView>
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
'Firefox Display Language' dialog window (accessible from the browser's Settings dialog window).
Below this string appears a list of locales for the user to choose as their preferred display
language for the application UI. -->
<string name="settings_language_choose_language_display_title">Firefox Display Language</string>
<string name="settings_language_choose_language_display_title">%1$s Display Language</string>

<!-- This string is used to label a text label that appears in the header description of 'Language Settings' ->
'Firefox Display Language' dialog window (accessible from the browser's Settings dialog window).
Expand Down Expand Up @@ -476,20 +476,20 @@

<!-- This string is a label above the group of switches that indicates that the switches below
relate to Firefox data collection and use. -->
<string name="security_options_speech_data_title">Firefox Data Collection and Use</string>
<string name="security_options_speech_data_title">%1$s Data Collection and Use</string>

<!-- This string labels an Allow/Don't Allow switch in the Privacy and Security settings dialog
and is used to enable or disable permission to collect speech data. -->
<string name="security_options_speech_data">Allow Firefox to collect speech data</string>
<string name="security_options_speech_data">Allow %1$s to collect speech data</string>

<!-- This string labels an Allow/Don't Allow switch in the Privacy and Security settings dialog
and is used to enable or disable permission to collect telemetry data. -->
<string name="security_options_telemetry_data">Allow Firefox to send technical and interaction data to Mozilla
<string name="security_options_telemetry_data">Allow %1$s to send technical and interaction data to Mozilla
</string>

<!-- This string labels an Allow/Don't Allow switch in the Privacy and Security settings dialog
and is used to enable or disable permission to send crash reports. -->
<string name="security_options_crash_reports_data">Allow Firefox to send backlogged crash reports on your behalf
<string name="security_options_crash_reports_data">Allow %1$s to send backlogged crash reports on your behalf
</string>

<!-- This string is displayed below the On/Off switch to indicate a switch's current state as 'On'. -->
Expand Down Expand Up @@ -860,7 +860,7 @@

<!-- This string is displayed in the title of the Voice Search samples collect dialog. That dialog is shown the first time
a user tries to use the voice search. -->
<string name="voice_samples_collect_dialog_title">Allow Firefox Reality to Collect Voice Samples for Research?</string>
<string name="voice_samples_collect_dialog_title">Allow %1$s to Collect Voice Samples for Research?</string>

<!-- This string is displayed in the description of the Voice Search samples collect dialog. That dialog is shown the first time
a user tries to use the voice search. -->
Expand Down