V4.1.3l - extracted more hard coded strings to be translatable.

This commit is contained in:
Graham Jones
2023-02-12 19:39:05 +00:00
parent cf0356a53b
commit 9ca970572e
5 changed files with 14 additions and 14 deletions

View File

@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="uk.org.openseizuredetector" package="uk.org.openseizuredetector"
android:versionCode="115" android:versionCode="115"
android:versionName="4.1.3k"> android:versionName="4.1.3l">
<!-- android:allowBackup="false" --> <!-- android:allowBackup="false" -->
<uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

View File

@@ -105,12 +105,7 @@ public class LogManagerControlActivity extends AppCompatActivity {
Button authBtn = Button authBtn =
(Button) findViewById(R.id.auth_button); (Button) findViewById(R.id.auth_button);
authBtn.setOnClickListener(onAuth); authBtn.setOnClickListener(onAuth);
//Button pruneBtn =
// (Button) findViewById(R.id.pruneDatabaseBtn);
//pruneBtn.setOnClickListener(onPruneBtn);
//Button reportSeizureBtn =
// (Button) findViewById(R.id.reportSeizureBtn);
//reportSeizureBtn.setOnClickListener(onReportSeizureBtn);
Button remoteDbBtn = Button remoteDbBtn =
(Button) findViewById(R.id.refresh_button); (Button) findViewById(R.id.refresh_button);
remoteDbBtn.setOnClickListener(onRefreshBtn); remoteDbBtn.setOnClickListener(onRefreshBtn);
@@ -555,17 +550,16 @@ public class LogManagerControlActivity extends AppCompatActivity {
Log.v(TAG, "onPruneBtn"); Log.v(TAG, "onPruneBtn");
// Confirmation dialog based on: https://stackoverflow.com/a/12213536/2104584 // Confirmation dialog based on: https://stackoverflow.com/a/12213536/2104584
AlertDialog.Builder builder = new AlertDialog.Builder(mContext); AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setTitle("Prune Database"); builder.setTitle(R.string.prune_database_title);
builder.setMessage(String.format("This will remove all data from the database that is more than %d days old." builder.setMessage(String.format(getString(R.string.prune_database_dialog_msg) , mLm.mDataRetentionPeriod));
+ "\nThis can NOT be undone.\nAre you sure?", mLm.mDataRetentionPeriod)); builder.setPositiveButton(R.string.yes_button_title, new DialogInterface.OnClickListener() {
builder.setPositiveButton("YES", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
mLm.pruneLocalDb(); mLm.pruneLocalDb();
dialog.dismiss(); dialog.dismiss();
} }
}); });
builder.setNegativeButton("NO", new DialogInterface.OnClickListener() { builder.setNegativeButton(R.string.no_button_title, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
dialog.dismiss(); dialog.dismiss();

View File

@@ -1078,7 +1078,7 @@ public class MainActivity extends AppCompatActivity {
dialog.cancel(); dialog.cancel();
} }
}); });
builder.setPositiveButton("Privacy Policy", new DialogInterface.OnClickListener() { builder.setPositiveButton(R.string.privacy_policy_button_title, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
dialog.cancel(); dialog.cancel();
String url = OsdUtil.PRIVACY_POLICY_URL; String url = OsdUtil.PRIVACY_POLICY_URL;
@@ -1088,7 +1088,7 @@ public class MainActivity extends AppCompatActivity {
dialog.cancel(); dialog.cancel();
} }
}); });
builder.setNegativeButton("Data Sharing", new DialogInterface.OnClickListener() { builder.setNegativeButton(R.string.data_sharing_button_title, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
dialog.cancel(); dialog.cancel();
String url = OsdUtil.DATA_SHARING_URL; String url = OsdUtil.DATA_SHARING_URL;

View File

@@ -479,4 +479,10 @@
<string name="mLocationFinder_is_null_msg">SmsTimer.onFinish - mLocationFinder is null - this should not happen! - Please report this issue!</string> <string name="mLocationFinder_is_null_msg">SmsTimer.onFinish - mLocationFinder is null - this should not happen! - Please report this issue!</string>
<string name="error_creating_remote_event_msg">Error Creating Remote Event</string> <string name="error_creating_remote_event_msg">Error Creating Remote Event</string>
<string name="error_uploading_event_msg">Error uploading event - date is null</string> <string name="error_uploading_event_msg">Error uploading event - date is null</string>
<string name="prune_database_title">Prune Database</string>
<string name="prune_database_dialog_msg">This will remove all data from the database that is more than %d days old.\nThis can NOT be undone.\nAre you sure?</string>
<string name="yes_button_title">YES</string>
<string name="no_button_title">NO</string>
<string name="privacy_policy_button_title">Privacy Policy</string>
<string name="data_sharing_button_title">Data Sharing</string>
</resources> </resources>