Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c20089e4 authored by Yasin Kilicdere's avatar Yasin Kilicdere Committed by Android (Google) Code Review
Browse files

Merge "Singularization of duplicated multi user strings." into tm-dev

parents 5459451c 625a463b
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -398,9 +398,6 @@
    <!-- Title for a work profile. [CHAR LIMIT=25] -->
    <string name="managed_user_title">All work apps</string>

    <!-- Title for Guest user [CHAR LIMIT=35] -->
    <string name="user_guest">Guest</string>

    <!-- Manage apps, individual app screen, substituted for the application's label when the app's label CAN NOT be determined.-->
    <string name="unknown">Unknown</string>

@@ -1421,16 +1418,18 @@
    <!-- Title for the preference to enter the nickname of the user to display in the user switcher [CHAR LIMIT=25]-->
    <string name="user_nickname">Nickname</string>

    <!-- Label for adding a new user in the user switcher [CHAR LIMIT=35] -->
    <string name="user_add_user">Add user</string>
    <!-- Label for adding a new guest in the user switcher [CHAR LIMIT=35] -->
    <string name="guest_new_guest">Add guest</string>
    <!-- Label for exiting and removing the guest session in the user switcher [CHAR LIMIT=35] -->
    <string name="guest_exit_guest">Remove guest</string>
    <!-- Label for resetting guest session in the user switcher, which will remove all data from the current guest session [CHAR LIMIT=35] -->
    <string name="guest_reset_guest">Reset guest</string>
    <!-- Name for the guest user [CHAR LIMIT=35] -->
    <string name="guest_nickname">Guest</string>
    <!-- Title of the confirmation dialog to confirm resetting guest. [CHAR LIMIT=NONE] -->
    <string name="guest_reset_guest_dialog_title">Reset guest?</string>
    <!-- Title of the confirmation dialog to confirm removing guest. [CHAR LIMIT=NONE] -->
    <string name="guest_remove_guest_dialog_title">Remove guest?</string>
    <!-- Label for button in confirmation dialog when resetting guest user [CHAR LIMIT=35] -->
    <string name="guest_reset_guest_confirm_button">Reset</string>
    <!-- Status message indicating the device is in the process of resetting the guest user. [CHAR_LIMIT=NONE] -->
