Skip to content

Commit

Permalink
Extract string resources from root_preferences.xml(WIP #71)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xf104a committed Feb 23, 2024
1 parent e0b9d38 commit 555b18f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 29 deletions.
29 changes: 29 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,33 @@
<string name="donation_thank_you">Thank you! ❤️</string>
<string name="quick_action_failed">Quick action failed to complete</string>
<string name="avatar">Avatar</string>
<string name="nextcloud_address">Nextcloud address</string>
<string name="address_of_your_nextcloud_server_without_http_s">Address of your nextcloud server(without http(s)://)</string>
<string name="password_title">Password</string>
<string name="password_summary">Your password</string>
<string name="username_title">Your username</string>
<string name="login_title">Login</string>
<string name="sso_title">Log in via Nextcloud app</string>
<string name="sso_summary">Use on-device Nextcloud account</string>
<string name="connection">Connection</string>
<string name="use_http_instead_of_https_summary">Use http instead of https</string>
<string name="use_insecure_connection_summary">Use insecure connection</string>
<string name="roamin_summary">Allows checking for notifications when in roaming</string>
<string name="roaming_title">Allow roaming</string>
<string name="metered_summary">Allows networks which are metered</string>
<string name="metered_title">Allow metered networks</string>
<string name="service_enable_summary">Enables polling notifications</string>
<string name="service_enable_title">Enable service</string>
<string name="notify_push_summary">Use notify_push websocket for getting notifications</string>
<string name="notify_push_title">Enable websocket</string>
<string name="polling_interval_title">Polling interval</string>
<string name="remove_on_dismiss_summary">Remove notifications from server when they are dismissed.</string>
<string name="remove_on_dismiss_title">Remove notifications on dismiss</string>
<string name="status">Status</string>
<string name="status_disconnected">Disconnected</string>
<string name="others_title">Others</string>
<string name="credits_title">Credits</string>
<string name="credits_summary">See people who contributed to this project</string>
<string name="donate_title">Donate</string>
<string name="donate_summary">Buy me a coffee</string>
</resources>
58 changes: 29 additions & 29 deletions app/src/main/res/xml/root_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,56 @@
android:key="server"
android:selectAllOnFocus="true"
android:singleLine="true"
android:summary="Address of your nextcloud server(without http(s)://)"
android:title="Nextcloud address" />
android:summary="@string/address_of_your_nextcloud_server_without_http_s"
android:title="@string/nextcloud_address" />
<EditTextPreference
android:key="password"
android:title="Password"
android:summary="Your password"
android:title="@string/password_title"
android:summary="@string/password_summary"
android:inputType="textPassword"/>
<EditTextPreference
android:defaultValue=""
android:key="login"
android:selectAllOnFocus="true"
android:singleLine="true"
android:summary="Your username"
android:title="Login" />
android:summary="@string/username_title"
android:title="@string/login_title" />
<Preference
android:title="Log in via Nextcloud app"
android:summary="Use on-device Nextcloud account"
android:title="@string/sso_title"
android:summary="@string/sso_summary"
android:id="@+id/login_sso"
android:key="login_sso"
/>
</PreferenceCategory>
<PreferenceCategory android:title="Connection">
<PreferenceCategory android:title="@string/connection">
<SwitchPreference
android:defaultValue="false"
android:key="insecure_connection"
android:summary="Use http instead of https"
android:title="Use insecure connection" />
android:summary="@string/use_http_instead_of_https_summary"
android:title="@string/use_insecure_connection_summary" />
<SwitchPreference
android:defaultValue="false"
android:key="allow_roaming"
android:summary="Allows checking for notifications when in roaming"
android:title="Allow roaming" />
android:summary="@string/roamin_summary"
android:title="@string/roaming_title" />
<SwitchPreference
android:defaultValue="true"
android:key="allow_metered"
android:summary="Allows networks which are metered"
android:title="Allow metered networks" />
android:summary="@string/metered_summary"
android:title="@string/metered_title" />
<SwitchPreference
android:defaultValue="true"
android:key="enable_polling"
android:summary="Enables polling notifications"
android:title="Enable service" />
android:summary="@string/service_enable_summary"
android:title="@string/service_enable_title" />
<SwitchPreference
android:defaultValue="false"
android:key="use_websocket"
android:summary="Use notify_push websocket for getting notifications"
android:title="Enable websocket" />
android:summary="@string/notify_push_summary"
android:title="@string/notify_push_title" />
<nl.invissvenska.numberpickerpreference.NumberDialogPreference
android:key="polling_interval"
android:title="Polling interval"
android:title="@string/polling_interval_title"
android:defaultValue="10"
app:numberPickerPreference_minValue="1"
app:numberPickerPreference_maxValue="899"
Expand All @@ -65,37 +65,37 @@
<SwitchPreference
android:defaultValue="false"
android:key="remove_on_dismiss"
android:summary="Remove notifications from server when they are dismissed."
android:title="Remove notifications on dismiss" />
android:summary="@string/remove_on_dismiss_summary"
android:title="@string/remove_on_dismiss_title" />
<SwitchPreference
android:defaultValue="true"
android:key="open_spreed_in_browser"
android:summary="@string/open_spreed_in_browser_summary"
android:title="@string/open_spreed_in_browser_title" />
</PreferenceCategory>
<PreferenceCategory android:title="Status">
<PreferenceCategory android:title="@string/status">
<EditTextPreference
android:defaultValue="Default value"
android:enabled="false"
android:key="status"
android:selectAllOnFocus="true"
android:singleLine="true"
android:summary="Disconnected"
android:summary="@string/status_disconnected"
android:id="@+id/status"
android:title="Status"
app:enabled="false" />
</PreferenceCategory>

<PreferenceCategory android:title="Others">
<PreferenceCategory android:title="@string/others_title">
<Preference
android:title="Credits"
android:summary="See people who contributed to this project"
android:title="@string/credits_title"
android:summary="@string/credits_summary"
android:id="@+id/credits"
android:key="credits"
/>
<Preference
android:title="Donate"
android:summary="Buy me a coffee"
android:title="@string/donate_title"
android:summary="@string/donate_summary"
android:id="@+id/donate"
android:key="donate"
/>
Expand Down

0 comments on commit 555b18f

Please sign in to comment.