1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-08 14:18:08 +02:00

extracted some string resources

This commit is contained in:
dakhnod 2019-12-04 00:59:43 +01:00
parent f4a0f0ce8f
commit b1b4100852
3 changed files with 27 additions and 14 deletions

View File

@ -121,7 +121,7 @@ public class ConfigActivity extends AbstractGBActivity {
layout2.setGravity(Gravity.CENTER);
new AlertDialog.Builder(ConfigActivity.this)
.setTitle("offset time by")
.setTitle(getString(R.string.qhybrid_offset_time_by))
.setView(layout2)
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
@ -129,7 +129,7 @@ public class ConfigActivity extends AbstractGBActivity {
prefs.edit().putInt("QHYBRID_TIME_OFFSET", hourPicker.getValue() * 60 + minPicker.getValue()).apply();
updateTimeOffset();
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)
@ -166,7 +166,7 @@ public class ConfigActivity extends AbstractGBActivity {
layout2.setGravity(Gravity.CENTER);
new AlertDialog.Builder(ConfigActivity.this)
.setTitle("offset timezone by")
.setTitle(getString(R.string.qhybrid_offset_timezone))
.setView(layout2)
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
@ -174,7 +174,7 @@ public class ConfigActivity extends AbstractGBActivity {
prefs.edit().putInt("QHYBRID_TIMEZONE_OFFSET", hourPicker.getValue() * 60 + minPicker.getValue()).apply();
updateTimezoneOffset();
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)
@ -297,7 +297,7 @@ public class ConfigActivity extends AbstractGBActivity {
device = GBApplication.app().getDeviceManager().getSelectedDevice();
if (device == null || device.getType() != DeviceType.FOSSILQHYBRID) {
setSettingsError("Watch not connected");
setSettingsError(getString(R.string.watch_not_connected));
} else {
updateSettings();
}
@ -374,7 +374,7 @@ public class ConfigActivity extends AbstractGBActivity {
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
if (!device.getDeviceInfo(QHybridSupport.ITEM_STEP_GOAL).getDetails().equals("1000000")) {
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)
.show();
buttonView.setChecked(false);
@ -617,10 +617,10 @@ public class ConfigActivity extends AbstractGBActivity {
public void onReceive(Context context, Intent intent) {
boolean error = intent.getBooleanExtra("EXTRA_ERROR", false);
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;
}
GB.toast("Successfully overwritten buttons", Toast.LENGTH_SHORT, GB.INFO);
GB.toast(getString(R.string.qhybrid_buttons_overwrite_success), Toast.LENGTH_SHORT, GB.INFO);
}
};

View File

@ -23,7 +23,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="vibration strength:" />
android:text="@string/qhybrid_vibration_strength" />
<SeekBar
@ -38,7 +38,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Goal in steps" />
android:text="@string/qhybrid_goal_in_steps" />
<EditText
android:id="@+id/stepGoalEt"
@ -54,7 +54,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:text="time shift" />
android:text="@string/qhybrid_time_shift" />
<TextView
android:id="@+id/qhybridTimeOffset"
@ -72,7 +72,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:text="second timezone offset relative to UTC" />
android:text="@string/qhybrid_second_timezone_offset_relative_to_utc" />
<TextView
android:id="@+id/timezoneOffset"
@ -86,14 +86,14 @@
android:id="@+id/buttonOverwriteButtons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="overwrite buttons" />
android:text="@string/qhybrid_overwrite_buttons" />
<CheckBox
android:id="@+id/checkBoxUserActivityHand"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="use activity hand as notification counter" />
android:text="@string/qhybrid_use_activity_hand_as_notification_counter" />
<LinearLayout
android:layout_width="match_parent"

View File

@ -756,6 +756,19 @@
<string name="widget_20_minutes">20 minutes</string>
<string name="widget_1_hour">1 hour</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">
<item quantity="one">%d hour</item>
<item quantity="two">%d hours</item>