Skip to content

Commit

Permalink
Prepare the "scanning" word for translation.
Browse files Browse the repository at this point in the history
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
  • Loading branch information
tzachi-dar committed Feb 20, 2019
1 parent 538a2f3 commit 5ca79a0
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@

import static com.eveningoutpost.dexdrip.Home.startWatchUpdaterService;
import static com.eveningoutpost.dexdrip.cgm.medtrum.Medtrum.getDeviceInfoStringFromLegacy;
import static com.eveningoutpost.dexdrip.xdrip.gs;

@TargetApi(android.os.Build.VERSION_CODES.JELLY_BEAN_MR2)
public class BluetoothScan extends ListActivityWithMenu {
Expand Down Expand Up @@ -158,7 +159,7 @@ public boolean onCreateOptionsMenu(Menu menu) {

private boolean doScan() {
BluetoothManager bluetooth_manager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
Toast.makeText(this, "Scanning", Toast.LENGTH_LONG).show();
Toast.makeText(this, gs(R.string.scanning), Toast.LENGTH_LONG).show();
if (bluetooth_manager == null) {
Toast.makeText(this, "This device does not seem to support bluetooth", Toast.LENGTH_LONG).show();
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private static synchronized void doTheScan(final Activity context, Tag tag, bool
context.startActivity(new Intent(context, NFCScanningX.class));
} else {
NFCReaderX.vibrate(context, 0);
JoH.static_toast_short("Scanning");
JoH.static_toast_short(gs(R.string.scanning));
}
if (d)
Log.d(TAG, "NFC tag discovered - going to read data");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
import static com.eveningoutpost.dexdrip.G5Model.BluetoothServices.getStatusName;
import static com.eveningoutpost.dexdrip.Models.JoH.convertPinToBytes;
import static com.eveningoutpost.dexdrip.UtilityModels.BgGraphBuilder.DEXCOM_PERIOD;
import static com.eveningoutpost.dexdrip.xdrip.gs;

@TargetApi(Build.VERSION_CODES.KITKAT)
public class DexCollectionService extends Service implements BtCallBack {
Expand Down Expand Up @@ -1276,7 +1277,7 @@ synchronized void checkConnection() {
try {
if (mBluetoothAdapter.isEnabled() && mBluetoothAdapter.getRemoteDevice(deviceAddress) != null) {
if (useScanning()) {
status("Scanning" + (Home.get_engineering_mode() ? ": " + deviceAddress : ""));
status(gs(R.string.scanning) + (Home.get_engineering_mode() ? ": " + deviceAddress : ""));
scanMeister.setAddress(deviceAddress).addCallBack(this, TAG).scan();
} else {
status("Connecting" + (Home.get_engineering_mode() ? ": " + deviceAddress : ""));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
import static com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.NORMAL;
import static com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.NOTICE;
import static com.eveningoutpost.dexdrip.utils.DexCollectionType.DexcomG5;

import static com.eveningoutpost.dexdrip.xdrip.gs;

/*
import com.polidea.rxandroidble2.RxBleClient;
Expand Down Expand Up @@ -453,7 +453,7 @@ private static void init_tx_id() {

private synchronized void scan_for_device() {
if (state == SCAN) {
msg("Scanning");
msg(gs(R.string.scanning));
stopScan();
tryLoadingSavedMAC(); // did we already find it?
if (always_scan || scan_next_run || (transmitterMAC == null) || (!transmitterID.equals(transmitterIDmatchingMAC)) || (static_last_timestamp < 1)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.eveningoutpost.dexdrip.Models.Prediction;
import com.eveningoutpost.dexdrip.Models.TransmitterData;
import com.eveningoutpost.dexdrip.Models.UserError;
import com.eveningoutpost.dexdrip.R;
import com.eveningoutpost.dexdrip.Services.JamBaseBluetoothService;
import com.eveningoutpost.dexdrip.UtilityModels.BgGraphBuilder;
import com.eveningoutpost.dexdrip.UtilityModels.Constants;
Expand Down Expand Up @@ -89,6 +90,7 @@
import static com.eveningoutpost.dexdrip.cgm.medtrum.SensorState.Ok;
import static com.eveningoutpost.dexdrip.cgm.medtrum.TimeKeeper.timeStampFromTickCounter;

import static com.eveningoutpost.dexdrip.xdrip.gs;
/**
*
* jamorham
Expand Down Expand Up @@ -283,7 +285,7 @@ private void initialize() {
}

private void scan_for_device() {
status("Scanning");
status(gs(R.string.scanning));
UserError.Log.d(TAG, "Scanning for device");
scanner.setAddress(address).scan();
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@
<string name="relative_sd_cv">Relative SD (CV):</string>
<string name="important_warning">Important Warning!</string>
<string name="i_agree">I AGREE</string>
string name="location_permission_needed_to_use_bluetooth">Location permission needed to use Bluetooth!</string>
<string name="location_permission_needed_to_use_bluetooth">Location permission needed to use Bluetooth!</string>
<string name="did_you_insert_it_today">Did you insert it today?</string>
<string name="we_need_to_know_when_the_sensor_was_inserted_to_improve_calculation_accuracy__was_it_inserted_today">We need to know when the sensor was inserted to improve calculation accuracy.\n\nWas it inserted today?</string>
<string name="yes_today">YES, today</string>
Expand All @@ -1417,7 +1417,7 @@
<string name="librealarm_app_using_sony_smartwatch">LibreAlarm App: using Sony Smartwatch</string>
<string name="__data_source_disabled">\n DATA SOURCE DISABLED</string>
<string name="data_source_is_set_to_">Data Source is set to: </string>
string name="__do_you_want_to_change_settings_or_start_sensor">\n\nDo you want to change settings or start sensor?</string>
<string name="__do_you_want_to_change_settings_or_start_sensor">\n\nDo you want to change settings or start sensor?</string>
<string name="change_settings">Change settings</string>
<string name="do_you_want_to_delete_and_reset_the_calibrations_for_this_sensor">Do you want to delete and reset the calibrations for this sensor?</string>
<string name="you_have_an_old_experimental_glucose_prediction_setting_enabled__this_is_not_recommended_and_could_mess_things_up_badly__shall_i_disable_this_for_you">You have an old experimental glucose prediction setting enabled.\n\nThis is NOT RECOMMENDED and could mess things up badly.\n\nShall I disable this for you?</string>
Expand Down Expand Up @@ -1498,5 +1498,5 @@
<string name="cancelled">Cancelled!</string>
<string name="no_sensor_found">No sensor found</string>
<string name="checksum_failed__retrying">Checksum failed - retrying</string>

<string name="scanning">Scanning</string>
</resources>
4 changes: 3 additions & 1 deletion etc/FixLangs/CreateTranslations.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ def FindFileContaingString(id, string):
arr = []
for d,r,f in os.walk("..\\..\\"):
for file in f:
if file.endswith("java") and "generated" not in file and not "PebbleDisplay" in file:
if file.endswith("java") and "generated" not in file and not "PebbleDisplay" in file :
arr.append(os.path.join(d,file))

for file in arr:
if file.startswith("..\\..\\wear"):
continue
if not FileContainsString(file, string):
continue
print(file)
Expand Down
102 changes: 51 additions & 51 deletions etc/FixLangs/data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,59 +64,59 @@
#"Confirm Delete"
#"Are you sure you want to delete this Treatment?"

"No data received from master yet"
"Last from master: "
#"No data received from master yet"
#"Last from master: "
#" ago"
"Prepare to test!"
"After you click OK, look for a number icon in the notification area.\nIf you see 123 then the test has succeeded.\n\nOn some phones this test will crash the phone.\n\nAfter 30 seconds we will shut off the notification. If your phone does not recover after this then hold the power button to reboot it."
"Running test with number: 123"
"Unusual internal context problem - please report"
"Cannot start - please report context problem"
"xDrip+ will not work below Android version 4.2"
"This app needs battery optimization whitelisting or it will not work well. Please reset app preferences"
"Setting disabled :)"
"YES, Please"
"Got calibration in the future - cannot process!"
"Automated calibration enabled"
"Treatment cancelled"
"Treatment time wrong"
"Treatment error"
"Treatment processed"
"Number error: "
"Starting sync to other devices"
"Deleting ALL BG readings!"
"Could not export CSV :("
"LibreAlarm data format appears incompatible!? protocol changed or no data?"
"Please update LibreAlarm to use OOP algorithm"
"Sensor clock has not advanced!"
"Sensor age has gone backwards!!"
#"Prepare to test!"
#"After you click OK, look for a number icon in the notification area.\nIf you see 123 then the test has succeeded.\n\nOn some phones this test will crash the phone.\n\nAfter 30 seconds we will shut off the notification. If your phone does not recover after this then hold the power button to reboot it."
#"Running test with number: 123"
#"Unusual internal context problem - please report"
#"Cannot start - please report context problem"
#"xDrip+ will not work below Android version 4.2"
#"This app needs battery optimization whitelisting or it will not work well. Please reset app preferences"
#"Setting disabled :)"
#"YES, Please"
#"Got calibration in the future - cannot process!"
#"Automated calibration enabled"
#"Treatment cancelled"
#"Treatment time wrong"
#"Treatment error"
#"Treatment processed"
#"Number error: "
#"Starting sync to other devices"
#"Deleting ALL BG readings!"
#"Could not export CSV :("
#"LibreAlarm data format appears incompatible!? protocol changed or no data?"
#"Please update LibreAlarm to use OOP algorithm"
#"Sensor clock has not advanced!"
#"Sensor age has gone backwards!!"


"Phone has no NFC reader"
"NFC is not enabled"
"Phone NFC is having problems!"
#"Scanning"
"Not so quickly, wait 60 seconds"
"NFC diag timeout"
"NFC read timeout"
"NFC invalid data - try again"
"Turned off any-tag feature"
"NFC read timeout"
"NFC invalid data"
"Scanned OK!"
"NFC IO Error"
"NFC Error"
#"Phone has no NFC reader"
#"NFC is not enabled"
#"Phone NFC is having problems!"
"Scanning"
#"Not so quickly, wait 60 seconds"
#"NFC diag timeout"
#"NFC read timeout"
#"NFC invalid data - try again"
#"Turned off any-tag feature"
#"NFC read timeout"
#"NFC invalid data"
#"Scanned OK!"
#"NFC IO Error"
#"NFC Error"

"Still processing previous back-fill request!"
"Please wait.."
"Didn't find any glucose readings in that time period"
"Remote snooze.."
"Sensor stopped"
"Restarting Collector!"
#"Still processing previous back-fill request!"
#"Please wait.."
#"Didn't find any glucose readings in that time period"
#"Remote snooze.."
#"Sensor stopped"
#"Restarting Collector!"

"Follower deleted succesfully"
"Failed to delete follower"
"Input not found! Cancelled!"
"Cancelled!"
"No sensor found"
"Checksum failed - retrying"
#"Follower deleted succesfully"
#"Failed to delete follower"
#"Input not found! Cancelled!"
#"Cancelled!"
#"No sensor found"
#"Checksum failed - retrying"

0 comments on commit 5ca79a0

Please sign in to comment.