Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metric & Imperial #398

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Metric & Imperial #398

wants to merge 1 commit into from

Conversation

na7q
Copy link
Contributor

@na7q na7q commented Dec 27, 2024

No description provided.

Copy link
Owner

@ge0rg ge0rg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I've added a few comments.

@@ -85,6 +85,9 @@
<item>12</item> <item>13</item> <item>14</item> <item>15</item>
</string-array>

<string-array name="p_units_ev">
<item>1</item> <item>2</item>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values "1" and "2" aren't useful. You can replace them with "metric" and "imperial" or completely remove the array and use getListItemIndex() to determine the configured value.

@@ -153,6 +153,9 @@
<string name="p_ssid">SSID</string>
<string name="p_ssid_summary">Station type (1..15; 9=Mobile, 10=APRS-IS)</string>
<string name="p_ssid_entry">Enter the SSID for your station</string>
<string name="p_units_title">Distance Units</string>
<string name="p_units">Unit Preference</string>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This preference should go into the "Display and Notifications" section. It can be the first item in the category. Then it should be named "Distance Units" and the sub-string should be removed, as it will be replaced by the selected value anyway.

@@ -153,6 +153,9 @@
<string name="p_ssid">SSID</string>
<string name="p_ssid_summary">Station type (1..15; 9=Mobile, 10=APRS-IS)</string>
<string name="p_ssid_entry">Enter the SSID for your station</string>
<string name="p_units_title">Distance Units</string>
<string name="p_units">Unit Preference</string>
<string name="p_units_entry">Select Distance Unit</string>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've stopped adding distinct entry dialog titles, as every string needs to be translated into all languages, and the preference title ("Distance Units") can be re-used here.

android:title="@string/p_units_title">

<de.duenndns.ListPreferenceWithValue
android:key="p.units"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key should be p_units for consistency with the other prefs in the main prefs screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants