Merge branch 'dev' into sens

This commit is contained in:
Milos Kozak 2018-08-02 15:22:45 +02:00 committed by GitHub
commit a01d9924eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 1297 additions and 176 deletions

View file

@ -160,6 +160,8 @@ android {
unitTests.returnDefaultValues = true unitTests.returnDefaultValues = true
unitTests.includeAndroidResources = true unitTests.includeAndroidResources = true
} }
useLibrary "org.apache.http.legacy"
} }
allprojects { allprojects {
@ -188,6 +190,7 @@ dependencies {
libs "MilosKozak:danars-support-lib:master@zip" libs "MilosKozak:danars-support-lib:master@zip"
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}" implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
implementation "com.android.support:support-v13:${supportLibraryVersion}"
implementation "com.android.support:support-v4:${supportLibraryVersion}" implementation "com.android.support:support-v4:${supportLibraryVersion}"
implementation "com.android.support:cardview-v7:${supportLibraryVersion}" implementation "com.android.support:cardview-v7:${supportLibraryVersion}"
implementation "com.android.support:recyclerview-v7:${supportLibraryVersion}" implementation "com.android.support:recyclerview-v7:${supportLibraryVersion}"

View file

@ -127,6 +127,16 @@
</intent-filter> </intent-filter>
</receiver> </receiver>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="info.nightscout.androidaps.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>
<!-- Service processing incomming data --> <!-- Service processing incomming data -->
<service <service
android:name=".services.DataService" android:name=".services.DataService"
@ -180,7 +190,7 @@
<activity android:name=".activities.SingleFragmentActivity" <activity android:name=".activities.SingleFragmentActivity"
android:theme="@style/AppTheme" /> android:theme="@style/AppTheme" />
<activity android:name=".logging.LogSettingActivity"></activity> <activity android:name=".plugins.Maintenance.activities.LogSettingActivity"></activity>
</application> </application>
</manifest> </manifest>

View file

@ -49,20 +49,16 @@ import info.nightscout.androidaps.events.EventPreferenceChange;
import info.nightscout.androidaps.events.EventRefreshGui; import info.nightscout.androidaps.events.EventRefreshGui;
import info.nightscout.androidaps.interfaces.PluginBase; import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.logging.L; import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.logging.LogSettingActivity;
import info.nightscout.androidaps.plugins.ConfigBuilder.ProfileFunctions; import info.nightscout.androidaps.plugins.ConfigBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.Food.FoodPlugin;
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSSettingsStatus; import info.nightscout.androidaps.plugins.NSClientInternal.data.NSSettingsStatus;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.androidaps.setupwizard.SetupWizardActivity; import info.nightscout.androidaps.setupwizard.SetupWizardActivity;
import info.nightscout.androidaps.tabs.TabPageAdapter; import info.nightscout.androidaps.tabs.TabPageAdapter;
import info.nightscout.utils.AndroidPermission; import info.nightscout.utils.AndroidPermission;
import info.nightscout.utils.ImportExportPrefs;
import info.nightscout.utils.LocaleHelper; import info.nightscout.utils.LocaleHelper;
import info.nightscout.utils.LogDialog;
import info.nightscout.utils.OKDialog; import info.nightscout.utils.OKDialog;
import info.nightscout.utils.PasswordProtection; import info.nightscout.utils.PasswordProtection;
import info.nightscout.utils.SP; import info.nightscout.utils.SP;
import info.nightscout.utils.VersionChecker;
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
private static Logger log = LoggerFactory.getLogger(L.CORE); private static Logger log = LoggerFactory.getLogger(L.CORE);
@ -118,6 +114,7 @@ public class MainActivity extends AppCompatActivity {
public void onPageScrollStateChanged(int state) { public void onPageScrollStateChanged(int state) {
} }
}); });
VersionChecker.check();
} }
private void checkPluginPreferences(ViewPager viewPager) { private void checkPluginPreferences(ViewPager viewPager) {
@ -377,35 +374,6 @@ public class MainActivity extends AppCompatActivity {
case R.id.nav_setupwizard: case R.id.nav_setupwizard:
startActivity(new Intent(this, SetupWizardActivity.class)); startActivity(new Intent(this, SetupWizardActivity.class));
return true; return true;
case R.id.nav_resetdb:
new AlertDialog.Builder(this)
.setTitle(R.string.nav_resetdb)
.setMessage(R.string.reset_db_confirm)
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
MainApp.getDbHelper().resetDatabases();
// should be handled by Plugin-Interface and
// additional service interface and plugin registry
FoodPlugin.getPlugin().getService().resetFood();
TreatmentsPlugin.getPlugin().getService().resetTreatments();
})
.create()
.show();
return true;
case R.id.nav_export:
ImportExportPrefs.verifyStoragePermissions(this);
ImportExportPrefs.exportSharedPreferences(this);
return true;
case R.id.nav_import:
ImportExportPrefs.verifyStoragePermissions(this);
ImportExportPrefs.importSharedPreferences(this);
return true;
case R.id.nav_show_logcat:
LogDialog.showLogcat(this);
return true;
case R.id.nav_logsettings:
startActivity(new Intent(this, LogSettingActivity.class));
return true;
case R.id.nav_about: case R.id.nav_about:
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(MainApp.gs(R.string.app_name) + " " + BuildConfig.VERSION); builder.setTitle(MainApp.gs(R.string.app_name) + " " + BuildConfig.VERSION);

View file

@ -23,7 +23,6 @@ import org.slf4j.LoggerFactory;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import ch.qos.logback.classic.LoggerContext;
import info.nightscout.androidaps.data.ConstraintChecker; import info.nightscout.androidaps.data.ConstraintChecker;
import info.nightscout.androidaps.db.DatabaseHelper; import info.nightscout.androidaps.db.DatabaseHelper;
import info.nightscout.androidaps.interfaces.PluginBase; import info.nightscout.androidaps.interfaces.PluginBase;
@ -40,6 +39,7 @@ import info.nightscout.androidaps.plugins.Insulin.InsulinOrefFreePeakPlugin;
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefRapidActingPlugin; import info.nightscout.androidaps.plugins.Insulin.InsulinOrefRapidActingPlugin;
import info.nightscout.androidaps.plugins.Insulin.InsulinOrefUltraRapidActingPlugin; import info.nightscout.androidaps.plugins.Insulin.InsulinOrefUltraRapidActingPlugin;
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin; import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.Maintenance.MaintenancePlugin;
import info.nightscout.androidaps.plugins.Loop.LoopPlugin; import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
import info.nightscout.androidaps.plugins.NSClientInternal.NSClientPlugin; import info.nightscout.androidaps.plugins.NSClientInternal.NSClientPlugin;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload; import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
@ -79,6 +79,7 @@ import info.nightscout.androidaps.receivers.KeepAliveReceiver;
import info.nightscout.androidaps.receivers.NSAlarmReceiver; import info.nightscout.androidaps.receivers.NSAlarmReceiver;
import info.nightscout.androidaps.services.Intents; import info.nightscout.androidaps.services.Intents;
import info.nightscout.utils.FabricPrivacy; import info.nightscout.utils.FabricPrivacy;
import info.nightscout.androidaps.plugins.Maintenance.LoggerUtils;
import io.fabric.sdk.android.Fabric; import io.fabric.sdk.android.Fabric;
@ -128,7 +129,7 @@ public class MainApp extends Application {
log.info("Version: " + BuildConfig.VERSION_NAME); log.info("Version: " + BuildConfig.VERSION_NAME);
log.info("BuildVersion: " + BuildConfig.BUILDVERSION); log.info("BuildVersion: " + BuildConfig.BUILDVERSION);
String extFilesDir = this.getLogDirectory(); String extFilesDir = LoggerUtils.getLogDirectory();
File engineeringModeSemaphore = new File(extFilesDir, "engineering_mode"); File engineeringModeSemaphore = new File(extFilesDir, "engineering_mode");
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile(); engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile();
@ -190,6 +191,7 @@ public class MainApp extends Application {
pluginsList.add(StatuslinePlugin.initPlugin(this)); pluginsList.add(StatuslinePlugin.initPlugin(this));
pluginsList.add(PersistentNotificationPlugin.getPlugin()); pluginsList.add(PersistentNotificationPlugin.getPlugin());
pluginsList.add(NSClientPlugin.getPlugin()); pluginsList.add(NSClientPlugin.getPlugin());
pluginsList.add(MaintenancePlugin.initPlugin(this));
pluginsList.add(sConfigBuilder = ConfigBuilderPlugin.getPlugin()); pluginsList.add(sConfigBuilder = ConfigBuilderPlugin.getPlugin());
@ -389,11 +391,6 @@ public class MainApp extends Application {
return devBranch; return devBranch;
} }
public String getLogDirectory() {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
return lc.getProperty("EXT_FILES_DIR");
}
@Override @Override
public void onTerminate() { public void onTerminate() {
if (L.isEnabled(L.CORE)) if (L.isEnabled(L.CORE))

View file

@ -120,7 +120,7 @@ public abstract class PluginBase {
} }
} else { // disabling plugin } else { // disabling plugin
if (state == State.ENABLED) { if (state == State.ENABLED) {
onStateChange(type, state, State.ENABLED); onStateChange(type, state, State.DISABLED);
state = State.DISABLED; state = State.DISABLED;
onStop(); onStop();
if (L.isEnabled(L.CORE)) if (L.isEnabled(L.CORE))

View file

@ -8,9 +8,9 @@ import info.nightscout.utils.SP;
public class L { public class L {
public static class LogElement { public static class LogElement {
String name; public String name;
boolean defaultValue; boolean defaultValue;
boolean enabled; public boolean enabled;
boolean requiresRestart = false; boolean requiresRestart = false;
LogElement(String name, boolean defaultValue) { LogElement(String name, boolean defaultValue) {

View file

@ -1,14 +1,17 @@
package info.nightscout.utils; package info.nightscout.androidaps.plugins.Maintenance;
import android.Manifest; import android.Manifest;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Environment; import android.os.Environment;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -25,6 +28,8 @@ import java.util.Map;
import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
import info.nightscout.androidaps.events.EventAppExit; import info.nightscout.androidaps.events.EventAppExit;
import info.nightscout.utils.OKDialog;
import info.nightscout.utils.ToastUtils;
/** /**
* Created by mike on 03.07.2016. * Created by mike on 03.07.2016.
@ -45,7 +50,6 @@ public class ImportExportPrefs {
// Check if we have write permission // Check if we have write permission
int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);
if (permission != PackageManager.PERMISSION_GRANTED) { if (permission != PackageManager.PERMISSION_GRANTED) {
// We don't have permission so prompt the user // We don't have permission so prompt the user
ActivityCompat.requestPermissions( ActivityCompat.requestPermissions(
@ -56,7 +60,22 @@ public class ImportExportPrefs {
} }
} }
public static void exportSharedPreferences(final Activity c) { public static void verifyStoragePermissions(Fragment fragment) {
int permission = ContextCompat.checkSelfPermission(fragment.getContext(),
Manifest.permission.WRITE_EXTERNAL_STORAGE);
if (permission != PackageManager.PERMISSION_GRANTED) {
// We don't have permission so prompt the user
fragment.requestPermissions(PERMISSIONS_STORAGE, REQUEST_EXTERNAL_STORAGE);
}
}
public static void exportSharedPreferences(final Fragment f) {
exportSharedPreferences(f.getContext());
}
public static void exportSharedPreferences(final Context c) {
new AlertDialog.Builder(c) new AlertDialog.Builder(c)
.setMessage(MainApp.gs(R.string.export_to) + " " + file + " ?") .setMessage(MainApp.gs(R.string.export_to) + " " + file + " ?")
@ -86,13 +105,17 @@ public class ImportExportPrefs {
.show(); .show();
} }
public static void importSharedPreferences(final Activity c) { public static void importSharedPreferences(final Fragment fragment) {
new AlertDialog.Builder(c) importSharedPreferences(fragment.getContext());
}
public static void importSharedPreferences(final Context context) {
new AlertDialog.Builder(context)
.setMessage(MainApp.gs(R.string.import_from) + " " + file + " ?") .setMessage(MainApp.gs(R.string.import_from) + " " + file + " ?")
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(c); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = prefs.edit(); SharedPreferences.Editor editor = prefs.edit();
String line; String line;
String[] lineParts; String[] lineParts;
@ -113,20 +136,20 @@ public class ImportExportPrefs {
} }
reader.close(); reader.close();
editor.commit(); editor.commit();
OKDialog.show(c, MainApp.gs(R.string.setting_imported), MainApp.gs(R.string.restartingapp), new Runnable() { OKDialog.show(context, MainApp.gs(R.string.setting_imported), MainApp.gs(R.string.restartingapp), new Runnable() {
@Override @Override
public void run() { public void run() {
log.debug("Exiting"); log.debug("Exiting");
MainApp.instance().stopKeepAliveService(); MainApp.instance().stopKeepAliveService();
MainApp.bus().post(new EventAppExit()); MainApp.bus().post(new EventAppExit());
MainApp.closeDbHelper(); MainApp.closeDbHelper();
c.finish(); // context.finish();
System.runFinalization(); System.runFinalization();
System.exit(0); System.exit(0);
} }
}); });
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
ToastUtils.showToastInUiThread(c, MainApp.gs(R.string.filenotfound) + " " + file); ToastUtils.showToastInUiThread(context, MainApp.gs(R.string.filenotfound) + " " + file);
log.error("Unhandled exception", e); log.error("Unhandled exception", e);
} catch (IOException e) { } catch (IOException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception", e);

View file

@ -0,0 +1,28 @@
package info.nightscout.androidaps.plugins.Maintenance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.LoggerContext;
/**
* This class provides serveral methods for log-handling (eg. sending logs as emails).
*/
public class LoggerUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(LoggerUtils.class);
public static String SUFFIX = ".log.zip";
/**
* Returns the directory, in which the logs are stored on the system. This is configured in the
* logback.xml file.
*
* @return
*/
public static String getLogDirectory() {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
return lc.getProperty("EXT_FILES_DIR");
}
}

View file

@ -0,0 +1,83 @@
package info.nightscout.androidaps.plugins.Maintenance;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.plugins.Food.FoodPlugin;
import info.nightscout.androidaps.plugins.Maintenance.activities.LogSettingActivity;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
/**
*
*/
public class MaintenanceFragment extends Fragment {
private Fragment f;
@Override
public void onResume() {
super.onResume();
this.f = this;
}
@Override
public void onPause() {
super.onPause();
this.f = null;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.maintenance_fragment, container, false);
final Fragment f = this;
view.findViewById(R.id.log_send).setOnClickListener(view1 -> MaintenancePlugin.getPlugin().sendLogs());
view.findViewById(R.id.log_delete).setOnClickListener(view1 -> MaintenancePlugin.getPlugin().deleteLogs());
view.findViewById(R.id.nav_resetdb).setOnClickListener(view1 -> new AlertDialog.Builder(f.getContext())
.setTitle(R.string.nav_resetdb)
.setMessage(R.string.reset_db_confirm)
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
MainApp.getDbHelper().resetDatabases();
// should be handled by Plugin-Interface and
// additional service interface and plugin registry
FoodPlugin.getPlugin().getService().resetFood();
TreatmentsPlugin.getPlugin().getService().resetTreatments();
})
.create()
.show());
view.findViewById(R.id.nav_export).setOnClickListener(view1 -> {
// start activity for checking permissions...
ImportExportPrefs.verifyStoragePermissions(f);
ImportExportPrefs.exportSharedPreferences(f);
});
view.findViewById(R.id.nav_import).setOnClickListener(view1 -> {
// start activity for checking permissions...
ImportExportPrefs.verifyStoragePermissions(f);
ImportExportPrefs.importSharedPreferences(f);
});
view.findViewById(R.id.nav_logsettings).setOnClickListener(view1 -> {
startActivity(new Intent(getActivity(), LogSettingActivity.class));
});
return view;
}
}

View file

@ -0,0 +1,234 @@
package info.nightscout.androidaps.plugins.Maintenance;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.v4.content.FileProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PluginDescription;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.utils.SP;
public class MaintenancePlugin extends PluginBase {
private static final Logger LOG = LoggerFactory.getLogger(MaintenancePlugin.class);
private final Context ctx;
private static MaintenancePlugin maintenancePlugin;
public static MaintenancePlugin getPlugin() {
return maintenancePlugin;
}
public static MaintenancePlugin initPlugin(Context ctx) {
if (maintenancePlugin == null) {
maintenancePlugin = new MaintenancePlugin(ctx);
}
return maintenancePlugin;
}
public MaintenancePlugin() {
// required for testing
super(null);
this.ctx = null;
}
MaintenancePlugin(Context ctx) {
super(new PluginDescription()
.mainType(PluginType.GENERAL)
.fragmentClass(MaintenanceFragment.class.getName())
.alwayVisible(false)
.alwaysEnabled(true)
.pluginName(R.string.maintenance)
.shortName(R.string.maintenance_shortname)
.preferencesId(R.xml.pref_maintenance)
.description(R.string.description_maintenance)
);
this.ctx = ctx;
}
public void sendLogs() {
String recipient = SP.getString("key_maintenance_logs_email", "logs@androidaps.org");
int amount = SP.getInt("key_maintenance_logs_amount", 2);
String logDirectory = LoggerUtils.getLogDirectory();
List<File> logs = this.getLogfiles(logDirectory, amount);
File zipDir = this.ctx.getExternalFilesDir("exports");
File zipFile = new File(zipDir, this.constructName());
LOG.debug("zipFile: {}", zipFile.getAbsolutePath());
File zip = this.zipLogs(zipFile, logs);
Uri attachementUri = FileProvider.getUriForFile(this.ctx, "info.nightscout.androidaps.fileprovider", zip);
Intent emailIntent = this.sendMail(attachementUri, recipient, "Log Export");
LOG.debug("sending emailIntent");
ctx.startActivity(emailIntent);
}
//todo replace this with a call on startup of the application, specifically to remove
// unnecessary garbage from the log exports
public void deleteLogs() {
String logDirectory = LoggerUtils.getLogDirectory();
File logDir = new File(logDirectory);
File[] files = logDir.listFiles((file, name) -> name.startsWith("AndroidAPS")
&& name.endsWith(".zip"));
Arrays.sort(files, (f1, f2) -> f1.getName().compareTo(f2.getName()));
List<File> delFiles = Arrays.asList(files);
int amount = SP.getInt("key_logshipper_amount", 2);
int keepIndex = amount - 1;
if (keepIndex < delFiles.size()) {
delFiles = delFiles.subList(keepIndex, delFiles.size());
for (File file : delFiles) {
file.delete();
}
}
File exportDir = new File(logDirectory, "exports");
if (exportDir.exists()) {
File[] expFiles = exportDir.listFiles();
for (File file : expFiles) {
file.delete();
}
exportDir.delete();
}
}
/**
* returns a list of log files. The number of returned logs is given via the amount
* parameter.
*
* The log files are sorted by the name descending.
*
* @param directory
* @param amount
* @return
*/
public List<File> getLogfiles(String directory, int amount) {
LOG.debug("getting {} logs from directory {}", amount, directory);
File logDir = new File(directory);
File[] files = logDir.listFiles((file, name) -> name.startsWith("AndroidAPS")
&& (name.endsWith(".log")
|| (name.endsWith(".zip") && !name.endsWith(LoggerUtils.SUFFIX))));
Arrays.sort(files, (f1, f2) -> f2.getName().compareTo(f1.getName()));
List<File> result = Arrays.asList(files);
int toIndex = amount++;
if (toIndex > result.size()) {
toIndex = result.size();
}
LOG.debug("returning sublist 0 to {}", toIndex);
return result.subList(0, toIndex);
}
public File zipLogs(File zipFile, List<File> files) {
LOG.debug("creating zip {}", zipFile.getAbsolutePath());
try {
zip(zipFile, files);
} catch (IOException e) {
LOG.error("Cannot retrieve zip", e);
}
return zipFile;
}
/**
* construct the name of zip file which is used to export logs.
*
* The name is constructed using the following scheme:
* AndroidAPS_LOG_ + Long Time + .log.zip
*
* @return
*/
public String constructName() {
return "AndroidAPS_LOG_" + String.valueOf(new Date().getTime()) + LoggerUtils.SUFFIX;
}
public void zip(File zipFile, List<File> files) throws IOException {
final int BUFFER_SIZE = 2048;
ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipFile)));
for (File file : files) {
byte data[] = new byte[BUFFER_SIZE];
try(FileInputStream fileInputStream = new FileInputStream( file )) {
try(BufferedInputStream origin = new BufferedInputStream(fileInputStream, BUFFER_SIZE)) {
ZipEntry entry = new ZipEntry(file.getName());
out.putNextEntry(entry);
int count;
while ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {
out.write(data, 0, count);
}
}
}
}
out.close();
}
/**
* send a mail with the given file to the recipients with the given subject.
*
* the returned intent should be used to really send the mail using
*
* startActivity(Intent.createChooser(emailIntent , "Send email..."));
*
* @param attachementUri
* @param recipient
* @param subject
* @return
*/
public static Intent sendMail(Uri attachementUri, String recipient, String subject) {
LOG.debug("sending email to {} with subject {}", recipient, subject);
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("text/plain");
emailIntent.putExtra(Intent.EXTRA_EMAIL , new String[]{recipient});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(Intent.EXTRA_TEXT, "");
LOG.debug("put path {}", attachementUri.toString());
emailIntent.putExtra(Intent.EXTRA_STREAM, attachementUri);
emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return emailIntent;
}
}

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.logging; package info.nightscout.androidaps.plugins.Maintenance.activities;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
@ -14,6 +14,7 @@ import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import butterknife.Unbinder; import butterknife.Unbinder;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
import info.nightscout.androidaps.logging.L;
public class LogSettingActivity extends AppCompatActivity { public class LogSettingActivity extends AppCompatActivity {

View file

@ -57,6 +57,7 @@ public class NSUpload {
data.put("eventType", CareportalEvent.TEMPBASAL); data.put("eventType", CareportalEvent.TEMPBASAL);
data.put("duration", temporaryBasal.durationInMinutes); data.put("duration", temporaryBasal.durationInMinutes);
data.put("absolute", temporaryBasal.absoluteRate); data.put("absolute", temporaryBasal.absoluteRate);
data.put("rate", temporaryBasal.absoluteRate);
if (temporaryBasal.pumpId != 0) if (temporaryBasal.pumpId != 0)
data.put("pumpId", temporaryBasal.pumpId); data.put("pumpId", temporaryBasal.pumpId);
data.put("created_at", DateUtil.toISOString(temporaryBasal.date)); data.put("created_at", DateUtil.toISOString(temporaryBasal.date));
@ -81,12 +82,16 @@ public class NSUpload {
try { try {
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext()); SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
boolean useAbsolute = SP.getBoolean("ns_sync_use_absolute", false); boolean useAbsolute = SP.getBoolean("ns_sync_use_absolute", false);
Profile profile = ProfileFunctions.getInstance().getProfile(temporaryBasal.date);
double absoluteRate = 0;
if (profile != null) {
absoluteRate = profile.getBasal(temporaryBasal.date) * temporaryBasal.percentRate / 100d;
}
if (useAbsolute) { if (useAbsolute) {
TemporaryBasal t = temporaryBasal.clone(); TemporaryBasal t = temporaryBasal.clone();
t.isAbsolute = true; t.isAbsolute = true;
Profile profile = ProfileFunctions.getInstance().getProfile();
if (profile != null) { if (profile != null) {
t.absoluteRate = profile.getBasal(temporaryBasal.date) * temporaryBasal.percentRate / 100d; t.absoluteRate = absoluteRate;
uploadTempBasalStartAbsolute(t, null); uploadTempBasalStartAbsolute(t, null);
} }
} else { } else {
@ -95,6 +100,8 @@ public class NSUpload {
data.put("eventType", CareportalEvent.TEMPBASAL); data.put("eventType", CareportalEvent.TEMPBASAL);
data.put("duration", temporaryBasal.durationInMinutes); data.put("duration", temporaryBasal.durationInMinutes);
data.put("percent", temporaryBasal.percentRate - 100); data.put("percent", temporaryBasal.percentRate - 100);
if (profile != null)
data.put("rate", absoluteRate);
if (temporaryBasal.pumpId != 0) if (temporaryBasal.pumpId != 0)
data.put("pumpId", temporaryBasal.pumpId); data.put("pumpId", temporaryBasal.pumpId);
data.put("created_at", DateUtil.toISOString(temporaryBasal.date)); data.put("created_at", DateUtil.toISOString(temporaryBasal.date));

View file

@ -66,6 +66,7 @@ public class Notification {
public static final int PERMISSION_SMS = 38; public static final int PERMISSION_SMS = 38;
public static final int MAXIMUM_BASAL_VALUE_REPLACED = 39; public static final int MAXIMUM_BASAL_VALUE_REPLACED = 39;
public static final int NSMALFUNCTION = 40; public static final int NSMALFUNCTION = 40;
public static final int NEWVERSIONDETECTED = 41;
public int id; public int id;

View file

@ -67,7 +67,7 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
@Override @Override
public void onStateChange(PluginType type, State oldState, State newState) { public void onStateChange(PluginType type, State oldState, State newState) {
// if pump profile was enabled need to switch to another too // if pump profile was enabled need to switch to another too
if (type == PluginType.PUMP && newState == State.ENABLED && newState == State.DISABLED && isProfileInterfaceEnabled) { if (type == PluginType.PUMP && newState == State.DISABLED && isProfileInterfaceEnabled) {
setPluginEnabled(PluginType.PROFILE, false); setPluginEnabled(PluginType.PROFILE, false);
NSProfilePlugin.getPlugin().setPluginEnabled(PluginType.PROFILE, true); NSProfilePlugin.getPlugin().setPluginEnabled(PluginType.PROFILE, true);
NSProfilePlugin.getPlugin().setFragmentVisible(PluginType.PROFILE, true); NSProfilePlugin.getPlugin().setFragmentVisible(PluginType.PROFILE, true);

View file

@ -51,7 +51,7 @@ import info.nightscout.androidaps.setupwizard.elements.SWEditUrl;
import info.nightscout.androidaps.setupwizard.events.EventSWLabel; import info.nightscout.androidaps.setupwizard.events.EventSWLabel;
import info.nightscout.androidaps.setupwizard.events.EventSWUpdate; import info.nightscout.androidaps.setupwizard.events.EventSWUpdate;
import info.nightscout.utils.AndroidPermission; import info.nightscout.utils.AndroidPermission;
import info.nightscout.utils.ImportExportPrefs; import info.nightscout.androidaps.plugins.Maintenance.ImportExportPrefs;
import info.nightscout.utils.LocaleHelper; import info.nightscout.utils.LocaleHelper;
import info.nightscout.utils.PasswordProtection; import info.nightscout.utils.PasswordProtection;
import info.nightscout.utils.SP; import info.nightscout.utils.SP;

View file

@ -1,67 +0,0 @@
package info.nightscout.utils;
import android.app.AlertDialog;
import android.content.ClipData;
import android.content.Context;
import android.content.DialogInterface;
import android.content.ClipboardManager;
import android.widget.TextView;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
/**
* Created by mike on 09.02.2017.
*/
public class LogDialog {
public static void showLogcat(Context context) {
String logCat = "no logs";
final String processId = Integer.toString(android.os.Process.myPid());
try {
Process process = Runtime.getRuntime().exec("logcat -d " + MainApp.gs(R.string.app_name) + ":D");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
StringBuilder log = new StringBuilder();
String line;
while ((line = bufferedReader.readLine()) != null) {
if (line.contains(processId)) log.append(line + "\n");
}
logCat = log.toString();
} catch (IOException e) {
logCat = e.getLocalizedMessage();
} finally {
showAlertText(logCat, context);
}
}
public static void showAlertText(final String msg, final Context context) {
try {
AlertDialog alertDialog = new AlertDialog.Builder(context)
.setMessage(msg)
.setPositiveButton(MainApp.gs(R.string.copy_to_clipboard), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
clipboard.setPrimaryClip(ClipData.newPlainText(null, msg));
ToastUtils.showToastInUiThread(context, MainApp.gs(R.string.copied_to_clipboard));
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
if (msg.length() > 100) {
TextView textView = (TextView) alertDialog.findViewById(android.R.id.message);
textView.setTextSize(10);
}
} catch (Exception e) {
// crashing on screen rotation
}
}
}

View file

@ -1,7 +1,9 @@
package info.nightscout.utils; package info.nightscout.utils;
import android.app.Activity; import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.os.Handler;
import android.os.SystemClock; import android.os.SystemClock;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.view.ContextThemeWrapper; import android.support.v7.view.ContextThemeWrapper;
@ -21,8 +23,12 @@ public class OKDialog {
private static Logger log = LoggerFactory.getLogger(OKDialog.class); private static Logger log = LoggerFactory.getLogger(OKDialog.class);
public static void show(final Activity activity, String title, String message, final Runnable runnable) { public static void show(final Activity activity, String title, String message, final Runnable runnable) {
show(activity, title, message, runnable);
}
public static void show(final Context context, String title, String message, final Runnable runnable) {
try { try {
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme)); AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(context, R.style.AppTheme));
builder.setTitle(title); builder.setTitle(title);
builder.setMessage(message); builder.setMessage(message);
builder.setPositiveButton(MainApp.gs(R.string.ok), new DialogInterface.OnClickListener() { builder.setPositiveButton(MainApp.gs(R.string.ok), new DialogInterface.OnClickListener() {
@ -30,7 +36,7 @@ public class OKDialog {
dialog.dismiss(); dialog.dismiss();
if (runnable != null) { if (runnable != null) {
SystemClock.sleep(100); SystemClock.sleep(100);
activity.runOnUiThread(runnable); runOnUiThread(runnable);
} }
} }
}); });
@ -41,6 +47,11 @@ public class OKDialog {
} }
} }
public static boolean runOnUiThread(Runnable theRunnable) {
final Handler mainHandler = new Handler(MainApp.instance().getApplicationContext().getMainLooper());
return mainHandler.post(theRunnable);
}
public static void show(final Activity activity, String title, Spanned message, final Runnable runnable) { public static void show(final Activity activity, String title, Spanned message, final Runnable runnable) {
try { try {
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme)); AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme));

View file

@ -0,0 +1,97 @@
package info.nightscout.utils;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import info.nightscout.androidaps.BuildConfig;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
import static android.content.Context.CONNECTIVITY_SERVICE;
public class VersionChecker {
private static Logger log = LoggerFactory.getLogger(L.CORE);
public static void check() {
if (isConnected())
new Thread(() -> {
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("https://raw.githubusercontent.com/MilosKozak/AndroidAPS/master/app/build.gradle");
HttpResponse response;
try {
response = client.execute(request);
InputStream inputStream = response.getEntity().getContent();
if (inputStream != null) {
String result = findLine(inputStream);
if (result != null) {
result = result.replace("version", "").replace("\"", "").replace("\\s+", "").trim();
int compare = result.compareTo(BuildConfig.VERSION_NAME.replace("\"", ""));
if (compare == 0) {
log.debug("Version equal to master");
return;
} else if (compare > 0) {
log.debug("Version outdated. Found " + result);
Notification notification = new Notification(Notification.NEWVERSIONDETECTED, String.format(MainApp.gs(R.string.versionavailable), result), Notification.LOW);
MainApp.bus().post(new EventNewNotification(notification));
return;
} else {
log.debug("Version newer than master. Are you developer?");
return;
}
}
}
log.debug("Github master version not found");
} catch (IOException e) {
e.printStackTrace();
log.debug("Github master version check error");
}
}).start();
else
log.debug("Github master version no checked. No connectivity");
}
// convert inputstream to String
private static String findLine(InputStream inputStream) throws IOException {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
String line;
String regex = "(.*)version(.*)\"(\\d+)\\.(\\d+)\"(.*)";
Pattern p = Pattern.compile(regex);
while ((line = bufferedReader.readLine()) != null) {
Matcher m = p.matcher(line);
if (m.matches())
return line;
}
inputStream.close();
return null;
}
// check network connection
public static boolean isConnected() {
ConnectivityManager connMgr = (ConnectivityManager) MainApp.instance().getApplicationContext().getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
return networkInfo != null && networkInfo.isConnected();
}
}

View file

@ -4,7 +4,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
tools:context=".logging.LogSettingActivity"> tools:context=".plugins.Maintenance.activities.LogSettingActivity">
<Button <Button
android:id="@+id/logsettings_reset" android:id="@+id/logsettings_reset"

View file

@ -0,0 +1,93 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="2dp"
tools:context="info.nightscout.androidaps.plugins.Maintenance.MaintenanceFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/nav_logsettings"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_weight="0.5"
android:text="@string/nav_logsettings"
android:textColor="@color/colorTreatmentButton" />
<Button
android:id="@+id/log_send"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_weight="0.5"
android:text="@string/send_all_logs"
android:textColor="@color/colorTreatmentButton" />
<Button
android:id="@+id/log_delete"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_weight="0.5"
android:text="@string/delete_logs"
android:textColor="@color/colorTreatmentButton" />
<Button
android:id="@+id/nav_export"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_weight="0.5"
android:text="@string/nav_export"
android:textColor="@color/colorTreatmentButton" />
<Button
android:id="@+id/nav_import"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_weight="0.5"
android:text="@string/nav_import"
android:textColor="@color/colorTreatmentButton" />
<Button
android:id="@+id/nav_resetdb"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_weight="0.5"
android:text="@string/nav_resetdb"
android:textColor="@color/colorTreatmentButton" />
</LinearLayout>
</FrameLayout>

View file

@ -18,26 +18,6 @@
android:id="@+id/nav_setupwizard" android:id="@+id/nav_setupwizard"
app:showAsAction="never" app:showAsAction="never"
android:title="@string/nav_setupwizard" /> android:title="@string/nav_setupwizard" />
<item
android:id="@+id/nav_resetdb"
app:showAsAction="never"
android:title="@string/nav_resetdb" />
<item
android:id="@+id/nav_export"
app:showAsAction="never"
android:title="@string/nav_export" />
<item
android:id="@+id/nav_import"
app:showAsAction="never"
android:title="@string/nav_import" />
<item
android:id="@+id/nav_show_logcat"
app:showAsAction="never"
android:title="@string/nav_show_logcat" />
<item
android:id="@+id/nav_logsettings"
app:showAsAction="never"
android:title="@string/nav_logsettings" />
<item <item
android:id="@+id/nav_about" android:id="@+id/nav_about"
app:showAsAction="never" app:showAsAction="never"

View file

@ -1020,6 +1020,5 @@
<string name="allow_hardware_pump_text">Внимание: Ако активирате и свържете с хардуерна помпа, AndroidAPS ще копира основните настройки от профила в помпата, като презапише съществуващата базова скорост, съхранявана на помпата. Уверете се, че имате правилните основни настройки в AndroidAPS. Ако не сте сигурни или не искате да презапишете основните настройки на помпата, натиснете Cancel и повторете превключването към помпата по-късно.</string> <string name="allow_hardware_pump_text">Внимание: Ако активирате и свържете с хардуерна помпа, AndroidAPS ще копира основните настройки от профила в помпата, като презапише съществуващата базова скорост, съхранявана на помпата. Уверете се, че имате правилните основни настройки в AndroidAPS. Ако не сте сигурни или не искате да презапишете основните настройки на помпата, натиснете Cancel и повторете превключването към помпата по-късно.</string>
<string name="error_adding_treatment_title">Данните за лечението не са пълни</string> <string name="error_adding_treatment_title">Данните за лечението не са пълни</string>
<string name="error_adding_treatment_message">Събитие (инсулин: %1$.2f, въглехидрати: %2$d, в: %3$s) не може да бъде добавено към събития. Моля уверете се, че е правилно и го добавете ръчно.</string> <string name="error_adding_treatment_message">Събитие (инсулин: %1$.2f, въглехидрати: %2$d, в: %3$s) не може да бъде добавено към събития. Моля уверете се, че е правилно и го добавете ръчно.</string>
<string name="generated_ecarbs_note">Генерирани eCarbs с параметри: %1$dгр, продължителност: %2$dh, след: %3$dm</string>
<string name="openaps_noasdata">Няма налични данни за авточувствителност</string> <string name="openaps_noasdata">Няма налични данни за авточувствителност</string>
</resources> </resources>

View file

@ -1018,8 +1018,28 @@
<string name="allow_hardware_pump_text">POZOR: Pokud aktivuje a připojíte skutečnou pumpu, AndroidAPS nakopíruje (a bude udržovat) nastavení bazálu z aktivního profilu do pumpy. Nastavení bazálu v pumpě bude přepsáno. Pokud si nejste jistí nebo nechcete přepsat bazály v pumpě, stiskněte Zrušit a opakujte přepnutí na jinou pumpu později.</string> <string name="allow_hardware_pump_text">POZOR: Pokud aktivuje a připojíte skutečnou pumpu, AndroidAPS nakopíruje (a bude udržovat) nastavení bazálu z aktivního profilu do pumpy. Nastavení bazálu v pumpě bude přepsáno. Pokud si nejste jistí nebo nechcete přepsat bazály v pumpě, stiskněte Zrušit a opakujte přepnutí na jinou pumpu později.</string>
<string name="error_adding_treatment_title">Data ošetření neúplná</string> <string name="error_adding_treatment_title">Data ošetření neúplná</string>
<string name="error_adding_treatment_message">Ošetření (inzulín: %1$.2f, sacharidy: %2$d, čas: %3$s) nelze přidat. Zkontrolujte a podle potřeby ručně přidejte záznam.</string> <string name="error_adding_treatment_message">Ošetření (inzulín: %1$.2f, sacharidy: %2$d, čas: %3$s) nelze přidat. Zkontrolujte a podle potřeby ručně přidejte záznam.</string>
<string name="generated_ecarbs_note">Generované eCarbs: %1$dg, délka: %2$dh, zpoždění: %3$dm</string> <string name="generated_ecarbs_note">eCarbs: %1$d g (%2$d h), zpoždění: %3$d m</string>
<string name="openaps_noasdata">Nedostupná data o glykémiích</string> <string name="openaps_noasdata">Nedostupná data o glykémiích</string>
<string name="nav_logsettings">Nastavení logování</string> <string name="nav_logsettings">Nastavení logování</string>
<string name="resettodefaults">Obnovit výchozí</string> <string name="resettodefaults">Obnovit výchozí</string>
<string name="nsmalfunction">Chyba NSClienta. Zvažte restart NS a NSClienta.</string>
<string name="versionavailable">Verze %1$s je k dispozici</string>
<plurals name="objective_days">
<item quantity="one">%1$d den</item>
<item quantity="few">%1$d dnů</item>
<item quantity="many">%1$d dnů</item>
<item quantity="other">%1$d dnů</item>
</plurals>
<plurals name="objective_hours">
<item quantity="one">%1$d hodina</item>
<item quantity="few">%1$d hodin</item>
<item quantity="many">%1$d hodin</item>
<item quantity="other">%1$d hodin</item>
</plurals>
<plurals name="objective_minutes">
<item quantity="one">%1$d minuta</item>
<item quantity="few">%1$d minut</item>
<item quantity="many">%1$d minut</item>
<item quantity="other">%1$d minut</item>
</plurals>
</resources> </resources>

View file

@ -789,6 +789,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate</string>
<string name="insight_min">min</string> <string name="insight_min">min</string>
<string name="insight_remaining_over">verbleibend über</string> <string name="insight_remaining_over">verbleibend über</string>
<string name="insight_total_with">insgesamt mit</string> <string name="insight_total_with">insgesamt mit</string>
<string name="insight_upfront_with">insgesamt mit</string>
<string name="insight_stay_always_connected">Bleibe immer verbunden</string> <string name="insight_stay_always_connected">Bleibe immer verbunden</string>
<string name="insight_history_idle">LEERLAUF</string> <string name="insight_history_idle">LEERLAUF</string>
<string name="insight_history_syncing">SYNCHRONISIERUNG</string> <string name="insight_history_syncing">SYNCHRONISIERUNG</string>
@ -1019,7 +1020,6 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate</string>
<string name="allow_hardware_pump_text">WARNUNG: Wenn Du eine echte Pumpe aktivierst und anschließt, kopiert AndroidAPS die Basaleinstellungen vom aktiven Profil zur Pumpe (und behält sie bei). Die Einstellungen in der Pumpe werden hierbei überschrieben. Wenn Du Dir nicht sicher bist oder die Basaleinstellungen in der Pumpe nicht überschreiben möchten, drücke \"Abbrechen\" und vollziehe den Wechsel zur Pumpe später.</string> <string name="allow_hardware_pump_text">WARNUNG: Wenn Du eine echte Pumpe aktivierst und anschließt, kopiert AndroidAPS die Basaleinstellungen vom aktiven Profil zur Pumpe (und behält sie bei). Die Einstellungen in der Pumpe werden hierbei überschrieben. Wenn Du Dir nicht sicher bist oder die Basaleinstellungen in der Pumpe nicht überschreiben möchten, drücke \"Abbrechen\" und vollziehe den Wechsel zur Pumpe später.</string>
<string name="error_adding_treatment_title">Behandlungsdaten unvollständig</string> <string name="error_adding_treatment_title">Behandlungsdaten unvollständig</string>
<string name="error_adding_treatment_message">Der Eintrag (Insulin: %1$.2f, Kohlenhydrate: %2$d, um: %3$s) konnte nicht als Behandlung gespeichert werden. Bitte überprüfe die aktuelle Liste und füge, falls notwendig, den Datensatz manuell hinzu.</string> <string name="error_adding_treatment_message">Der Eintrag (Insulin: %1$.2f, Kohlenhydrate: %2$d, um: %3$s) konnte nicht als Behandlung gespeichert werden. Bitte überprüfe die aktuelle Liste und füge, falls notwendig, den Datensatz manuell hinzu.</string>
<string name="generated_ecarbs_note">eCarbs: %1$d g (%2$d h), Verzug: %3$d m</string>
<string name="openaps_noasdata">Keine Autosens-Daten verfügbar</string> <string name="openaps_noasdata">Keine Autosens-Daten verfügbar</string>
<string name="nav_logsettings">Log-Einstellungen</string> <string name="nav_logsettings">Log-Einstellungen</string>
<string name="resettodefaults">Auf Standardwerte zurücksetzen</string> <string name="resettodefaults">Auf Standardwerte zurücksetzen</string>

View file

@ -1,3 +1,549 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com--> <!--Generated by crowdin.com-->
<resources></resources> <resources>
<string name="treatmentssafety_title">Setări siguranță tratament</string>
<string name="treatmentssafety_maxbolus_title">Bolus maxim admis [U]</string>
<string name="treatmentssafety_maxcarbs_title">Carbohidrați admiși maxim [g]</string>
<string name="nav_preferences">Preferințe</string>
<string name="nav_refreshtreatments">Reîncarcă tratamentele din NS</string>
<string name="nav_resetdb">Resetează bazele de date</string>
<string name="reset_db_confirm">Sigur resetați bazele de date?</string>
<string name="nav_exit">Ieșire</string>
<string name="danar_useextended_title">Folosiți bolusuri extinse pentru &gt;200%</string>
<string name="danar_bt_name_title">Dispozitive bluetooth DanaR</string>
<string name="ns_sync_use_absolute_title">Folosește întotdeauna valori absolute ale bazalei</string>
<string name="alert_dialog_storage_permission_text">Restartați telefonul sau reporniți aplicația AndroidAPS din System Settings \naltfel AndroidAPS nu va putea face loguri (importante pentru verificarea corectitudinii funcționării algoritmilor)!</string>
<string name="description_actions">Butoane pentru accesarea celor mai comune facilităţi</string>
<string name="description_careportal">Accesaţi secţiunea de loguri avansate.</string>
<string name="description_config_builder">Folosit pentru configurarea facilităţilor active</string>
<string name="description_objectives">Program de învăţare</string>
<string name="description_food">Afişează mâncărurile predefinite în Nightscout</string>
<string name="description_insulin_rapid">Setări prestabilite pentru insulinele Humalog sau NovoRapid / NovoLog</string>
<string name="description_insulin_ultra_rapid">Setări prestabilite pentru Fiasp</string>
<string name="description_insulin_free_peak">Vă permite definirea vârfului activităţii insulinei şi ar trebui folosit doar de către utilizatorii avansaţi</string>
<string name="description_loop">Activare sau dezactivare a implementării declanşatoare pentru buclă.</string>
<string name="description_ns_client">Sincronizare a datelor cu Nightscout</string>
<string name="description_ma">Starea algoritmului în 2016</string>
<string name="description_ama">Starea algoritmului în 2017</string>
<string name="description_smb">Cel mai recent algoritm destinat utilizatorilor avansaţi</string>
<string name="description_overview">Afişează starea curentă a buclei şi butoanele pentru cele mai folosite acţiuni</string>
<string name="description_persistent_notification">Afişează o notificare activă cu o scurtă descriere referitoare la starea buclei</string>
<string name="description_profile_local">Defineşte un profil care este disponibil offline.</string>
<string name="description_profile_nightscout">Foloseşte profilul predefinit deja în Nightscout</string>
<string name="description_profile_simple">Definește un profil cu un singur bloc de timp.</string>
<string name="description_pump_combo">Integrare cu pompele Accu-Chek, necesită aplicația Ruffy</string>
<string name="description_pump_dana_r">Integrare cu pompele DANA Diabcare R</string>
<string name="description_pump_dana_r_korean">Integrare cu pompele DANA Diabcare R coreene</string>
<string name="description_pump_dana_r_v2">Integrare cu pompele DANA Diabcare R cu firmware upgradat</string>
<string name="description_pump_dana_rs">Integrare cu pompele DANA Diabcare RS</string>
<string name="description_pump_insight">Integrare cu pompele Accu-Chek Insight, necesită aplicația SightRemote</string>
<string name="description_pump_mdi">Integrare cu pompă virtuală, pentru persoanele ce folosesc terapia cu pen</string>
<string name="description_pump_virtual">Integrare cu pompele ce nu au încă un driver software disponibil (Buclă Deschisă)</string>
<string name="description_sensitivity_aaps">Sensibilitatea este calculată la fel ca în algoritmul Oref0, dar se poate specifica un interval de timp în trecut. Absorbția minimă de carbohidrați este calculată din parametrul echivalent, stabilit în preferințe.</string>
<string name="description_sensitivity_oref0">Sensibilitatea este calcuată din datele disponibile în ultimele 24 de ore, iar carbohidrații (când nu sunt absorbiți) sunt ignorați după timpul specificat în preferințe.</string>
<string name="description_sensitivity_oref1">Sensibilitatea este calculată folosind datele din ultimele 8 ore, iar cabohidrații (când nu sunt absorbiți) sunt ignorați după timpul specificat în preferințe. Se calculează, de asemenea, UAM.</string>
<string name="description_sensitivity_weighted_average">Sensibilitatea este calculată ca o medie ponderată a deviațiilor. Deviațiile noi au o importanță mai mare. Absorbția minimă de carbohidrați este calculată în funcție de parametrul absorbție maximă de carbohidrați, stabilit în preferințe. Acest algoritm este cel mai rapid atunci când sensibilitatea la insulină este fluctuantă.</string>
<string name="description_source_dexcom_g5">Primește valorile glicemiei din aplicația Dexcom G5 modificată.</string>
<string name="description_source_glimp">Primește valorile glicemiei din aplicația Glimp.</string>
<string name="description_source_mm640g">Primește valorile glicemiei din aplicația 600SeriesAndroidUploader (Medtronic).</string>
<string name="description_source_ns_client">Descarcă datele despre glicemii din Nightscout</string>
<string name="description_source_xdrip">Primește valorile glicemiei din xDrip.</string>
<string name="description_treatments">Salvează toate tratamentele făcute</string>
<string name="description_wear">Monitorizează și controlează aplicația AndroidAPS folosind smartwatchul WearOS.</string>
<string name="description_xdrip_status_line">Afișează informații privind starea buclei pe watchface-ul xDrip+.</string>
<string name="description_sms_communicator">Controlare de la distanță a AndroidAPS folosind comenzi date prin SMS.</string>
<string name="objectives_button_start">Start</string>
<string name="objectives_button_verify">Verifică</string>
<string name="nsprofileview_units_label">Unități</string>
<string name="nsprofileview_dia_label">DIA</string>
<string name="nsprofileview_ic_label">IC</string>
<string name="nsprofileview_isf_label">ISF</string>
<string name="nsprofileview_basal_label">Bazală</string>
<string name="nsprofileview_target_label">Țintă</string>
<string name="noprofileset">NICIUN PROFIL SETAT</string>
<string name="treatments_insulin_label_string">Insulină:</string>
<string name="treatments_carbs_label_string">Carbohidrați:</string>
<string name="treatments_iob_label_string">IOB:</string>
<string name="sms_iob">IOB:</string>
<string name="treatments_activity_string">Activitate:</string>
<string name="treatments_iobtotal_label_string">IOB total:</string>
<string name="treatments_iobactivitytotal_label_string">Activitate total IOB:</string>
<string name="tempbasals_realduration_label_string">Durată:</string>
<string name="tempbasals_netratio_label_string">Raport:</string>
<string name="tempbasals_netinsulin_label_string">Ins:</string>
<string name="tempbasals_iob_label_string">IOB:</string>
<string name="tempbasals_iobtotal_label_string">IOB totală:</string>
<string name="treatments_newtreatment_insulinamount_label">Cantitatea de insulină</string>
<string name="treatments_newtreatment_carbsamount_label">Cantitatea de carbohidrați</string>
<string name="treatments_wizard_bg_label">Glicemie</string>
<string name="treatments_wizard_tt_label">TT</string>
<string name="treatments_wizard_carbs_label">Carbohidrați</string>
<string name="treatments_wizard_correction_label">Corecție</string>
<string name="insulin_unit_shortname">U</string>
<string name="treatments_wizard_bolusiob_label">IOB bolus</string>
<string name="openapsma_run">Execută</string>
<string name="vitualpump_label">POMPĂ VIRTUALĂ</string>
<string name="pump_basebasalrate_label">Rată bazală normală</string>
<string name="pump_tempbasal_label">Bazală temporară</string>
<string name="virtualpump_extendedbolus_label">Bolus extins</string>
<string name="pump_battery_label">Baterie</string>
<string name="pump_reservoir_label">Rezervor</string>
<string name="virtualpump_resultok">OK</string>
<string name="openapsma_lastrun_label">Ultima execuție</string>
<string name="openapsma_inputparameters_label">Parametri de intrare</string>
<string name="openapsma_glucosestatus_label">Stare glicemie</string>
<string name="openapsma_currenttemp_label">Temp curentă</string>
<string name="openapsma_iobdata_label">Date IOB</string>
<string name="openapsma_profile_label">Profil</string>
<string name="openapsma_mealdata_label">Date despre masă</string>
<string name="result">Rezultat</string>
<string name="openapsma_noglucosedata">Nu există date despre glicemie</string>
<string name="nochangerequested">Nu este solicitată nicio schimbare</string>
<string name="openapsma_request_label">Solicită</string>
<string name="rate">Rată</string>
<string name="duration">Durată</string>
<string name="reason">Motiv</string>
<string name="glucose">Glicemie</string>
<string name="delta">Diferență</string>
<string name="sms_delta">Diferență:</string>
<string name="configbuilder">Configurator</string>
<string name="objectives">Obiective</string>
<string name="openapsma">OpenAPS MA</string>
<string name="overview">Privire de ansamblu</string>
<string name="nsprofile">Profil NS</string>
<string name="simpleprofile">Profil simplu</string>
<string name="tempbasal">BazalăTemp</string>
<string name="treatments">Tratamente</string>
<string name="virtualpump">Pompă virtuală</string>
<string name="careportal">Careportal</string>
<string name="configbuilder_pump">Pompă</string>
<string name="configbuilder_pump_description">Ce pompă doriți să folosiți cu AndroidAPS?</string>
<string name="configbuilder_treatments">Tratamente</string>
<string name="configbuilder_treatments_description">Ce plugin doriți să folosiți pentru gestionarea tratamentelor?</string>
<string name="configbuilder_profile">Profil</string>
<string name="configbuilder_profile_description">Ce profil doriți să folosească AndroidAPS?</string>
<string name="configbuilder_aps">APS</string>
<string name="configbuilder_aps_description">Ce algoritm APS doriți să decidă ajustările de insulină?</string>
<string name="configbuilder_general">General</string>
<string name="configbuilder_general_description">Există pluginuri generale pe care le-ați putea găsi utile.</string>
<string name="configbuilder_constraints_description">Ce constrângeri sunt aplicate?</string>
<string name="days">zile</string>
<string name="constraints">Constrângeri</string>
<string name="loop">Buclă</string>
<string name="configbuilder_loop">Buclă</string>
<string name="configbuilder_loop_description">Folosiți aceasta pentru a activa facilitățile de buclă a AndroidAPS.</string>
<string name="loop_aps_label">APS</string>
<string name="loop_constraintsprocessed_label">Constrângeri după procesare</string>
<string name="loop_tbrsetbypump_label">Bazală Temporală programată în pompă</string>
<string name="openapsma_lastenact_label">Ultima acțiune executată</string>
<string name="ok">OK</string>
<string name="cancel">Renunță</string>
<string name="noapsselected">NU AȚI SELECTAT APS SAU NU EXISTĂ REZULTAT GENERAT</string>
<string name="safety">Siguranță</string>
<string name="openapsma_disabled">Modul inactiv</string>
<string name="constraints_violation">Încălcare a unei limite</string>
<string name="treatmentdeliveryerror">Eroare la livrarea bolusului</string>
<string name="tempbasaldeliveryerror">Eroare la setare bazală temporară</string>
<string name="overview_newtempbasal_basalpercent">Valoare bazală [%]</string>
<string name="overview_newtempbasal_percent_label">% (100% = curent)</string>
<string name="setbasalquestion">Acceptă noua bazală temporară:</string>
<string name="overview_treatment_label">Tratament</string>
<string name="overview_calculator_label">Calculator</string>
<string name="constraintapllied">Limitare aplicată!</string>
<string name="confirmation">Confirmare</string>
<string name="entertreatmentquestion">Introduceți tratament nou:</string>
<string name="bolus">Bolus</string>
<string name="sms_bolus">Bolus:</string>
<string name="basal">Bazală</string>
<string name="sms_basal">Bazală:</string>
<string name="carbs">Carbohidrați</string>
<string name="changeyourinput">Schimbați ceea ce ați introdus!</string>
<string name="setextendedbolusquestion">Setați un nou bolus extins:</string>
<string name="configbuilder_bgsource">Sursă glicemie</string>
<string name="configbuilder_bgsource_description">De unde trebuie să primească AndroidAPS datele?</string>
<string name="xdrip">xDrip</string>
<string name="apsmode_title">Mod APS</string>
<string name="closedloop">Buclă închisă</string>
<string name="openloop">Buclă deschisă</string>
<string name="disabledloop">Buclă inactivă</string>
<string name="disableloop">Dezactivează bucla</string>
<string name="enableloop">Activează bucla</string>
<string name="openloop_newsuggestion">O nouă sugestie este disponibilă</string>
<string name="unsupportedclientver">Versiune incompatibilă de NSClient</string>
<string name="unsupportednsversion">Versiune incompatibilă de Nightscout</string>
<string name="nsclientnotinstalled">NSClient nu este instalat. Înregistrare pierdută!</string>
<string name="objectives_bgavailableinns">Glicemie disponibilă în NS</string>
<string name="objectives_pumpstatusavailableinns">Starea pompei disponibilă în NS</string>
<string name="objectives_manualenacts">Acțiuni manuale</string>
<string name="loopdisabled">BUCLĂ DEZACTIVATĂ DATORITĂ CONSTRÂNGERILOR</string>
<string name="treatments_wizard_basaliob_label">IOB bazală</string>
<string name="bolusconstraintapplied">Constrângere de bolus aplicată</string>
<string name="carbsconstraintapplied">Constrângere de carbohidrați aplicată</string>
<string name="careportal_bgcheck">Verificare glicemie</string>
<string name="careportal_announcement">Anunț</string>
<string name="careportal_note">Notă</string>
<string name="careportal_question">Întrebare</string>
<string name="careportal_exercise">Activitate fizică</string>
<string name="careportal_pumpsitechange">Schimbare loc pompă</string>
<string name="careportal_cgmsensorinsert">Inserare senzor</string>
<string name="careportal_cgmsensorstart">Start senzor</string>
<string name="careportal_insulincartridgechange">Schimbare cartuș insulină</string>
<string name="careportal_profileswitch">Schimbare profil</string>
<string name="careportal_snackbolus">Gustare</string>
<string name="careportal_mealbolus">Masă</string>
<string name="careportal_correctionbolus">Bolus de corecție</string>
<string name="careportal_combobolus">Bolus combo</string>
<string name="careportal_tempbasalstart">Start bazală temporară</string>
<string name="careportal_tempbasalend">Sfârșit bazală temporară</string>
<string name="careportal_carbscorrection">Corecție de carbohidrați</string>
<string name="careportal_openapsoffline">OpenAPS Offline</string>
<string name="careportal_newnstreatment_eventtype">Tip eveniment</string>
<string name="careportal_newnstreatment_other">Altul</string>
<string name="careportal_newnstreatment_meter">Glucometru</string>
<string name="careportal_newnstreatment_sensor">Senzor</string>
<string name="careportal_newnstreatment_carbs_label">Carbohidrați</string>
<string name="careportal_newnstreatment_insulin_label">Insulină</string>
<string name="careportal_newnstreatment_carbtime_label">Ora carbohidrați</string>
<string name="careportal_newnstreatment_split_label">Împarte</string>
<string name="careportal_newnstreatment_duration_label">Durată</string>
<string name="careportal_newnstreatment_percent_label">Procent</string>
<string name="careportal_newnstreatment_absolute_label">Absolut</string>
<string name="careportal_newnstreatment_notes_label">Note</string>
<string name="careportal_newnstreatment_eventtime_label">Ora evenimentului</string>
<string name="careportal_newnstreatment_profile_label">Profil</string>
<string name="careportal_newnstreatment_enteredby_title">Introdus de</string>
<string name="careportal_newnstreatment_glucosetype">Tip glicemie</string>
<string name="noprofile">Nu am încărcat încă un profil din NS</string>
<string name="overview_tempbasal_button">Bazală temporară</string>
<string name="overview_extendedbolus_button">Bolus extins</string>
<string name="configbuilder_nightscoutversion_label">Versiune Nightscout:</string>
<string name="missing">Lipsă</string>
<string name="exported">Am exportat preferințele</string>
<string name="export_to">Exportă setările către</string>
<string name="import_from">Importă setările din</string>
<string name="setting_imported">Setări importate</string>
<string name="filenotfound">Nu am găsit fișierul</string>
<string name="nav_export">Exportă setările</string>
<string name="nav_import">Importă setările</string>
<string name="openapsma_maxbasal_title">Maximul de unități de insulină pe oră poate fi setat la</string>
<string name="openapsma_maxbasal_summary">Această valoare este denumită bazală maximă în contextul OpenAPS</string>
<string name="openapsma_maxiob_title">Maximul de bazală IOB pe care o poate livra OpenAPS[U]</string>
<string name="openapsma_maxiob_summary">Această valoare este denumită Max IOB în contextul OpenAPS\nAceastă valoare este implicit nulă (0). După câteva zile sau săptămâni, în funcție de opțiunea dumneavoastră, puteți ajusta acest număr.</string>
<string name="dismiss">RENUNȚĂ</string>
<string name="danarpump">DanaR</string>
<string name="connecting">Se conectează</string>
<string name="connected">Conectat</string>
<string name="disconnected">Deconectat</string>
<string name="danar_pump_settings">Setări pompă DanaR</string>
<string name="end_user_license_agreement">Licență utilizator final</string>
<string name="end_user_license_agreement_text">NU FOLOSIȚI PENTRU LUAREA DE DECIZII MEDICALE. NU EXISTĂ RĂSPUNDERE LEGALĂ SAU GARANȚIE PENTRU ACEST PROGRAM, ÎN LIMITA APLICABILĂ A LEGII. CU EXCEPTIA CAZURILOR SPECIAL MENȚIONATE, AUTORUL ȘI/SAU ALTE PERSOANE IMPLICATE PUN LA DISPOZIȚIE ACEST PROGRAM FĂRĂ NICIO GARANȚIE, IMPLICITĂ SAU EXPLICITĂ, INCLUZÂND, DAR FĂRĂ A SE LIMITA LA, GARANȚIILE LEGATE DE VĂNZAREA SAU POTRIVIREA PENTRU UN ANUME SCOP. ÎNTREGUL RISC LEGAT DE CALITATEA ȘI PERFORMANȚA ACESTUI PROGRAM CAD ÎN RESPONSABILITATEA DUMNEAVOASTRĂ. DACĂ PROGRAMUL SE DOVEDEȘTE A FI DEFECT, DUMNEAVOASTRĂ VĂ ASUMAȚI ÎNTREAGA RĂSPUNDERE, PRECUM ȘI TOATE COSTURILE LEGATE DE SERVICE, REPARAȚII SAU CORECȚII.</string>
<string name="end_user_license_agreement_i_understand">ÎNȚELEG ȘI SUNT DE ACORD</string>
<string name="save">Salvează</string>
<string name="nobtadapter">Nu s-a găsit niciun adaptor bluetooth</string>
<string name="devicenotfound">Dispozitivul selectat nu a fost găsit</string>
<string name="connectionerror">Eroare de conexiune cu pompa</string>
<string name="danar_iob_label">IOB din pompă</string>
<string name="danar_dailyunits">Unități zilnic</string>
<string name="pump_lastbolus_label">Ultimul bolus</string>
<string name="hoursago">%.1f o în urmă</string>
<string name="danar_invalidinput">Date de intrare incorecte</string>
<string name="danar_valuenotsetproperly">Valoare setată incorect</string>
<string name="reloadprofile">Reîncarcă profilul</string>
<string name="danar_viewprofile">Afișează profilul</string>
<string name="enacted">Executat</string>
<string name="comment">Comentariu</string>
<string name="success">Succes</string>
<string name="percent">Procent</string>
<string name="absolute">Absolut</string>
<string name="canceltemp">Renunță la bazala temporară</string>
<string name="smscommunicator">Comunicator SMS</string>
<string name="waitingforpumpresult">Se așteaptă rezultatul</string>
<string name="smscommunicator_allowednumbers">Numere de telefon permise</string>
<string name="smscommunicator_allowednumbers_summary">+ XXXXXXXXXX; + YYYYYYYYYY</string>
<string name="smscommunicator_bolusreplywithcode">Pentru a livra un bolus de %1$.2fU răspundeți cu codul %2$s</string>
<string name="smscommunicator_calibrationreplywithcode">Pentru a trimite calibrarea cu %1$.2f răspundeți cu codul %2$s</string>
<string name="smscommunicator_bolusfailed">Bolusare eșuată</string>
<string name="bolusdelivered" formatted="false">Bolusul de %.2fU livrat cu succes</string>
<string name="bolusrequested" formatted="false">Se va livra un bolus de %.2fU</string>
<string name="smscommunicator_bolusdelivered" formatted="false">Bolusul de %.2fU a fost livrat cu succes</string>
<string name="bolusdelivering" formatted="false">Se livrează %.2fU</string>
<string name="smscommunicator_remotecommandsallowed">Permite comenzi de la distanță, prin SMS</string>
<string name="smscommunicator_remotebolusnotallowed">Bolusarea prin comenzi de la distanță nu este permisă</string>
<string name="glucosetype_finger">Deget</string>
<string name="glucosetype_sensor">Senzor</string>
<string name="manual">Manual</string>
<string name="careportal_temporarytarget">Țintă temporară</string>
<string name="careportal_temporarytargetcancel">Renunțare la ținta temporară</string>
<string name="danarprofile">Setări de profil DanaR</string>
<string name="danarprofile_dia">DIA [o]</string>
<string name="danarprofile_dia_summary">Durata de Acțiune a Insulinei (DIA)</string>
<string name="failedupdatebasalprofile">Setarea profilului bazalei eșuată</string>
<string name="danar_historyreload">Reîncărcare</string>
<string name="uploading">Se trimite</string>
<string name="danar_ebolus">Bolus E</string>
<string name="danar_dsbolus">Bolus DS</string>
<string name="danar_debolus">Bolus DE</string>
<string name="danar_error">eroare</string>
<string name="danar_refill">reumplere</string>
<string name="danar_basalhour">bazală pe oră</string>
<string name="danar_glucose">glicemie</string>
<string name="danar_carbohydrate">carbohidrat</string>
<string name="danar_alarm">alarmă</string>
<string name="danar_totaluploaded">Au fost încărcate %1$d înregistrări</string>
<string name="danar_sbolus">Bolus S</string>
<string name="danar_history_alarm">Alarme</string>
<string name="danar_history_basalhours">Ore bazale</string>
<string name="danar_history_bolus">Bolusuri</string>
<string name="danar_history_carbohydrates">Carbohidrați</string>
<string name="danar_history_dailyinsulin">Insulină zilnică</string>
<string name="danar_history_errors">Erori</string>
<string name="danar_history_glucose">Glicemie</string>
<string name="danar_history_refill">Reumplere</string>
<string name="danar_history_syspend">Suspendare</string>
<string name="danar_history_connectingfor">Conectat de %1$d s</string>
<string name="danar_password_title">Parola pompei</string>
<string name="wrongpumppassword">Parola pompei greșită!</string>
<string name="pumpbusy">Pompa face altă acțiune</string>
<string name="overview_bolusprogress_delivered">Livrat</string>
<string name="overview_bolusprogress_stoped">Oprit</string>
<string name="bolusstopped">Bolus oprit</string>
<string name="bolusstopping">Se oprește bolusul</string>
<string name="occlusion">Ocluzie</string>
<string name="overview_bolusprogress_stop">Stop</string>
<string name="overview_bolusprogress_stoppressed">STOP APĂSAT</string>
<string name="waitingforpump">Se așteaptă pompa</string>
<string name="overview_bolusprogress_goingtodeliver" formatted="false">Se vor livra %.2fU</string>
<string name="objectives_0_objective">Se stabilesc vizualizările și monitorizarea și se analizează bazalele și valorile ratelor</string>
<string name="objectives_0_gate">Verificați că vedeți glicemia în Nightscout și că datele despre insulină date de pompă sunt înregistrate în site</string>
<string name="objectives_1_objective">Pornire în mod buclă deschisă</string>
<string name="objectives_1_gate">Rulați în modul Buclă Deschisă pentru câteva zile și faceți manual bazalele temporare sugerate. Setează și folosește ținte temporare implicite (ex.: pentru activități sau carbohidrați de tratare a hipo)</string>
<string name="objectives_2_objective">Trebuie să fie înțeleasă modalitatea de funcționare a buclei deschise, inclusiv recomandările de bazală temporară</string>
<string name="objectives_2_gate">Pe baza acestei experiențe, decideți care va fi bazala maximă și setați această valoare în pompă și în preferințe</string>
<string name="objectives_3_objective">Se începe etapa de buclă închisă cu Suspendarea Insulinei la Valori Glicemie Mici (Low Glucose Suspend = LGS)</string>
<string name="objectives_3_gate">Folosiți sistemul în mod buclă închisă cu IOB maxim = 0 pentru câteva zile fără prea multe evenimente LGS</string>
<string name="objectives_4_objective">Acordați fin performanța buclei închise, prin mărirea valorii max IOB peste 0 și micșorarea graduală a țintelor glicemice</string>
<string name="objectives_4_gate">Folosiți pentru câteva zile și cel puțin o noapte fără a avea alarme de hipoglicemie, înainte de scăderea glicemiei</string>
<string name="objectives_5_objective">Ajustați bazalele și ratele dacă este cazul și apoi activați autosens</string>
<string name="objectives_5_gate">O săptămână de folosire cu succes a sistemului cu buclă închisă cu introducerea normală de carbohidrați</string>
<string name="objectives_6_objective">Folosirea instrumentelor adiționale pentru timpul zilei, cum ar fi asistența avansată pentru mese</string>
<string name="objectives_7_objective">Se activează opțiuni pentru uzul în timpul zilei, cum ar fi SMB</string>
<string name="objectives_7_gate">Trebuie sa citiți wiki și măriți maxIOB pentru a obține SMB corect! Un start bun este maxIOB=media bolusurilor + 3x maxima bazalei din zi</string>
<string name="youareonallowedlimit">Ați atins limita permisă</string>
<string name="noprofileselected">Niciun profil selectat</string>
<string name="smscommunicator_loophasbeendisabled">Bucla a fost dezactivată</string>
<string name="smscommunicator_loophasbeenenabled">Bucla a fost activată</string>
<string name="smscommunicator_loopisdisabled">Bucla este dezactivată</string>
<string name="smscommunicator_loopisenabled">Bucla este activată</string>
<string name="valuelimitedto">%1$.2f este limitată la %2$.2f</string>
<string name="valueoutofrange" formatted="false">Valoarea %s este mai mare decât limita fizică</string>
<string name="smscommunicator_remotebasalnotallowed">Setarea de la distanță a bazalei nu este permisă</string>
<string name="smscommunicator_remotecommandnotallowed">Comanda de la distanță nu este permisă</string>
<string name="smscommunicator_basalreplywithcode">Pentru pornirea bazalei de %1$.2fU/h trimiteți codul %2$s</string>
<string name="smscommunicator_suspendreplywithcode">Pentru suspendarea buclei pentru %1$d minute trimiteți codul %2$s</string>
<string name="smscommunicator_tempbasalset">Bazala temporară %1$.2fU/h pentru %2$d minute a fost trimisă cu succes</string>
<string name="smscommunicator_tempbasalfailed">Trimiterea bazalei temporare a eșuat</string>
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Pentru oprirea bazalei temporare trimiteți codul %s</string>
<string name="smscommunicator_tempbasalcanceled">Bazala temporară a fost anulată</string>
<string name="smscommunicator_tempbasalcancelfailed">Renunțarea la bazala temporară a eșuat</string>
<string name="smscommunicator_unknowncommand">Comandă necunoscută sau răspuns greșit</string>
<string name="quickwizard">AsistentRapid</string>
<string name="overview_editquickwizardlistactivity_add">Adaugă</string>
<string name="overview_quickwizard_item_edit_button">Editează</string>
<string name="overview_quickwizard_item_remove_button">Șterge</string>
<string name="mealbolus">Masă</string>
<string name="correctionbous">Corecție</string>
<string name="actions">Acțiuni</string>
<string name="androidaps_start">AndroidAPS a pornit</string>
<string name="ns_upload_only">Doar încărcare în NS (sincronizare dezactivată)</string>
<string name="ns_upload_only_summary">Doar încărcare în NS. Nu are efect asupra SGV decât în cazul selectării unei surse locale, precum xDrip. Nu acționează asupra Profilurilor cât timp se folosesc profilurile din Nightscout.</string>
<string name="pumpNotInitialized">Pompa nu este inițializată!</string>
<string name="pumpNotInitializedProfileNotSet">Pompa nu este inițializată, profilul nu este setat!</string>
<string name="primefill">Pregătire/umplere</string>
<string name="fillwarning">Asigurați-vă că aveți cantitatea specificată de instrucțiunile setului de infuzie!</string>
<string name="othersettings_title">Alte</string>
<string name="fillbolus_title">Pregătire/umplere cu cantitățile standard de insulină.</string>
<string name="button1">Buton 1</string>
<string name="button2">Buton 2</string>
<string name="button3">Buton 3</string>
<string name="units">Unități:</string>
<string name="mgdl">mg/dl</string>
<string name="mmol">mmol/l</string>
<string name="dia">DIA:</string>
<string name="target_range">Intervalul țintă:</string>
<string name="prefs_range_title">Intervalul pentru vizualizare</string>
<string name="prefs_range_summary">Valoarea maximă și minimă pentru graficele din vizualizare și pentru smartwatch</string>
<string name="low_mark">Pragul HIPO</string>
<string name="high_mark">Pragul HIPER</string>
<string name="wear">Ceas</string>
<string name="resend_all_data">Retrimite toate datele</string>
<string name="open_settings_on_wear">Deschide setările pe Wear</string>
<string name="pumperror">Eroare a pompei</string>
<string name="lowbattery">Baterie aproape descărcată</string>
<string name="pumpshutdown">Pompa oprită</string>
<string name="batterydischarged">Bateria pompei este descărcată</string>
<string name="danarkoreanpump">DanaR din Coreea</string>
<string name="basal_rate">Rată bazală:</string>
<string name="profile_set_failed">Setarea profilului bazalei a eșuat</string>
<string name="profile_set_ok">Profilul bazalei a fost modificat în pompă</string>
<string name="danar_disableeasymode">Dezactivează modul EasyUI în pompă</string>
<string name="danar_enableextendedbolus">Activează bolusuri extinse în pompă</string>
<string name="danar_switchtouhmode">Schimbă din modul U/z în U/o în pompă</string>
<string name="basalvaluebelowminimum">Valoarea bazalei este sub minimul permis. Profilul nu este setat!</string>
<string name="sms_actualbg">Glicemie:</string>
<string name="sms_lastbg">Ultima glicemie:</string>
<string name="mdi">MDI</string>
<string name="MM640g">MM640g</string>
<string name="ongoingnotificaction">Notificare activă</string>
<string name="old_data">DATE VECHI</string>
<string name="minago">%1$d min în urmă</string>
<string name="sms_minago">acum %1$dmin</string>
<string name="openapsama_max_daily_safety_multiplier_summary">Valoare implicită: 3\nAceasta este o setare de critică de securitate a OpenAPS. Asta înseamnă că se limitează bazala lade 3x valoarea maximă a bazalelor tale.Cel mai probabil nu veți schimba această valoare, dar trebuie să țineți cont de ce se discută despre “3x max zilnic; 4x curent” ca valori de siguranță.</string>
<string name="openapsama_current_basal_safety_multiplier_summary">Valoare implicită: 4\nAceasta este cealaltă jumătate a cheii de siguranță a OpenAPS și cealaltă jumătate a \"3x max zilnic; 4x curent\" al setărilor de siguranță.Aceasta înseamnă că bazala dumneavoastră, indiferent de bazala maximă configurată în pompă, nu poate fi mai mare de acest număr înmulțit cu nivelul curent al bazalei active. Această limitare este impusă pentru a evita posibilitatea de a intra pe un teritoriu periculos prin setarea unei bazale maxime excesiv de mari înainte de a înțelege funcționarea algoritmului. Din nou, valoarea implictă este 4x; majoritatea oamenilor nu vor trebui să ajusteze această valoare și vor modifica, mai degrabă, alte valori dacă vor simți că această valoare le stă în cale.</string>
<string name="openapsama_autosens_max_summary">Valoare implicită: 1.2\nAceasta este valoarea limită de multiplicare pentru autosens (și pentru autotune, în curând) pentru a seta o limită maximă de 20% din cât de mare poate fi raportul autosens, care, la rândul ei, determină cât de mult poate autosens să modifice bazalele, cât de jos poate modifica ISF și cât de jos poate pune ținta glicemiei.</string>
<string name="openapsama_autosens_min_summary">Valoare implicită: 0.7\nCealaltă parte a limitelor autosens, care limitează cât de jos poate ajusta bazalele și cât de mult poate mări ISF și țintele de glicemie.</string>
<string name="openapsama_autosens_adjusttargets">Autosens ajustează țintele la</string>
<string name="openapsama_autosens_adjusttargets_summary">Valoare implicită: adevărat\nAceasta se folosește pentru a permite autosens să ajusteze țintele de glicemie, pe lângă modificările asupra ISF și bazalelor.</string>
<string name="openapsama_bolussnooze_dia_divisor_summary">Valoare implicită: 2\nAmânarea bolusului este aplicată după ce ați făcut un bolus de masă, astfel încât bucla să nu reacționeze cu ținte bazale temporare scăzute atunci când tocmai ați mâncat. Exemplul de față și valoarea implicită sunt 2; astfel o durată de acțiune a insulinei (DIA) de 3 ore duce la o eliminare treptată a întârzierii setării bazalelor temporare după 1.5 ore (3DIA/2).</string>
<string name="openapsama_min_5m_carbimpact_summary">Valoare implicită: 3.0\nAceasta este o setare ce privește impactul carbohidraților pe o durată de 5 minute. Valoarea implicită este de așteptat a fi 3mg/dl/5min. Aceasta afectează cât de mult se scade valoarea COB și cât de mare este presupusă a fi absorbția de carbohidrați în calcularea valorii prezise a glicemiei, atunci când glicemia scade cu mai mult decât s-a estimat sau când nu crește așa cum s-a așteptat.</string>
<string name="openapsama_link_to_preferncejson_doc_txt">Atenție!\nÎn mod normal nu este nevoie să modificați valorile de mai jos. Vă rog să APĂSAȚI AICI și să CITIȚI textul și să vă asigurați că l-ați ÎNȚELES înainte de a schimba valorile.</string>
<string name="error_only_numeric_digits_allowed">Se acceptă numai valori numerice.</string>
<string name="error_only_numeric_digits_range_allowed">Se acceptă numai valori numerice între %1$s - %2$s.</string>
<string name="error_field_must_not_be_empty">Acest câmp nu trebuie lăsat necompletat</string>
<string name="error_phone_not_valid">Numărul de telefon este invalid</string>
<string name="smscommunicator_invalidphonennumber">Număr de telefon SMS invalid</string>
<string name="copy_to_clipboard">Copiază în clipboard</string>
<string name="copied_to_clipboard">Copiat în clipboard</string>
<string name="nav_show_logcat">Afișează istoricul</string>
<string name="overview_calibration">Calibrare</string>
<string name="send_calibration" formatted="false">Trimite calibrarea %.1f către xDrip?</string>
<string name="xdripnotinstalled">xDrip+ nu este instalat.</string>
<string name="calibrationsent">Calibrare trimisă către xDrip</string>
<string name="smscommunicator_remotecalibrationnotallowed">Calibrarea la distanță nu este permisă</string>
<string name="smscommunicator_calibrationsent">Calibrare trimisă. Recepționarea trebuie să fie activată și în xDrip.</string>
<string name="smscommunicator_calibrationfailed">xDrip nu recepționează calibrări</string>
<string name="pumpsuspended">Livrare de insulină suspendată</string>
<string name="gettingpumpstatus">Se primește starea pompei</string>
<string name="settingtempbasal">Se setează bazala temporară</string>
<string name="stoppingtempbasal">Se oprește bazala temporară</string>
<string name="settingextendedbolus">Se pornește bolusul extins</string>
<string name="stoppingextendedbolus">Se oprește bolusul extins</string>
<string name="updatingbasalrates">Se restabilesc ratele bazale</string>
<string name="disconnecting">Se deconectează</string>
<string name="executing">Se execută</string>
<string name="virtualpump_settings">Setări pompă virtuală</string>
<string name="virtualpump_uploadstatus_title">Trimitere status către NS</string>
<string name="wrongpassword">Parolă greșită</string>
<string name="settings_password">Parola pentru setări</string>
<string name="unlock_settings">Deblochează setările</string>
<string name="approachingdailylimit">Se apropie limita zilnică de insulină</string>
<string name="nsclientinternal">Client NS</string>
<string name="nsclientinternal_shortname">NSCI</string>
<string name="nsclientinternal_url">URL:</string>
<string name="nsclientinternal_autoscroll">Derulare automată</string>
<string name="restart">Restartare</string>
<string name="nsclientinternal_title">Client NS</string>
<string name="nsclientinternal_url_title">Adresa Nightscout</string>
<string name="nsclientinternal_url_dialogmessage">Introduceți adresa Nightscout</string>
<string name="nsclientinternal_secret_title">Cheia API NS</string>
<string name="nsclientinternal_secret_dialogtitle">Cheia API NS</string>
<string name="nsclientinternal_secret_dialogmessage">Introduceți cheia API NS (min 12 caractere)</string>
<string name="enablesuperbolus_summary">Activează funcționalitatea de superbolus în asistentul de buclă. Nu activați până nu înțelegeți ce face cu adevărat. DACĂ ESTE FOLOSIT ÎN NECUNOȘTINȚĂ DE CAUZĂ POATE DUCE LA SUPRADOZĂ DE INSULINĂ!</string>
<string name="iob">IOB</string>
<string name="cob">COB</string>
<string name="virtualpump_firmware_label">Firmware</string>
<string name="pump_lastconnection_label">Ultima conexiune</string>
<string name="danar_bluetooth_status">Status bluetooth</string>
<string name="nav_about">Despre</string>
<string name="smscommunicator_missingsmspermission">Lipsesc permisiunile de SMS</string>
<string name="xdripstatus_settings">Status xDrip (ceas)</string>
<string name="xdripstatus">Linie de status xDrip (ceas)</string>
<string name="xdripstatus_shortname">xds</string>
<string name="wear_showbgi_title">Arată BGI</string>
<string name="wear_showbgi_summary">Adaugă BGI în linia de status</string>
<string name="ns_noupload">Fără trimitere către NS</string>
<string name="ns_noupload_summary">Toate trimiterile de date către NS sunt oprite. AAPS este conectat la NS dar nu se fac schimbări în NS</string>
<string name="basal_step">Pas bazală</string>
<string name="bolus_step">Pas bolus</string>
<string name="extendedbolus">BolusExtins</string>
<string name="temptarget">ȚintăTemporară</string>
<string name="overview_extendedbolus_cancel_button">Renunță la bolusul extins</string>
<string name="careportal_sensorage_label">Vechime senzor</string>
<string name="careportal_canulaage_label">Vechime canulă</string>
<string name="careportal_insulinage_label">Vechime insulină</string>
<string name="hours">ore</string>
<string name="overview_newtempbasal_basaltype_label">Tip bazală</string>
<string name="invalidprofile">Profil invalid!!!</string>
<string name="profileswitch">SchimbareProfil</string>
<string name="careportal_pbage_label">Vechime baterie pompă</string>
<string name="careportal_pumpbatterychange">Schimbare baterie pompă</string>
<string name="ns_alarmoptions">Opțiuni alarmare</string>
<string name="nsalarm_urgenthigh">Hiper urgent</string>
<string name="nsalarm_high">Hiper</string>
<string name="nsalarm_low">Hipo</string>
<string name="nsalarm_urgentlow">Hipo urgent</string>
<string name="nsalarm_staledata">Date învechite</string>
<string name="nsalarm_urgentstaledata">Date mult prea vechi</string>
<string name="nsalarm_staledatavalue_label">Prag vechime date [min]</string>
<string name="nsalarm_urgent_staledatavalue_label">Prag date mult prea vechi [min]</string>
<string name="openapsama_autosens_period">Interval pentru autosens [o]</string>
<string name="openapsama_autosens_period_summary">Numărul de ore din trecut pentru detectarea sensibilității (se exclude timpul de absorbție al carbo)</string>
<string name="openaps">OpenAPS</string>
<string name="uploader">Uploader</string>
<string name="configbuilder_sensitivity">Detectare sensibilitate</string>
<string name="configbuilder_sensitivity_description">Ce algoritm de detecție a sensibilității doriți să folosiți?</string>
<string name="sensitivity_shortname">SENS</string>
<string name="sensitivityoref0">Sensibilitate Oref0</string>
<string name="sensitivityoref1">Sensibilitate Oref1</string>
<string name="sensitivityaaps">Sensibilitate AAPS</string>
<string name="absorptionsettings_title">Setări absorbție</string>
<string name="remaininsulinalert">Nivel insulină rămas</string>
<string name="danarspump">DanaRS</string>
<string name="danarspump_shortname">Dana</string>
<string name="selectedpump">Pompa selectată</string>
<string name="pairpump">Conectare la pompă nouă</string>
<string name="bolusspeed">Viteză bolusare</string>
<string name="danar_setbasalstep001">Setare pas bazală la 0.01 U/o</string>
<string name="serialnumber">Număr serial</string>
<string name="careportal_newnstreatment_percentage_label">Procentaj</string>
<string name="careportal_newnstreatment_timeshift_label">Decalare</string>
<string name="default_temptargets">Ținte-Temporare implicite</string>
<string name="eatingsoon_duration">durată se-mănâncă-în-curând</string>
<string name="eatingsoon_target">țintă se-mănâncă-în-curând</string>
<string name="activity_duration">durată activitate</string>
<string name="activity_target">țintă activitate</string>
<string name="hypo_duration">durată țintă</string>
<string name="hypo_target">țintă hipo</string>
<string name="danar_history_prime">Amorsare</string>
<string name="gettingextendedbolusstatus">Se citește starea bolusului extins</string>
<string name="gettingbolusstatus">Se citește starea bolusului</string>
<string name="gettingtempbasalstatus">Se citește starea bazalei temporare</string>
<string name="gettingpumpsettings">Se citesc setările pompei</string>
<string name="gettingpumptime">Se citește ora pompei</string>
<string name="reuse">refolosire</string>
<string name="wearcontrol_title">Controlare din ceas</string>
<string name="wearcontrol_summary">Setare Ținte-Temporare și se introduc Tratamente din ceas.</string>
<string name="connectiontimedout">Conectare eșuată</string>
<string name="food">Mâncare</string>
<string name="shortgramm">g</string>
<string name="shortminute">min</string>
<string name="shorthour">o</string>
<string name="none"><![CDATA[<nimic>]]></string>
<string name="shortkilojoul">kJ</string>
<string name="shortenergy">En</string>
<string name="shortprotein">Pr</string>
<string name="shortfat">Grăsime</string>
<string name="active"><![CDATA[<Activ>]]></string>
<string name="waitingforestimatedbolusend">Se așteaptă terminarea bolusării. Mai sunt %1$d secunde.</string>
<string name="processinghistory">Se procesează activitatea</string>
<string name="startingbolus">Pornire livrare bolus</string>
<string name="executingrightnow">Se execută comanda chiar acum</string>
<string name="pumpdrivercorrected">S-a corectat driverul pompei</string>
<string name="pump_unreachable">Pompă indisponibilă</string>
<string name="missed_bg_readings">Lipsesc date glicemie</string>
<string name="raise_notifications_as_android_notifications">Se folosesc notificările sistemului pentru alerte și notificări</string>
<string name="localalertsettings_title">Alerte locale</string>
<string name="enable_missed_bg_readings_alert">Alarmează dacă nu se primesc glicemii</string>
<string name="enable_pump_unreachable_alert">Se alertează dacă pompa este indisponibilă</string>
<string name="pump_unreachable_threshold">Prag pompă indisponibilă [min]</string>
<string name="urgent_alarm">Alarmă urgentă</string>
</resources>

View file

@ -1020,7 +1020,6 @@
<string name="allow_hardware_pump_text">Varning: Om du aktiverar och ansluter en pump, kommer AndroidAPS skriva över pumpens basalprofil med den aktiva profilen i AndroidAPS. Se till att ha rätt inställningar i appen innan du ansluter. Om du är osäker, tryck på Avbryt och anslut pumpen på nytt vid ett senare tillfälle.</string> <string name="allow_hardware_pump_text">Varning: Om du aktiverar och ansluter en pump, kommer AndroidAPS skriva över pumpens basalprofil med den aktiva profilen i AndroidAPS. Se till att ha rätt inställningar i appen innan du ansluter. Om du är osäker, tryck på Avbryt och anslut pumpen på nytt vid ett senare tillfälle.</string>
<string name="error_adding_treatment_title">Behandlingsdata ofullständigt</string> <string name="error_adding_treatment_title">Behandlingsdata ofullständigt</string>
<string name="error_adding_treatment_message">En behandling (insulin: %1$.2f, kolhydrater: %2$d, tid: %3$s) kunde inte läggas till listan i Behandlingar. Vänligen kontrollera och lägg till en post manuellt vid behov.</string> <string name="error_adding_treatment_message">En behandling (insulin: %1$.2f, kolhydrater: %2$d, tid: %3$s) kunde inte läggas till listan i Behandlingar. Vänligen kontrollera och lägg till en post manuellt vid behov.</string>
<string name="generated_ecarbs_note">Genererade eCarbs för %1$dg kolhydrater över %2$dh med fördröjning på %3$dm</string>
<string name="openaps_noasdata">Ingen data tillgänglig för autosens</string> <string name="openaps_noasdata">Ingen data tillgänglig för autosens</string>
<string name="nav_logsettings">Loggningsinställningar</string> <string name="nav_logsettings">Loggningsinställningar</string>
<string name="resettodefaults">Återställ standardinställningar</string> <string name="resettodefaults">Återställ standardinställningar</string>

View file

@ -2,9 +2,9 @@
<!--Generated by crowdin.com--> <!--Generated by crowdin.com-->
<resources> <resources>
<string name="treatmentssafety_title">治疗安全</string> <string name="treatmentssafety_title">治疗安全</string>
<string name="treatmentssafety_maxbolus_title">最大允许推注 [U]</string> <string name="treatmentssafety_maxbolus_title">允许的最大大剂量值[U]</string>
<string name="treatmentssafety_maxcarbs_title">最大允许碳水化合物 [g]</string> <string name="treatmentssafety_maxcarbs_title">最大允许碳水化合物 [g]</string>
<string name="nav_preferences">选项</string> <string name="nav_preferences">参数选项</string>
<string name="nav_refreshtreatments">从Nightscout刷新治疗数据</string> <string name="nav_refreshtreatments">从Nightscout刷新治疗数据</string>
<string name="nav_resetdb">重置数据库</string> <string name="nav_resetdb">重置数据库</string>
<string name="reset_db_confirm">你真的想重置数据库吗?</string> <string name="reset_db_confirm">你真的想重置数据库吗?</string>
@ -39,10 +39,10 @@
<string name="description_pump_insight">与Accu-Check Insight 胰岛素泵集成,需要安装 SightRemote软件</string> <string name="description_pump_insight">与Accu-Check Insight 胰岛素泵集成,需要安装 SightRemote软件</string>
<string name="description_pump_mdi">与用于糖尿病治疗的多次每日注射的泵集成</string> <string name="description_pump_mdi">与用于糖尿病治疗的多次每日注射的泵集成</string>
<string name="description_pump_virtual">与我们还没有其驱动的泵集成(开环)</string> <string name="description_pump_virtual">与我们还没有其驱动的泵集成(开环)</string>
<string name="description_sensitivity_aaps">灵敏度的计算方式与 Oref0 相同, 但可以指定过去的时间范围。碳水化合物吸收最小值是根据属性里的碳水化合物吸收时间最大值计算得来的</string> <string name="description_sensitivity_aaps">灵敏度的计算方式与 Oref0 相同, 但可以指定过去的时间范围。碳水化合物吸收最小值是根据参数选项里的碳水化合物吸收时间最大值计算得来的</string>
<string name="description_sensitivity_oref0">灵敏度是根据过去的24小时数据计算出来的, 而碳水化合物 (如果不吸收) 则在属性里指定的时间后减掉</string> <string name="description_sensitivity_oref0">灵敏度是根据过去的24小时数据计算出来的, 而碳水化合物 (如果不吸收) 则在参数选项里指定的时间后减掉</string>
<string name="description_sensitivity_oref1">灵敏度是根据过去的24小时数据计算出来的, 而碳水化合物 (如果不吸收) 则在属性里指定的时间后减掉。插件还计算 UAM。</string> <string name="description_sensitivity_oref1">灵敏度是根据过去的24小时数据计算出来的, 而碳水化合物 (如果不吸收) 则在参数选项里指定的时间后减掉。插件还计算 UAM。</string>
<string name="description_sensitivity_weighted_average">灵敏度计算根据偏差的加权平均值。新的偏差有更高的权重。碳水化合物吸收最小值是根据属性里的碳水化合物吸收时间最大值计算得来的好。此算法在敏感度变化后最快。</string> <string name="description_sensitivity_weighted_average">灵敏度计算根据偏差的加权平均值。新的偏差有更高的权重。碳水化合物吸收最小值是根据参数选项里的碳水化合物吸收时间最大值计算得来的好。此算法在敏感度变化后最快。</string>
<string name="description_source_dexcom_g5">从安卓版的 Dexcom G5 app接收血糖值。</string> <string name="description_source_dexcom_g5">从安卓版的 Dexcom G5 app接收血糖值。</string>
<string name="description_source_glimp">从 Glimp 接收血糖值。</string> <string name="description_source_glimp">从 Glimp 接收血糖值。</string>
<string name="description_source_mm640g">从美敦力600Series 的AndroidUploader 接收血糖值。</string> <string name="description_source_mm640g">从美敦力600Series 的AndroidUploader 接收血糖值。</string>
@ -218,7 +218,7 @@
<string name="overview_extendedbolus_button">扩展大剂量</string> <string name="overview_extendedbolus_button">扩展大剂量</string>
<string name="configbuilder_nightscoutversion_label">Nightscout 版本:</string> <string name="configbuilder_nightscoutversion_label">Nightscout 版本:</string>
<string name="missing">缺少</string> <string name="missing">缺少</string>
<string name="exported">属性导出了</string> <string name="exported">参数选项导出了</string>
<string name="export_to">导出配置</string> <string name="export_to">导出配置</string>
<string name="import_from">导入配置</string> <string name="import_from">导入配置</string>
<string name="setting_imported">配置导入了</string> <string name="setting_imported">配置导入了</string>
@ -318,7 +318,7 @@
<string name="objectives_1_objective">开始开环</string> <string name="objectives_1_objective">开始开环</string>
<string name="objectives_1_gate">在开环模式下运行几天,并在手机上手动制定很多次临时基础率。设置和使用临时目标和默认的临时目标 (例如, 用于活动或处理碳水化合物)</string> <string name="objectives_1_gate">在开环模式下运行几天,并在手机上手动制定很多次临时基础率。设置和使用临时目标和默认的临时目标 (例如, 用于活动或处理碳水化合物)</string>
<string name="objectives_2_objective">了解你的开环,包括它的临时基础率建议</string> <string name="objectives_2_objective">了解你的开环,包括它的临时基础率建议</string>
<string name="objectives_2_gate">基于以上的经验,决定适合自己的最大基础率,在泵和本软件的属性上设置</string> <string name="objectives_2_gate">基于以上的经验,决定适合自己的最大基础率,在泵和本软件的参数选项上设置</string>
<string name="objectives_3_objective">开始闭环模式,低血糖自动暂停</string> <string name="objectives_3_objective">开始闭环模式,低血糖自动暂停</string>
<string name="objectives_3_gate">在闭环模式下运行设置最大IOB = 0 运行几天确保没有太多的低血糖事件</string> <string name="objectives_3_gate">在闭环模式下运行设置最大IOB = 0 运行几天确保没有太多的低血糖事件</string>
<string name="objectives_4_objective">优化闭环逐渐增加最大IOB并逐渐降低目标血糖值</string> <string name="objectives_4_objective">优化闭环逐渐增加最大IOB并逐渐降低目标血糖值</string>
@ -888,9 +888,9 @@
<string name="objectivenotfinished">目标 %1$d 未完成</string> <string name="objectivenotfinished">目标 %1$d 未完成</string>
<string name="pumpisnottempbasalcapable">这个泵无法设置临时基础率</string> <string name="pumpisnottempbasalcapable">这个泵无法设置临时基础率</string>
<string name="novalidbasalrate">从泵中无法读取有效的基础率</string> <string name="novalidbasalrate">从泵中无法读取有效的基础率</string>
<string name="closedmodedisabledinpreferences">属性中禁用了闭环模式</string> <string name="closedmodedisabledinpreferences">参数选项中禁用了闭环模式</string>
<string name="autosensdisabledinpreferences">Autosens 在属性中被禁用了</string> <string name="autosensdisabledinpreferences">Autosens 在参数选项中被禁用了</string>
<string name="smbdisabledinpreferences">SMB微型大剂量在属性里被禁用了</string> <string name="smbdisabledinpreferences">SMB微型大剂量在参数选项里被禁用了</string>
<string name="limitingbasalratio">最大基础率被限定为 %1$.2f U/h 由于 %2$s</string> <string name="limitingbasalratio">最大基础率被限定为 %1$.2f U/h 由于 %2$s</string>
<string name="pumplimit">泵限制</string> <string name="pumplimit">泵限制</string>
<string name="itmustbepositivevalue">它必须是正数</string> <string name="itmustbepositivevalue">它必须是正数</string>
@ -903,7 +903,7 @@
<string name="limitingmaxiob">由于 %2$s, 将最大 IOB(活性胰岛素) 限制为 %1$.1f U</string> <string name="limitingmaxiob">由于 %2$s, 将最大 IOB(活性胰岛素) 限制为 %1$.1f U</string>
<string name="limitingcarbs">由于 %2$s, 将碳水化合物限制为 %1$d 克</string> <string name="limitingcarbs">由于 %2$s, 将碳水化合物限制为 %1$d 克</string>
<string name="limitingiob">由于 %2$s, 将 IOB(活性胰岛素) 限制为 %1$.1f U</string> <string name="limitingiob">由于 %2$s, 将 IOB(活性胰岛素) 限制为 %1$.1f U</string>
<string name="maxvalueinpreferences">属性里的最大值</string> <string name="maxvalueinpreferences">参数选项里的最大值</string>
<string name="hardlimit">硬限制</string> <string name="hardlimit">硬限制</string>
<string name="unsafeusage">不安全的用法</string> <string name="unsafeusage">不安全的用法</string>
<string name="readstatusfailed">读取状态失败了</string> <string name="readstatusfailed">读取状态失败了</string>
@ -950,7 +950,7 @@
<string name="openapsama_bolussnooze_dia_divisor">大剂量snooze 胰岛素持续作用时间除数</string> <string name="openapsama_bolussnooze_dia_divisor">大剂量snooze 胰岛素持续作用时间除数</string>
<string name="openapsama_max_daily_safety_multiplier">最大日基础率安全倍数</string> <string name="openapsama_max_daily_safety_multiplier">最大日基础率安全倍数</string>
<string name="openapsama_current_basal_safety_multiplier">当前基础率安全倍数</string> <string name="openapsama_current_basal_safety_multiplier">当前基础率安全倍数</string>
<string name="value_unavailable_short">不适</string> <string name="value_unavailable_short">无可</string>
<string name="ns_autobackfill_title">Autobackfill 血糖</string> <string name="ns_autobackfill_title">Autobackfill 血糖</string>
<string name="wear_wizard_settings">向导设置</string> <string name="wear_wizard_settings">向导设置</string>
<string name="wear_wizard_settings_summary">包含在向导中的计算结果:</string> <string name="wear_wizard_settings_summary">包含在向导中的计算结果:</string>
@ -1000,7 +1000,7 @@
<string name="option_off">关闭</string> <string name="option_off">关闭</string>
<string name="open_navigation">打开导航栏</string> <string name="open_navigation">打开导航栏</string>
<string name="close_navigation">关闭导航栏</string> <string name="close_navigation">关闭导航栏</string>
<string name="nav_plugin_preferences">插件属性</string> <string name="nav_plugin_preferences">插件选项</string>
<string name="completed_well_done">完成了,做的好</string> <string name="completed_well_done">完成了,做的好</string>
<string name="not_completed_yet">尚未完成</string> <string name="not_completed_yet">尚未完成</string>
<string name="time_elapsed">已用时间</string> <string name="time_elapsed">已用时间</string>
@ -1008,9 +1008,9 @@
<string name="poctech">Poctech</string> <string name="poctech">Poctech</string>
<string name="description_source_poctech">从 Poctech app 接收血糖值。</string> <string name="description_source_poctech">从 Poctech app 接收血糖值。</string>
<string name="high_temptarget_raises_sensitivity_title">高临时目标增加灵敏度</string> <string name="high_temptarget_raises_sensitivity_title">高临时目标增加灵敏度</string>
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[当临时目标 >= 100时提高灵敏度]]></string> <string name="high_temptarget_raises_sensitivity_summary"><![CDATA[当临时目标 >=100 mg/dl (5.5 mmol/l) 时提高灵敏度]]></string>
<string name="low_temptarget_lowers_sensitivity_title">低临时目标降低灵敏度</string> <string name="low_temptarget_lowers_sensitivity_title">低临时目标降低灵敏度</string>
<string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[当临时目标 = 100时降低灵敏度]]></string> <string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[当临时目标 = 100 mg/dl (5.5 mmol/l) 时降低灵敏度]]></string>
<string name="combo_invalid_setup">泵设置的无效检查文档并核实这个Quick Info 菜单被命名为 QUICK INFO使用360 configuration 这个软件 </string> <string name="combo_invalid_setup">泵设置的无效检查文档并核实这个Quick Info 菜单被命名为 QUICK INFO使用360 configuration 这个软件 </string>
<string name="custom">自定义</string> <string name="custom">自定义</string>
<string name="largetimedifftitle">手机和泵的时间相差很大</string> <string name="largetimedifftitle">手机和泵的时间相差很大</string>
@ -1020,7 +1020,6 @@
<string name="allow_hardware_pump_text">注意如果你激活并且连接到了一个硬件泵AndroidAPS将会从配置文件复制基础率到泵上。覆盖泵上已有的基础率。请确定你已经在AndroidAPS上设置了正确的基础率。如果你不确定或者不想覆盖泵上的基础率设置按取消键以后再切换激活配置文件。</string> <string name="allow_hardware_pump_text">注意如果你激活并且连接到了一个硬件泵AndroidAPS将会从配置文件复制基础率到泵上。覆盖泵上已有的基础率。请确定你已经在AndroidAPS上设置了正确的基础率。如果你不确定或者不想覆盖泵上的基础率设置按取消键以后再切换激活配置文件。</string>
<string name="error_adding_treatment_title">治疗数据不完整</string> <string name="error_adding_treatment_title">治疗数据不完整</string>
<string name="error_adding_treatment_message">一个治疗 (胰岛素: %1$.2f, 碳水: %2$d, 在: %3$s)不能被添加到治疗里。请检查并手动记录是合适的。</string> <string name="error_adding_treatment_message">一个治疗 (胰岛素: %1$.2f, 碳水: %2$d, 在: %3$s)不能被添加到治疗里。请检查并手动记录是合适的。</string>
<string name="generated_ecarbs_note">产生以下数量的碳水化合物: %1$dg, 持续时间: %2$dh, 延迟: %3$dm</string>
<string name="openaps_noasdata">Autosens 数据不可用</string> <string name="openaps_noasdata">Autosens 数据不可用</string>
<string name="nav_logsettings">日志设置</string> <string name="nav_logsettings">日志设置</string>
<string name="resettodefaults">重置为默认值</string> <string name="resettodefaults">重置为默认值</string>

View file

@ -497,9 +497,6 @@
<string name="error_field_must_not_be_empty">The field must not be empty</string> <string name="error_field_must_not_be_empty">The field must not be empty</string>
<string name="error_phone_not_valid">Phone number not valid</string> <string name="error_phone_not_valid">Phone number not valid</string>
<string name="smscommunicator_invalidphonennumber">Invalid SMS phone number</string> <string name="smscommunicator_invalidphonennumber">Invalid SMS phone number</string>
<string name="copy_to_clipboard">Copy To Clipboard</string>
<string name="copied_to_clipboard">Copied to clipboard</string>
<string name="nav_show_logcat">Show log</string>
<string name="overview_calibration">Calibration</string> <string name="overview_calibration">Calibration</string>
<string name="send_calibration" formatted="false">Send calibration %.1f to xDrip?</string> <string name="send_calibration" formatted="false">Send calibration %.1f to xDrip?</string>
<string name="xdripnotinstalled">xDrip+ not installed</string> <string name="xdripnotinstalled">xDrip+ not installed</string>
@ -1133,7 +1130,7 @@
<string name="danar_pumpalarm_vibrate">Vibrate</string> <string name="danar_pumpalarm_vibrate">Vibrate</string>
<string name="danar_pumpalarm_both">Both</string> <string name="danar_pumpalarm_both">Both</string>
<string name="danar_screentimeout">LCD on time [s]</string> <string name="danar_screentimeout">LCD on time [s]</string>
<string name="danar_backlight">Backlight on time [h]</string> <string name="danar_backlight">Backlight on time [s]</string>
<string name="danar_glucoseunits">Glucose units</string> <string name="danar_glucoseunits">Glucose units</string>
<string name="danar_shutdown">Shutdown(hours)</string> <string name="danar_shutdown">Shutdown(hours)</string>
<string name="danar_lowreservoir">Low reservoir (Units)</string> <string name="danar_lowreservoir">Low reservoir (Units)</string>
@ -1164,6 +1161,18 @@
<string name="storedsettingsfound">Stored settings found</string> <string name="storedsettingsfound">Stored settings found</string>
<string name="allow_hardware_pump_text">Attention: If you activate and connect to a hardware pump, AndroidAPS will copy the basal settings from the profile to the pump, overwriting the existing basal rate stored on the pump. Make sure you have the correct basal setting in AndroidAPS. If you are not sure or don\'t want to overwrite the basal settings on your pump, press cancel and repeat switching to the pump at a later time.</string> <string name="allow_hardware_pump_text">Attention: If you activate and connect to a hardware pump, AndroidAPS will copy the basal settings from the profile to the pump, overwriting the existing basal rate stored on the pump. Make sure you have the correct basal setting in AndroidAPS. If you are not sure or don\'t want to overwrite the basal settings on your pump, press cancel and repeat switching to the pump at a later time.</string>
<string name="error_adding_treatment_title">Treatment data incomplete</string> <string name="error_adding_treatment_title">Treatment data incomplete</string>
<string name="maintenance_settings">Maintenance Settings</string>
<string name="maintenance_email">Email</string>
<string name="key_maintenance_logs_email" translatable="false">email</string>
<string name="invalid_email_message">Invalid Email</string>
<string name="key_maintenance_logs_amount" translatable="false">amount of logs to send</string>
<string name="maintenance_amount">No of Logs to send</string>
<string name="maintenance">Maintenance</string>
<string name="maintenance_shortname">MAINT</string>
<string name="description_maintenance">Provides several functions for maintenance (eg. log sending, log deletion).</string>
<string name="send_all_logs">Send Logs by Email</string>
<string name="delete_logs">Delete Logs</string>
<string name="error_adding_treatment_message">A treatment (insulin: %1$.2f, carbs: %2$d, at: %3$s) could not be added to treatments. Please check and manually add a record as appropriate.</string> <string name="error_adding_treatment_message">A treatment (insulin: %1$.2f, carbs: %2$d, at: %3$s) could not be added to treatments. Please check and manually add a record as appropriate.</string>
<string name="generated_ecarbs_note">eCarbs: %1$d g (%2$d h), delay: %3$d m</string> <string name="generated_ecarbs_note">eCarbs: %1$d g (%2$d h), delay: %3$d m</string>
<string name="key_plugin_stats_report_timestamp" translatable="false">key_plugin_stats_report_timestamp</string> <string name="key_plugin_stats_report_timestamp" translatable="false">key_plugin_stats_report_timestamp</string>
@ -1172,6 +1181,7 @@
<string name="resettodefaults">Reset to defaults</string> <string name="resettodefaults">Reset to defaults</string>
<string name="nsmalfunction">NSClient malfunction. Consider NS and NSClient restart.</string> <string name="nsmalfunction">NSClient malfunction. Consider NS and NSClient restart.</string>
<string name="as">AS</string> <string name="as">AS</string>
<string name="versionavailable">Version %1$s available</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d day</item> <item quantity="one">%1$d day</item>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-files-path name="exports" path="exports/" />
</paths>

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:validatingEditText="http://schemas.android.com/apk/res/info.nightscout.androidaps">
<PreferenceCategory
android:key="maintenance"
android:title="@string/maintenance_settings">
<com.andreabaccega.widget.ValidatingEditTextPreference
android:defaultValue="logs@androidaps.org"
android:dialogMessage="@string/maintenance_email"
android:inputType="textEmailAddress"
android:key="@string/key_maintenance_logs_email"
android:selectAllOnFocus="true"
android:title="@string/maintenance_email"
validatingEditText:emptyAllowed="false"
validatingEditText:testErrorString="@string/invalid_email_message"
validatingEditText:testType="email"/>
<EditTextPreference
android:defaultValue="2"
android:inputType="number"
android:key="@string/key_maintenance_logs_amount"
android:title="@string/maintenance_amount">
</EditTextPreference>
</PreferenceCategory>
</PreferenceScreen>

View file

@ -12,6 +12,7 @@ import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interfaces.PluginType; import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.interfaces.PumpInterface; import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.plugins.Overview.OverviewPlugin; import info.nightscout.androidaps.plugins.Overview.OverviewPlugin;
import info.nightscout.androidaps.plugins.Maintenance.LoggerUtils;
/** /**
@ -127,7 +128,7 @@ public class MainAppTest {
@Test @Test
public void getLogDirectoryTest() { public void getLogDirectoryTest() {
// logger not initialized in Roboelectric // logger not initialized in Roboelectric
Assert.assertNull(mainApp.getLogDirectory()); Assert.assertNull(LoggerUtils.getLogDirectory());
} }
} }

View file

@ -0,0 +1,43 @@
package info.nightscout.androidaps.plugins.Maintenance;
import org.junit.Test;
import java.io.File;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class MaintenancePluginTest {
private MaintenancePlugin sut = new MaintenancePlugin();
@Test
public void getLogfilesTest() {
String logDirectory = "src/test/res/logger";
List<File> logs = sut.getLogfiles(logDirectory, 2);
assertEquals(2, logs.size());
assertEquals("AndroidAPS.log", logs.get(0).getName());
assertEquals("AndroidAPS.2018-01-03_01-01-00.1.zip", logs.get(1).getName());
logs = sut.getLogfiles(logDirectory, 10);
assertEquals(4, logs.size());
}
@Test
public void zipLogsTest() {
String logDirectory = "src/test/res/logger";
List<File> logs = sut.getLogfiles(logDirectory, 2);
String name = "AndroidAPS.log.zip";
File zipFile = new File("build/" + name);
zipFile = sut.zipLogs(zipFile, logs);
assertTrue(zipFile.exists());
assertTrue(zipFile.isFile());
}
}

View file