1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 14:32:54 +01:00

Extract some hardcoded strings to resources

This commit is contained in:
José Rebelo 2023-06-22 22:40:55 +01:00
parent 4cdefb17df
commit bdeab0cc73
6 changed files with 18 additions and 10 deletions

View File

@ -48,7 +48,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ems="10" android:ems="10"
android:hint="Title" android:hint="@string/title"
android:inputType="text" android:inputType="text"
android:maxLength="32" /> android:maxLength="32" />
@ -58,7 +58,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ems="10" android:ems="10"
android:gravity="start|top" android:gravity="start|top"
android:hint="Description" android:hint="@string/description"
android:inputType="textMultiLine" android:inputType="textMultiLine"
android:maxLength="256" android:maxLength="256"
android:singleLine="false" /> android:singleLine="false" />

View File

@ -20,7 +20,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:contentDescription="preview image" android:contentDescription="@string/preview_image"
android:visibility="gone" /> android:visibility="gone" />
<ListView <ListView
@ -48,7 +48,7 @@
android:layout_alignParentTop="false" android:layout_alignParentTop="false"
android:layout_below="@+id/infoTextView" android:layout_below="@+id/infoTextView"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:contentDescription="Status icon" /> android:contentDescription="@string/status_icon" />
<ProgressBar <ProgressBar
style="@android:style/Widget.DeviceDefault.ProgressBar.Horizontal" style="@android:style/Widget.DeviceDefault.ProgressBar.Horizontal"

View File

@ -19,14 +19,14 @@
android:layout_width="250dp" android:layout_width="250dp"
android:layout_height="250dp" android:layout_height="250dp"
android:background="@android:color/holo_red_light" android:background="@android:color/holo_red_light"
android:text="unknown" android:text="@string/unknown"
android:textSize="50dp" android:textSize="50dp"
android:gravity="center"/> android:gravity="center"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="unknown" android:text="@string/unknown"
android:textSize="50dp" android:textSize="50dp"
android:id="@+id/text_sensor_count"/> android:id="@+id/text_sensor_count"/>

View File

@ -35,7 +35,7 @@
android:icon="@drawable/ic_donate" /> android:icon="@drawable/ic_donate" />
<item <item
android:id="@+id/external_changelog" android:id="@+id/external_changelog"
android:title="@string/changelog_full_title" android:title="@string/action_changelog"
android:icon="@drawable/ic_history" /> android:icon="@drawable/ic_history" />
<item <item
android:id="@+id/about" android:id="@+id/about"

View File

