Translations.
This commit is contained in:
parent
ab51eb3655
commit
722750b724
@ -875,7 +875,18 @@ public class Rule implements Comparable<Rule>
|
||||
Miscellaneous.logEvent("i", String.format(context.getResources().getString(R.string.ruleCheckOf), this.getName()), String.format(context.getResources().getString(R.string.ruleIsDeactivatedCantApply), this.getName()), 3);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean cloneRule(Context context)
|
||||
{
|
||||
Rule newRule = new Rule();
|
||||
newRule.setName(this.getName() + " - clone");
|
||||
newRule.setRuleActive(this.isRuleActive());
|
||||
newRule.setRuleToggle(this.isRuleToggle());
|
||||
newRule.setTriggerSet(this.getTriggerSet());
|
||||
newRule.setActionSet(this.getActionSet());
|
||||
return newRule.create(context);
|
||||
}
|
||||
|
||||
private class ActivateRuleTask extends AsyncTask<Object, String, Void>
|
||||
{
|
||||
boolean wasActivated = false;
|
||||
|
@ -52,12 +52,6 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
// if(!ActivityPermissions.havePermission(ActivityPermissions.writeExternalStoragePermissionName, ActivityMainRules.this))
|
||||
// {
|
||||
// Toast.makeText(ActivityMainRules.this, getResources().getString(R.string.appRequiresPermissiontoAccessExternalStorage), Toast.LENGTH_LONG).show();
|
||||
// return;
|
||||
// }
|
||||
|
||||
ruleToEdit = null;
|
||||
Intent startAddRuleIntent = new Intent(ActivityMainRules.this, ActivityManageRule.class);
|
||||
startActivityForResult(startAddRuleIntent, 3000);
|
||||
@ -190,7 +184,7 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.whatToDoWithRule));
|
||||
alertDialogBuilder.setItems(new String[]{ getResources().getString(R.string.runManually), getResources().getString(R.string.edit), getResources().getString(R.string.deleteCapital) }, new DialogInterface.OnClickListener()
|
||||
alertDialogBuilder.setItems(new String[]{ getResources().getString(R.string.runManually), getResources().getString(R.string.edit), getResources().getString(R.string.deleteCapital), getResources().getString(R.string.clone) }, new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
@ -218,6 +212,11 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
if(ruleThisIsAbout.delete())
|
||||
updateListView();
|
||||
break;
|
||||
case 3:
|
||||
ruleToEdit = ruleThisIsAbout;
|
||||
if(ruleToEdit.cloneRule(ActivityMainRules.this))
|
||||
updateListView();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -22,6 +22,8 @@ import android.widget.ImageButton;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
public class ActivityManagePoi extends Activity
|
||||
{
|
||||
@ -34,8 +36,9 @@ public class ActivityManagePoi extends Activity
|
||||
ImageButton ibShowOnMap;
|
||||
EditText guiPoiName, guiPoiLatitude, guiPoiLongitude, guiPoiRadius;
|
||||
Calendar locationSearchStart = null;
|
||||
Timer timer = null;
|
||||
|
||||
final static int defaultRadius = 300;
|
||||
final static int defaultRadius = 250;
|
||||
final static int searchTimeout = 120;
|
||||
|
||||
private static ProgressDialog progressDialog;
|
||||
@ -157,6 +160,7 @@ public class ActivityManagePoi extends Activity
|
||||
else
|
||||
{
|
||||
locationSearchStart = Calendar.getInstance();
|
||||
startTimeout();
|
||||
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.logGettingPositionWithProvider) + " " + provider1, 3);
|
||||
myLocationManager.requestLocationUpdates(provider1, 500, Settings.satisfactoryAccuracyNetwork, myLocationListenerNetwork);
|
||||
@ -165,31 +169,66 @@ public class ActivityManagePoi extends Activity
|
||||
myLocationManager.requestLocationUpdates(provider2, 500, Settings.satisfactoryAccuracyGps, myLocationListenerGps);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void startTimeout()
|
||||
{
|
||||
if(timer != null)
|
||||
stopTimeout();
|
||||
|
||||
timer = new Timer();
|
||||
|
||||
class TimeoutTask extends TimerTask
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
//calculate the new position of myBall
|
||||
}
|
||||
}
|
||||
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Starting timeout for location search: " + String.valueOf(searchTimeout) + " seconds", 5);
|
||||
|
||||
TimerTask updateBall = new TimeoutTask();
|
||||
timer.scheduleAtFixedRate(updateBall, 0, searchTimeout * 1000);
|
||||
}
|
||||
|
||||
private void stopTimeout()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Stopping timeout for location search.", 5);
|
||||
|
||||
if(timer != null)
|
||||
{
|
||||
timer.purge();
|
||||
timer.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private void compareLocations()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.comparing), 4);
|
||||
|
||||
// We have GPS
|
||||
if(locationGps != null)
|
||||
{
|
||||
myLocationManager.removeUpdates(myLocationListenerNetwork);
|
||||
|
||||
guiPoiLatitude.setText(String.valueOf(locationGps.getLatitude()));
|
||||
guiPoiLongitude.setText(String.valueOf(locationGps.getLongitude()));
|
||||
|
||||
String text;
|
||||
if(locationNetwork != null)
|
||||
{
|
||||
double variance = locationGps.distanceTo(locationNetwork);
|
||||
String text = String.format(getResources().getString(R.string.distanceBetween), Math.round(variance));
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 4);
|
||||
|
||||
text = String.format(getResources().getString(R.string.distanceBetween), Math.round(variance));
|
||||
getDialog(text, Math.round(variance) + 1).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
progressDialog.dismiss();
|
||||
myLocationManager.removeUpdates(myLocationListenerNetwork);
|
||||
guiPoiRadius.setText("250");
|
||||
text = String.format(getResources().getString(R.string.locationFound), defaultRadius);
|
||||
getDialog(text, defaultRadius).show();
|
||||
}
|
||||
}
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 4);
|
||||
} // we have a great network signal
|
||||
else if(locationNetwork != null && locationNetwork.getAccuracy() <= Settings.satisfactoryAccuracyGps && locationNetwork.getAccuracy() <= defaultRadius)
|
||||
{
|
||||
/*
|
||||
@ -197,11 +236,14 @@ public class ActivityManagePoi extends Activity
|
||||
to accept it a sole result. In that case we suggest a default radius, no variance.
|
||||
*/
|
||||
|
||||
guiPoiLatitude.setText(String.valueOf(locationNetwork.getLatitude()));
|
||||
guiPoiLongitude.setText(String.valueOf(locationNetwork.getLongitude()));
|
||||
|
||||
String text = String.format(getResources().getString(R.string.locationFound), defaultRadius);
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 4);
|
||||
|
||||
getDialog(text, defaultRadius).show();
|
||||
}
|
||||
} // we have a bad network signal
|
||||
else if(
|
||||
locationNetwork != null
|
||||
&&
|
||||
@ -210,9 +252,13 @@ public class ActivityManagePoi extends Activity
|
||||
(locationSearchStart.getTimeInMillis() + ((long)searchTimeout * 1000))
|
||||
)
|
||||
{
|
||||
// Only a network location was found that is also not very accurate.
|
||||
// Only a network location was found and it is also not very accurate.
|
||||
|
||||
guiPoiLatitude.setText(String.valueOf(locationNetwork.getLatitude()));
|
||||
guiPoiLongitude.setText(String.valueOf(locationNetwork.getLongitude()));
|
||||
|
||||
String text = String.format(getResources().getString(R.string.locationFoundInaccurate), defaultRadius);
|
||||
getDialog(text, defaultRadius).show();
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 4);
|
||||
}
|
||||
else
|
||||
@ -276,6 +322,7 @@ public class ActivityManagePoi extends Activity
|
||||
// {
|
||||
// Miscellaneous.logEvent("i", "POI Manager", "satisfactoryNetworkAccuracy of " + String.valueOf(Settings.SATISFACTORY_ACCURACY_GPS) + "m reached. Removing location updates...");
|
||||
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Unsubscribing from GPS location updates.", 5);
|
||||
myLocationManager.removeUpdates(this);
|
||||
locationGps = location;
|
||||
|
||||
@ -311,8 +358,7 @@ public class ActivityManagePoi extends Activity
|
||||
public void onLocationChanged(Location location)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.logGotNetworkUpdate) + " " + String.valueOf(location.getAccuracy()), 3);
|
||||
String text = "Network position found. satisfactoryNetworkAccuracy of " + String.valueOf(Settings.satisfactoryAccuracyNetwork) + "m reached. Removing location updates...";
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 5);
|
||||
|
||||
myLocationManager.removeUpdates(this);
|
||||
locationNetwork = location;
|
||||
|
||||
@ -320,6 +366,7 @@ public class ActivityManagePoi extends Activity
|
||||
if(location.getAccuracy() <= Settings.satisfactoryAccuracyGps)
|
||||
{
|
||||
// Accuracy is so good that we don't need to wait for GPS result
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Unsubscribing from network location updates.", 5);
|
||||
myLocationManager.removeUpdates(myLocationListenerGps);
|
||||
}
|
||||
|
||||
|
@ -805,6 +805,7 @@ public class PointOfInterest implements Comparable<PointOfInterest>
|
||||
{
|
||||
String text = String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.overlapBetweenPois), otherPoi.getName(), String.valueOf(overlap));
|
||||
Miscellaneous.logEvent("w", "POI", text, 2);
|
||||
// Miscellaneous.messageBox("POI", text, Miscellaneous.getAnyContext()).show();
|
||||
Toast.makeText(Miscellaneous.getAnyContext(), text, Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
|
@ -14,8 +14,7 @@
|
||||
<string name="serviceStarted">Automations-Dienst gestarted.</string>
|
||||
<string name="version">Version %1$s.</string>
|
||||
<string name="distanceBetween">Der Abstand zwischen GPS- und Mobilfunk-Position beträgt %1$d m. Dies +1 sollte der minimale Radius sein.</string>
|
||||
<string name="comparing">Sowohl Netzwerk- als auch GPS Position sind bekannt. Vergleiche...</string>
|
||||
<string name="positioningWindowNotice">Falls Sie in einem Gebäude sind wird empfohlen das Gerät in die Nähe eines Fensters zu bringen bis eine Position ermittelt werden konnte. Andernfalls kann es sehr lange dauern oder es funktioniert gar nicht.</string>
|
||||
<string name="positioningWindowNotice">Falls Sie in einem Gebäude sind, wird empfohlen das Gerät in die Nähe eines Fensters zu bringen bis eine Position ermittelt werden konnte. Andernfalls kann es sehr lange dauern oder es funktioniert gar nicht.</string>
|
||||
<string name="gettingPosition">Position wird ermittelt. Bitte warten...</string>
|
||||
<string name="yes">Ja</string>
|
||||
<string name="no">Nein</string>
|
||||
@ -580,4 +579,10 @@
|
||||
<string name="noKnownWifis">Es gibt keine bekannten WLANs auf Ihrem Gerät.</string>
|
||||
<string name="needLocationPermForWifiList">Die Liste von WLANs auf Ihrem Gerät könnte verwendet werden, um zu ermitteln, an welchen Orten Sie waren. Deshalb ist die Positions-Berechtigung nötig, um die Liste dieser WLANs zu laden. Wenn Sie eines aus der Liste auswählen möchten, müssen Sie diese Berechtigung gewähren. Wenn nicht, können Sie immer noch eines manuell eingeben.</string>
|
||||
<string name="urlToTriggerExplanation">Diese Funktion öffnet NICHT den Browser, sondern löst die HTTP Anfrage im Hintergrund aus. Sie können das z.B. benutzen, um Befehle an Ihre Heimautomatisierung zu schicken.</string>
|
||||
<string name="clone">Klonen</string>
|
||||
<string name="updateAvailable">Es gibt eine neue Version der Anwendung. Möchten Sie den Browser öffnen, um sie herunterzuladen?</string>
|
||||
<string name="automaticUpdateCheckSummary">Nur bei der APK Version.</string>
|
||||
<string name="automaticUpdateCheck">Nach Updates suchen</string>
|
||||
<string name="locationFound">Position gefunden. Der vorgeschlagene Mindestradius für Orte beträgt %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">Es konnte nur eine ungenaue Position gefunden werden. Das funktioniert u.U. nicht zuverlässig. Der vorgeschlagene Mindestradius für Orte beträgt %1$d m.</string>
|
||||
</resources>
|
@ -14,7 +14,6 @@
|
||||
<string name="serviceStarted">Automation servicio ha iniciado.</string>
|
||||
<string name="version">Versión %1$s.</string>
|
||||
<string name="distanceBetween">Distancia entre el sitio GPS y el sitio red está %1$d metros. Este +1m debe ser el mínimo.</string>
|
||||
<string name="comparing">Tengo tanto sitio red como sitio gps. Estoy comparando...</string>
|
||||
<string name="positioningWindowNotice">Si está en una edificación vaya cerca de una ventana hasta que una posición haya sido encontrada. Sino podria durar mucho tiempo o no seria posible.</string>
|
||||
<string name="gettingPosition">Buscando posición. Espere, por favor...</string>
|
||||
<string name="yes">Si</string>
|
||||
@ -517,4 +516,11 @@ Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dis
|
||||
<string name="helpTextProcessMonitoring">Si crea una norma con vigilancia del proceso la aplicación va a revisar periodicamente si el proceso esta activo. Puede ajustar la frecuencia en la configuración. Puede relentizar la reacción, pero vigilancia permanente gasta mucha bateria. No hay una broadcast del sistema operativo para este evento.</string>
|
||||
<string name="helpTextEnergySaving">Muchos fabricantes intentan conservar energia en limitando la actividades de segundo plano de otras apps. Desafortunadamente el resultado es que en esas aplicaciones no funcionan por completo. Automation esta entre ellas. Vease <a href="https://dontkillmyapp.com/">esta pagina</a> para determinar como excluir Automation de tales medidas.</string>
|
||||
<string name="speedMaximumTimeBetweenLocations">Tiempo maximo entre 2 sitios para determinar la velocidad.</string>
|
||||
<string name="clone">Clonar</string>
|
||||
<string name="updateAvailable">Hay nueva versión de la app. Quiere abrir un browser y descargar lo?</string>
|
||||
<string name="automaticUpdateCheck">Buscar updates</string>
|
||||
<string name="urlToTriggerExplanation">Esta función NO abre el browser, pero enciende un URL en el fondo. Puede usar lo por ejemplo para enviar comandos a su automatización de la casa.</string>
|
||||
<string name="automaticUpdateCheckSummary">Solo en la versión APK.</string>
|
||||
<string name="locationFound">Determine un posición. El radio minimo sugeri es %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">Solo pude determinar una posición imprecisa. Puede ser va a funcionar poco fiable. El radio minimo sugeri es %1$d m.</string>
|
||||
</resources>
|
@ -125,7 +125,6 @@
|
||||
<string name="closeTo">vicino a</string>
|
||||
<string name="closestPoi">Posizione più vicina:</string>
|
||||
<string name="com.wireguard.android.permission.CONTROL_TUNNELS">Controllare i tunnels dell\'applicazione wireguard</string>
|
||||
<string name="comparing">Ho la posizione sia dalla rete che dal GPS e le sto confrontando...</string>
|
||||
<string name="configurationExportedSuccessfully">Configurazione esportata con successo.</string>
|
||||
<string name="configurationImportedSuccessfully">Configurazione esportata con successo.</string>
|
||||
<string name="connected">connesso</string>
|
||||
@ -579,4 +578,5 @@
|
||||
<string name="withLabel">con etichetta</string>
|
||||
<string name="writeLogFile">Memorizza un file di log</string>
|
||||
<string name="yes">Si</string>
|
||||
<string name="clone">Clonare</string>
|
||||
</resources>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<string name="logServiceStarting" translatable="false">Starting service.</string>
|
||||
<string name="logNotAllMeasurings" translatable="false">Don\'t have all location measurings, yet. Can\'t do comparison.</string>
|
||||
<string name="distanceBetween">Distance between GPS location and network location is %1$d meters. This +1m should be the absolute minimum radius.</string>
|
||||
<string name="comparing">Have both network and gps location. Comparing...</string>
|
||||
<string name="comparing" translatable="false">Have both network and gps location. Comparing...</string>
|
||||
<string name="logNoSuitableProvider" translatable="false">No suitable location providers could be used.</string>
|
||||
<string name="positioningWindowNotice">If you are in a building it is strongly advised to place your device next to a window until a position has been found. Otherwise it may take a very long time if it is able to find one at all.</string>
|
||||
<string name="gettingPosition">Getting position. Please wait...</string>
|
||||
@ -678,6 +678,7 @@
|
||||
<string name="automaticUpdateCheck">Check for updates</string>
|
||||
<string name="automaticUpdateCheckSummary">Only applies to APK version.</string>
|
||||
<string name="updateAvailable">There\'s a new update available. Would you like opening the browser to download it?</string>
|
||||
<string name="locationFound">Location found. The suggested minimum radius for locations is %1$d."</string>
|
||||
<string name="locationFound">Location found. The suggested minimum radius for locations is %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">Only a location with a limited accuracy could be found. It might not work reliably. The suggested minimum radius for locations is %1$d."</string>
|
||||
<string name="clone">Clone</string>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user