mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-27 11:05:49 +01:00
extracted some string resources
This commit is contained in:
parent
f4a0f0ce8f
commit
b1b4100852
@ -121,7 +121,7 @@ public class ConfigActivity extends AbstractGBActivity {
|
|||||||
layout2.setGravity(Gravity.CENTER);
|
layout2.setGravity(Gravity.CENTER);
|
||||||
|
|
||||||
new AlertDialog.Builder(ConfigActivity.this)
|
new AlertDialog.Builder(ConfigActivity.this)
|
||||||
.setTitle("offset time by")
|
.setTitle(getString(R.string.qhybrid_offset_time_by))
|
||||||
.setView(layout2)
|
.setView(layout2)
|
||||||
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
|
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -129,7 +129,7 @@ public class ConfigActivity extends AbstractGBActivity {
|
|||||||
prefs.edit().putInt("QHYBRID_TIME_OFFSET", hourPicker.getValue() * 60 + minPicker.getValue()).apply();
|
prefs.edit().putInt("QHYBRID_TIME_OFFSET", hourPicker.getValue() * 60 + minPicker.getValue()).apply();
|
||||||
updateTimeOffset();
|
updateTimeOffset();
|
||||||
LocalBroadcastManager.getInstance(ConfigActivity.this).sendBroadcast(new Intent(QHybridSupport.QHYBRID_COMMAND_UPDATE));
|
LocalBroadcastManager.getInstance(ConfigActivity.this).sendBroadcast(new Intent(QHybridSupport.QHYBRID_COMMAND_UPDATE));
|
||||||
GB.toast("change might take some seconds...", Toast.LENGTH_SHORT, GB.INFO);
|
GB.toast(getString(R.string.qhybrid_changes_delay_prompt), Toast.LENGTH_SHORT, GB.INFO);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton("cancel", null)
|
.setNegativeButton("cancel", null)
|
||||||
@ -166,7 +166,7 @@ public class ConfigActivity extends AbstractGBActivity {
|
|||||||
layout2.setGravity(Gravity.CENTER);
|
layout2.setGravity(Gravity.CENTER);
|
||||||
|
|
||||||
new AlertDialog.Builder(ConfigActivity.this)
|
new AlertDialog.Builder(ConfigActivity.this)
|
||||||
.setTitle("offset timezone by")
|
.setTitle(getString(R.string.qhybrid_offset_timezone))
|
||||||
.setView(layout2)
|
.setView(layout2)
|
||||||
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
|
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -174,7 +174,7 @@ public class ConfigActivity extends AbstractGBActivity {
|
|||||||
prefs.edit().putInt("QHYBRID_TIMEZONE_OFFSET", hourPicker.getValue() * 60 + minPicker.getValue()).apply();
|
prefs.edit().putInt("QHYBRID_TIMEZONE_OFFSET", hourPicker.getValue() * 60 + minPicker.getValue()).apply();
|
||||||
updateTimezoneOffset();
|
updateTimezoneOffset();
|
||||||
LocalBroadcastManager.getInstance(ConfigActivity.this).sendBroadcast(new Intent(QHybridSupport.QHYBRID_COMMAND_UPDATE_TIMEZONE));
|
LocalBroadcastManager.getInstance(ConfigActivity.this).sendBroadcast(new Intent(QHybridSupport.QHYBRID_COMMAND_UPDATE_TIMEZONE));
|
||||||
GB.toast("change might take some seconds...", Toast.LENGTH_SHORT, GB.INFO);
|
GB.toast(getString(R.string.qhybrid_changes_delay_prompt), Toast.LENGTH_SHORT, GB.INFO);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton("cancel", null)
|
.setNegativeButton("cancel", null)
|
||||||
@ -297,7 +297,7 @@ public class ConfigActivity extends AbstractGBActivity {
|
|||||||
|
|
||||||
device = GBApplication.app().getDeviceManager().getSelectedDevice();
|
device = GBApplication.app().getDeviceManager().getSelectedDevice();
|
||||||
if (device == null || device.getType() != DeviceType.FOSSILQHYBRID) {
|
if (device == null || device.getType() != DeviceType.FOSSILQHYBRID) {
|
||||||
setSettingsError("Watch not connected");
|
setSettingsError(getString(R.string.watch_not_connected));
|
||||||
} else {
|
} else {
|
||||||
updateSettings();
|
updateSettings();
|
||||||
}
|
}
|
||||||
@ -374,7 +374,7 @@ public class ConfigActivity extends AbstractGBActivity {
|
|||||||
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
|
||||||
if (!device.getDeviceInfo(QHybridSupport.ITEM_STEP_GOAL).getDetails().equals("1000000")) {
|
if (!device.getDeviceInfo(QHybridSupport.ITEM_STEP_GOAL).getDetails().equals("1000000")) {
|
||||||
new AlertDialog.Builder(ConfigActivity.this)
|
new AlertDialog.Builder(ConfigActivity.this)
|
||||||
.setMessage("Please set the step count to a million to activate that.")
|
.setMessage(getString(R.string.qhybrid_prompt_million_steps))
|
||||||
.setPositiveButton("ok", null)
|
.setPositiveButton("ok", null)
|
||||||
.show();
|
.show();
|
||||||
buttonView.setChecked(false);
|
buttonView.setChecked(false);
|
||||||
@ -617,10 +617,10 @@ public class ConfigActivity extends AbstractGBActivity {
|
|||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
boolean error = intent.getBooleanExtra("EXTRA_ERROR", false);
|
boolean error = intent.getBooleanExtra("EXTRA_ERROR", false);
|
||||||
if (error) {
|
if (error) {
|
||||||
GB.toast("Error overwriting buttons", Toast.LENGTH_SHORT, GB.ERROR);
|
GB.toast(getString(R.string.qhybrid_buttons_overwrite_error), Toast.LENGTH_SHORT, GB.ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GB.toast("Successfully overwritten buttons", Toast.LENGTH_SHORT, GB.INFO);
|
GB.toast(getString(R.string.qhybrid_buttons_overwrite_success), Toast.LENGTH_SHORT, GB.INFO);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="vibration strength:" />
|
android:text="@string/qhybrid_vibration_strength" />
|
||||||
|
|
||||||
|
|
||||||
<SeekBar
|
<SeekBar
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Goal in steps" />
|
android:text="@string/qhybrid_goal_in_steps" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/stepGoalEt"
|
android:id="@+id/stepGoalEt"
|
||||||
@ -54,7 +54,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:text="time shift" />
|
android:text="@string/qhybrid_time_shift" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/qhybridTimeOffset"
|
android:id="@+id/qhybridTimeOffset"
|
||||||
@ -72,7 +72,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:text="second timezone offset relative to UTC" />
|
android:text="@string/qhybrid_second_timezone_offset_relative_to_utc" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/timezoneOffset"
|
android:id="@+id/timezoneOffset"
|
||||||
@ -86,14 +86,14 @@
|
|||||||
android:id="@+id/buttonOverwriteButtons"
|
android:id="@+id/buttonOverwriteButtons"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="overwrite buttons" />
|
android:text="@string/qhybrid_overwrite_buttons" />
|
||||||
|
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/checkBoxUserActivityHand"
|
android:id="@+id/checkBoxUserActivityHand"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="use activity hand as notification counter" />
|
android:text="@string/qhybrid_use_activity_hand_as_notification_counter" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -756,6 +756,19 @@
|
|||||||
<string name="widget_20_minutes">20 minutes</string>
|
<string name="widget_20_minutes">20 minutes</string>
|
||||||
<string name="widget_1_hour">1 hour</string>
|
<string name="widget_1_hour">1 hour</string>
|
||||||
<string name="icon_placeholder" translatable="false">Icon</string>
|
<string name="icon_placeholder" translatable="false">Icon</string>
|
||||||
|
<string name="watch_not_connected">Watch not connected</string>
|
||||||
|
<string name="qhybrid_vibration_strength">vibration strength:</string>
|
||||||
|
<string name="qhybrid_goal_in_steps">Goal in steps</string>
|
||||||
|
<string name="qhybrid_time_shift">time shift</string>
|
||||||
|
<string name="qhybrid_second_timezone_offset_relative_to_utc">second timezone offset relative to UTC</string>
|
||||||
|
<string name="qhybrid_overwrite_buttons">overwrite buttons</string>
|
||||||
|
<string name="qhybrid_use_activity_hand_as_notification_counter">use activity hand as notification counter</string>
|
||||||
|
<string name="qhybrid_prompt_million_steps">Please set the step count to a million to activate that.</string>
|
||||||
|
<string name="qhybrid_buttons_overwrite_success">Successfully overwritten buttons</string>
|
||||||
|
<string name="qhybrid_buttons_overwrite_error">Error overwriting buttons</string>
|
||||||
|
<string name="qhybrid_offset_timezone">offset timezone by</string>
|
||||||
|
<string name="qhybrid_changes_delay_prompt">change might take some seconds...</string>
|
||||||
|
<string name="qhybrid_offset_time_by">offset time by</string>
|
||||||
<plurals name="widget_alarm_target_hours">
|
<plurals name="widget_alarm_target_hours">
|
||||||
<item quantity="one">%d hour</item>
|
<item quantity="one">%d hour</item>
|
||||||
<item quantity="two">%d hours</item>
|
<item quantity="two">%d hours</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user