@@ -1442,6 +1441,15 @@
    <!-- Accessibility message for the photo selector which is a button/popup with the current photo [CHAR LIMIT=50] -->
    <string name="user_image_photo_selector">Select photo</string>

    <!-- Content of the dialog shown when the user has failed to provide the device lock too many times and the device is wiped. [CHAR LIMIT=NONE] -->
    <string name="failed_attempts_now_wiping_device">Too many incorrect attempts. This device\'s data will be deleted.</string>
    <!-- Content of the dialog shown when the user has failed to provide the user lock too many times and the user is removed. [CHAR LIMIT=NONE] -->
    <string name="failed_attempts_now_wiping_user">Too many incorrect attempts. This user will be deleted.</string>
    <!-- Content of the dialog shown when the user has failed to provide the work lock too many times and the work profile is removed. [CHAR LIMIT=NONE] -->
    <string name="failed_attempts_now_wiping_profile">Too many incorrect attempts. This work profile and its data will be deleted.</string>
    <!-- Button label to dismiss the dialog telling the user the work profile has been wiped. [CHAR LIMIT=40] -->
    <string name="failed_attempts_now_wiping_dialog_dismiss">Dismiss</string>

    <!-- List entry in developer settings to choose default device/system behavior for the app freezer [CHAR LIMIT=30]-->
    <string name="cached_apps_freezer_device_default">Device default</string>
    <!-- List entry in developer settings to disable the app freezer in developer settings [CHAR LIMIT=30]-->
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ public class Utils {
                    ? getUpdatableManagedUserTitle(context)
                    : context.getString(R.string.managed_user_title);
        } else if (info.isGuest()) {
            name = context.getString(R.string.user_guest);
            name = context.getString(com.android.internal.R.string.guest_name);
        }
        if (name == null && info != null) {
            name = Integer.toString(info.id);
+0 −24
Original line number Diff line number Diff line
@@ -368,15 +368,6 @@
    <!-- Content of a dialog shown when the user only has one attempt left to provide the correct password before the work profile is removed. [CHAR LIMIT=NONE] -->
    <string name="biometric_dialog_last_password_attempt_before_wipe_profile">If you enter an incorrect password on the next attempt, your work profile and its data will be deleted.</string>

    <!-- Content of a dialog shown when the user has failed to provide the device lock too many times and the device is wiped. [CHAR LIMIT=NONE] -->
    <string name="biometric_dialog_failed_attempts_now_wiping_device">Too many incorrect attempts. This device\u2019s data will be deleted.</string>
    <!-- Content of a dialog shown when the user has failed to provide the user lock too many times and the user is removed. [CHAR LIMIT=NONE] -->
    <string name="biometric_dialog_failed_attempts_now_wiping_user">Too many incorrect attempts. This user will be deleted.</string>
    <!-- Content of a dialog shown when the user has failed to provide the work lock too many times and the work profile is removed. [CHAR LIMIT=NONE] -->
    <string name="biometric_dialog_failed_attempts_now_wiping_profile">Too many incorrect attempts. This work profile and its data will be deleted.</string>
    <!-- Button label to dismiss the dialog telling the user the device, user, or work profile has been wiped. [CHAR LIMIT=40] -->
    <string name="biometric_dialog_now_wiping_dialog_dismiss">Dismiss</string>

    <!-- Message shown when the system-provided fingerprint dialog is shown, asking for authentication -->
    <string name="fingerprint_dialog_touch_sensor">Touch the fingerprint sensor</string>
    <!-- Content description of the fingerprint icon when the system-provided fingerprint dialog is showing, for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
@@ -831,15 +822,6 @@

    <!-- Accessibility label for the button that opens the quick contact of the user. -->

    <!-- Label for the adding a new user in the user switcher [CHAR LIMIT=35] -->
    <string name="user_add_user">Add user</string>

    <!-- Name for a freshly added user [CHAR LIMIT=30] -->
    <string name="user_new_user_name">New user</string>

    <!-- Title of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] -->
    <string name="guest_exit_guest_dialog_title">Remove guest?</string>

    <!-- Message of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] -->
    <string name="guest_exit_guest_dialog_message">All apps and data in this session will be deleted.</string>

@@ -858,12 +840,6 @@
    <!-- Notification when resuming an existing guest session: Action that continues with the current session [CHAR LIMIT=35] -->
    <string name="guest_wipe_session_dontwipe">Yes, continue</string>

    <!-- Title for add user confirmation dialog [CHAR LIMIT=30] -->
    <string name="user_add_user_title" msgid="2108112641783146007">Add new user?</string>

    <!-- Message for add user confirmation dialog - short version. [CHAR LIMIT=none] -->
    <string name="user_add_user_message_short" msgid="1511354412249044381">When you add a new user, that person needs to set up their space.\n\nAny user can update apps for all other users. </string>

    <!-- Title for the dialog that lets users know that the maximum allowed number of users on the device has been reached. [CHAR LIMIT=35]-->
    <string name="user_limit_reached_title">User limit reached</string>

