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

Commit 7a7d3494 authored by djMesias's avatar djMesias Committed by Ricardo Cerqueira
Browse files

QuickSettings: Allow custom off-status strings for translates

- GPS
- Torch
- Wi-Fi AP

PatchSet 4:	Removed all translations.

Change-Id: Ibc7fa50c8b1ee87170bd4b58866e45c63655a192
parent d083f5af
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -515,6 +515,7 @@
    <string name="powerwidget_screen_timeout_toast">Screen timeout set to: %1$d %2$s</string>

    <string name="quick_settings_gps">GPS</string>
    <string name="quick_settings_gps_off">GPS off</string>
    <string name="quick_settings_screen_sleep">Go to sleep</string>
    <string name="quick_settings_ringer_on">Sound on</string>
    <string name="quick_settings_ringer_off">Sound off</string>
@@ -528,12 +529,15 @@
    <string name="quick_settings_report_bug">Report bug</string>
    <string name="quick_settings_sync">Sync</string>
    <string name="quick_settings_torch">Torch</string>
    <string name="quick_settings_torch_off">Torch off</string>
    <string name="quick_settings_nfc">NFC</string>
    <string name="quick_settings_screen_timeout">Timeout</string>
    <string name="quick_settings_screen_timeout_summary">%1$d %2$s</string>
    <string name="quick_settings_usb_tether_off_label">Disconnected</string>
    <string name="quick_settings_usb_tether_connected_label">Tethering Off</string>
    <string name="quick_settings_usb_tether_connected_label">Tethering off</string>
    <string name="quick_settings_usb_tether_on_label">Tethering</string>
    <string name="quick_settings_wifiap">Wi-Fi AP</string>
    <string name="quick_settings_wifiap_off">Wi-Fi AP off</string>

    <!-- Text to display next to the minimal graphical battery meter.  [CHAR LIMIT=3] -->
    <string name="status_bar_settings_battery_meter_min_format" translatable="false">
+1 −3
Original line number Diff line number Diff line
@@ -91,8 +91,6 @@ public class GPSTile extends QuickSettingsTile implements LocationGpsStateChange
    }

    private void setGenericLabel() {
        // Show OFF next to the GPS label when in OFF state, ON/IN USE is indicated by the color
        String label = mContext.getString(R.string.quick_settings_gps);
        mLabel = (enabled ? label : label + " " + mContext.getString(R.string.quick_settings_label_disabled));
        mLabel = (enabled ? mContext.getString(R.string.quick_settings_gps) : mContext.getString(R.string.quick_settings_gps_off));
    }
}
+2 −4
Original line number Diff line number Diff line
@@ -46,15 +46,13 @@ public class TorchTile extends QuickSettingsTile {
    private void updateTileState() {
        boolean enabled = Settings.System.getInt(mContext.getContentResolver(),
                Settings.System.TORCH_STATE, 0) == 1;
        String label = mContext.getString(R.string.quick_settings_torch);

        // Show OFF next to the label when in OFF state, ON/IN USE is indicated by the color
        if(enabled) {
            mDrawable = R.drawable.ic_qs_torch_on;
            mLabel = label;
            mLabel = mContext.getString(R.string.quick_settings_torch);
        } else {
            mDrawable = R.drawable.ic_qs_torch_off;
            mLabel = label + " " + mContext.getString(R.string.quick_settings_label_disabled);
            mLabel = mContext.getString(R.string.quick_settings_torch_off);
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -64,14 +64,14 @@ public class WifiAPTile extends QuickSettingsTile {
        switch (state) {
            case WifiManager.WIFI_AP_STATE_ENABLING:
            case WifiManager.WIFI_AP_STATE_ENABLED:
                mLabel = mContext.getString(R.string.quick_settings_label_enabled);
                mLabel = mContext.getString(R.string.quick_settings_wifiap);
                mDrawable = R.drawable.ic_qs_wifi_ap_on;
                break;
            case WifiManager.WIFI_AP_STATE_DISABLING:
            case WifiManager.WIFI_AP_STATE_DISABLED:
            default:
                mDrawable = R.drawable.ic_qs_wifi_ap_off;
                mLabel = mContext.getString(R.string.quick_settings_label_disabled);
                mLabel = mContext.getString(R.string.quick_settings_wifiap_off);
                break;
        }
    }