@ -34,6 +34,7 @@
<string name="action_debug">Debug</string> <string name="action_debug">Debug</string>
<string name="action_quit">Quit</string> <string name="action_quit">Quit</string>
<string name="action_donate">Donate</string> <string name="action_donate">Donate</string>
<string name="action_changelog">Changelog</string>
<string name="controlcenter_fetch_activity_data">Synchronize</string> <string name="controlcenter_fetch_activity_data">Synchronize</string>
<string name="controlcenter_find_device">Find lost device</string> <string name="controlcenter_find_device">Find lost device</string>
<string name="find_lost_device_message">Search for %1$s?</string> <string name="find_lost_device_message">Search for %1$s?</string>
@ -264,8 +265,11 @@
<string name="pref_summary_banglejs_text_bitmap">If a word cannot be rendered with the watch\'s font, render it to a bitmap in Gadgetbridge and display the bitmap on the watch</string> <string name="pref_summary_banglejs_text_bitmap">If a word cannot be rendered with the watch\'s font, render it to a bitmap in Gadgetbridge and display the bitmap on the watch</string>
<string name="pref_title_banglejs_txt_bitmap_size">Text Bitmaps Size</string> <string name="pref_title_banglejs_txt_bitmap_size">Text Bitmaps Size</string>
<string name="pref_summary_banglejs_txt_bitmap_size">If \'Text as Bitmaps\' enabled, what size should text be rendered?</string> <string name="pref_summary_banglejs_txt_bitmap_size">If \'Text as Bitmaps\' enabled, what size should text be rendered?</string>
<string name="pref_title_banglejs_phone_gps_enbale">Use phone gps data</string>
<string name="pref_summary_banglejs_phone_gps_enbale">Use the gps data of the phone to overwrite the gps data of the bangle device</string> <string name="pref_summary_banglejs_phone_gps_enbale">Use the gps data of the phone to overwrite the gps data of the bangle device</string>
<string name="pref_title_banglejs_phone_gps_network_only">Only use network to determine location</string>
<string name="pref_summary_banglejs_phone_gps_network_only">This option is only active, if the gps data of the phone is being used. This option can be used to use only the network provider to determine the location. This reduces the power consumption for the cost of accuracy. A reconnection of the device is needed.</string> <string name="pref_summary_banglejs_phone_gps_network_only">This option is only active, if the gps data of the phone is being used. This option can be used to use only the network provider to determine the location. This reduces the power consumption for the cost of accuracy. A reconnection of the device is needed.</string>
<string name="pref_title_banglejs_phone_gps_update_interval">GPS data update interval in ms</string>
<string name="pref_summary_banglejs_phone_gps_update_interval">This option is only active, if the gps data of the phone is being used. This option sets the interval in ms how often the gps position is being updated</string> <string name="pref_summary_banglejs_phone_gps_update_interval">This option is only active, if the gps data of the phone is being used. This option sets the interval in ms how often the gps position is being updated</string>
<string name="pref_title_banglejs_webview_url">App loader URL</string> <string name="pref_title_banglejs_webview_url">App loader URL</string>
<string name="pref_summary_banglejs_webview_url">If you want a custom app loader put your https://…/android.html URL here. Otherwise leave blank for https://banglejs.com/apps</string> <string name="pref_summary_banglejs_webview_url">If you want a custom app loader put your https://…/android.html URL here. Otherwise leave blank for https://banglejs.com/apps</string>
@ -2137,4 +2141,8 @@
<string name="pref_app_logs_summary">Enable logs from watch apps</string> <string name="pref_app_logs_summary">Enable logs from watch apps</string>
<string name="pref_app_logs_start_summary">Start logging from watch apps</string> <string name="pref_app_logs_start_summary">Start logging from watch apps</string>
<string name="pref_app_logs_stop_summary">Stop logging from watch apps</string> <string name="pref_app_logs_stop_summary">Stop logging from watch apps</string>
<string name="title">Title</string>
<string name="description">Description</string>
<string name="preview_image">Preview image</string>
<string name="status_icon">Status icon</string>
</resources> </resources>

View File

@ -5,20 +5,20 @@
android:icon="@drawable/ic_gps_location" android:icon="@drawable/ic_gps_location"
android:key="banglejs_gps_update" android:key="banglejs_gps_update"
android:summary="@string/pref_summary_banglejs_phone_gps_enbale" android:summary="@string/pref_summary_banglejs_phone_gps_enbale"
android:title="Use phone gps data" /> android:title="@string/pref_title_banglejs_phone_gps_enbale" />
<EditTextPreference <EditTextPreference
android:defaultValue="1000" android:defaultValue="1000"
android:inputType="number" android:inputType="number"
android:icon="@drawable/ic_access_time" android:icon="@drawable/ic_access_time"
android:key="banglejs_gps_update_interval" android:key="banglejs_gps_update_interval"
android:summary="@string/pref_summary_banglejs_phone_gps_update_interval" android:summary="@string/pref_summary_banglejs_phone_gps_update_interval"
android:title="GPS data update interval in ms" /> android:title="@string/pref_title_banglejs_phone_gps_update_interval" />
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:icon="@drawable/ic_gps_location" android:icon="@drawable/ic_gps_location"
android:key="banglejs_gps_use_network_only" android:key="banglejs_gps_use_network_only"
android:summary="@string/pref_summary_banglejs_phone_gps_network_only" android:summary="@string/pref_summary_banglejs_phone_gps_network_only"
android:title="Only use network to determine location" /> android:title="@string/pref_title_banglejs_phone_gps_network_only" />
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"