+6 −4
Original line number Diff line number Diff line
@@ -390,7 +390,9 @@ public abstract class AuthCredentialView extends LinearLayout {
    private void showNowWipingDialog() {
        final AlertDialog alertDialog = new AlertDialog.Builder(mContext)
                .setMessage(getNowWipingMessage(getUserTypeForWipe()))
                .setPositiveButton(R.string.biometric_dialog_now_wiping_dialog_dismiss, null)
                .setPositiveButton(
                        com.android.settingslib.R.string.failed_attempts_now_wiping_dialog_dismiss,
                        null /* OnClickListener */)
                .setOnDismissListener(
                        dialog -> mContainerView.animateAway(AuthDialogCallback.DISMISSED_ERROR))
                .create();
@@ -513,13 +515,13 @@ public abstract class AuthCredentialView extends LinearLayout {
        int resId;
        switch (userType) {
            case USER_TYPE_PRIMARY:
                resId = R.string.biometric_dialog_failed_attempts_now_wiping_device;
                resId = com.android.settingslib.R.string.failed_attempts_now_wiping_device;
                break;
            case USER_TYPE_MANAGED_PROFILE:
                resId = R.string.biometric_dialog_failed_attempts_now_wiping_profile;
                resId = com.android.settingslib.R.string.failed_attempts_now_wiping_profile;
                break;
            case USER_TYPE_SECONDARY:
                resId = R.string.biometric_dialog_failed_attempts_now_wiping_user;
                resId = com.android.settingslib.R.string.failed_attempts_now_wiping_user;
                break;
            default:
                throw new IllegalArgumentException("Unrecognized user type:" + userType);
+7 −8
Original line number Diff line number Diff line
@@ -703,8 +703,7 @@ public class UserSwitcherController implements Dumpable {
        if (mUsers.isEmpty()) return null;
        UserRecord item = mUsers.stream().filter(x -> x.isCurrent).findFirst().orElse(null);
        if (item == null || item.info == null) return null;
        if (item.isGuest) return mContext.getString(
                com.android.settingslib.R.string.guest_nickname);
        if (item.isGuest) return mContext.getString(com.android.internal.R.string.guest_name);
        return item.info.name;
    }

@@ -941,7 +940,7 @@ public class UserSwitcherController implements Dumpable {
                            : com.android.settingslib.R.string.guest_exit_guest);
                } else {
                    if (item.info != null) {
                        return context.getString(com.android.settingslib.R.string.guest_nickname);
                        return context.getString(com.android.internal.R.string.guest_name);
                    } else {
                        if (mController.mGuestUserAutoCreated) {
                            // If mGuestIsResetting=true, we expect the guest user to be created
@@ -953,7 +952,7 @@ public class UserSwitcherController implements Dumpable {
                            return context.getString(
                                    mController.mGuestIsResetting.get()
                                            ? com.android.settingslib.R.string.guest_resetting
                                            : com.android.settingslib.R.string.guest_nickname);
                                            : com.android.internal.R.string.guest_name);
                        } else {
                            return context.getString(
                                    com.android.settingslib.R.string.guest_new_guest);
@@ -961,7 +960,7 @@ public class UserSwitcherController implements Dumpable {
                    }
                }
            } else if (item.isAddUser) {
                return context.getString(R.string.user_add_user);
                return context.getString(com.android.settingslib.R.string.user_add_user);
            } else if (item.isAddSupervisedUser) {
                return context.getString(R.string.add_user_supervised);
            } else {
@@ -1128,7 +1127,7 @@ public class UserSwitcherController implements Dumpable {
            super(context);
            setTitle(mGuestUserAutoCreated
                    ? com.android.settingslib.R.string.guest_reset_guest_dialog_title
                    : R.string.guest_exit_guest_dialog_title);
                    : com.android.settingslib.R.string.guest_remove_guest_dialog_title);
            setMessage(context.getString(R.string.guest_exit_guest_dialog_message));
            setButton(DialogInterface.BUTTON_NEUTRAL,
                    context.getString(android.R.string.cancel), this);
@@ -1165,8 +1164,8 @@ public class UserSwitcherController implements Dumpable {

        public AddUserDialog(Context context) {
            super(context);
            setTitle(R.string.user_add_user_title);
            setMessage(context.getString(R.string.user_add_user_message_short));
            setTitle(com.android.settingslib.R.string.user_add_user_title);
            setMessage(com.android.settingslib.R.string.user_add_user_message_short);
            setButton(DialogInterface.BUTTON_NEUTRAL,
                    context.getString(android.R.string.cancel), this);
            setButton(DialogInterface.BUTTON_POSITIVE,
Loading