summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/xapek/andiodine/FragmentStatus.java39
-rw-r--r--src/main/java/org/xapek/andiodine/IodinePref.java24
-rw-r--r--src/main/res/layout/fragment_status.xml2
-rw-r--r--src/main/res/values-de/strings.xml15
-rw-r--r--src/main/res/values-nl/strings.xml20
-rw-r--r--src/main/res/values/strings.xml18
6 files changed, 75 insertions, 43 deletions
diff --git a/src/main/java/org/xapek/andiodine/FragmentStatus.java b/src/main/java/org/xapek/andiodine/FragmentStatus.java
index db6e5ad..b678360 100644
--- a/src/main/java/org/xapek/andiodine/FragmentStatus.java
+++ b/src/main/java/org/xapek/andiodine/FragmentStatus.java
@@ -18,6 +18,8 @@ import android.widget.Button;
import android.widget.ScrollView;
import android.widget.TextView;
+import java.util.Locale;
+
public class FragmentStatus extends Fragment {
public static final String TAG = "FRAGMENT_STATUS";
@@ -31,24 +33,25 @@ public class FragmentStatus extends Fragment {
public void onReceive(Context context, Intent intent) {
Log.d(TAG, "Got intent: " + intent);
if (IodineVpnService.ACTION_STATUS_ERROR.equals(intent.getAction())) {
- final TextView message = new TextView(context);
- final String stringMessage = intent.getStringExtra(IodineVpnService.EXTRA_ERROR_MESSAGE);
- final SpannableString s = new SpannableString(stringMessage);
- Linkify.addLinks(s, Linkify.WEB_URLS);
- message.setText(s);
- message.setMovementMethod(LinkMovementMethod.getInstance());
- new AlertDialog.Builder(FragmentStatus.this.getActivity())//
- .setIcon(R.drawable.error) //
- .setTitle("Error") //
- .setView(message)
- .create() //
- .show();
+ final TextView message = new TextView(context);
+ final String stringMessage = intent.getStringExtra(IodineVpnService.EXTRA_ERROR_MESSAGE);
+ final SpannableString s = new SpannableString(stringMessage);
+ Linkify.addLinks(s, Linkify.WEB_URLS);
+ message.setText(s);
+ message.setMovementMethod(LinkMovementMethod.getInstance());
+ new AlertDialog.Builder(FragmentStatus.this.getActivity())//
+ .setIcon(R.drawable.error) //
+ .setTitle(R.string.error) //
+ .setView(message)
+ .create() //
+ .show();
} else if (IodineVpnService.ACTION_STATUS_CONNECT.equals(intent.getAction())) {
mStatus.setText(R.string.connect);
} else if (IodineVpnService.ACTION_STATUS_CONNECTED.equals(intent.getAction())) {
- mStatus.setText("Connected: " + IodineClient.getIp() + '/'
- + IodineClient.getNetbits() + " MTU: "
- + IodineClient.getMtu() + '\n');
+ mStatus.setText(String.format(Locale.getDefault(), getString(R.string.vpnservice_connected_with_info),
+ IodineClient.getIp(),
+ IodineClient.getNetbits(),
+ IodineClient.getMtu()));
} else if (IodineVpnService.ACTION_STATUS_DISCONNECT.equals(intent.getAction())) {
mStatus.setText(R.string.disconnect);
}
@@ -59,10 +62,10 @@ public class FragmentStatus extends Fragment {
@Override
public void onReceive(Context context, Intent intent) {
if (IodineClient.ACTION_LOG_MESSAGE.equals(intent.getAction())) {
- final String newLogEntry = intent.getStringExtra(IodineClient.EXTRA_MESSAGE);
+ final String newLogEntry = intent.getStringExtra(IodineClient.EXTRA_MESSAGE);
if (!".".equals(newLogEntry)) // Suppress newline for progress indicator'.'
- mLogmessages.append("\n");
- mLogmessages.append(newLogEntry);
+ mLogmessages.append("\n");
+ mLogmessages.append(newLogEntry);
mScrollview.fullScroll(View.FOCUS_DOWN);
}
}
diff --git a/src/main/java/org/xapek/andiodine/IodinePref.java b/src/main/java/org/xapek/andiodine/IodinePref.java
index 11c79fb..864f597 100644
--- a/src/main/java/org/xapek/andiodine/IodinePref.java
+++ b/src/main/java/org/xapek/andiodine/IodinePref.java
@@ -42,42 +42,42 @@ public class IodinePref extends org.xapek.andiodine.preferences.PreferenceActivi
setContentValues(mIodineConfiguration.getContentValues());
// Name
- addPreference(ConfigDatabase.COLUMN_CONF_NAME, "Name", R.string.pref_help_name, "New Connection");
+ addPreference(ConfigDatabase.COLUMN_CONF_NAME, getString(R.string.pref_text_name_label_short), R.string.pref_help_name, "New Connection");
// Topdomain
- addPreference(ConfigDatabase.COLUMN_CONF_TOP_DOMAIN, "Tunnel Topdomain", R.string.pref_help_topdomain,
+ addPreference(ConfigDatabase.COLUMN_CONF_TOP_DOMAIN, getString(R.string.pref_text_topdomain_label), R.string.pref_help_topdomain,
"tun.example.com");
// Password
- addPreference(ConfigDatabase.COLUMN_CONF_PASSWORD, "Password", R.string.pref_help_password, "");
+ addPreference(ConfigDatabase.COLUMN_CONF_PASSWORD, getString(R.string.pref_text_password_label), R.string.pref_help_password, "");
// Tunnel Nameserver
- addPreference(ConfigDatabase.COLUMN_CONF_TUNNEL_NAMESERVER, "Tunnel Nameserver (or empty)",
+ addPreference(ConfigDatabase.COLUMN_CONF_TUNNEL_NAMESERVER, getString(R.string.pref_text_tunnel_nameserver_label_or_empty),
R.string.pref_help_tunnel_nameserver, "");
// Nameserver Mode
String[] nameserverModes = new String[NameserverMode.values().length];
for (int i = 0; i < NameserverMode.values().length; i++) {
nameserverModes[i] = NameserverMode.values()[i].name();
}
- addPreference(ConfigDatabase.COLUMN_CONF_NAMESERVER_MODE, "Nameserver Mode",
+ addPreference(ConfigDatabase.COLUMN_CONF_NAMESERVER_MODE, getString(R.string.pref_text_nameserver_mode_label),
R.string.pref_help_nameserver_mode, nameserverModes, NameserverMode.LEAVE_DEFAULT.name());
// Nameserver
- addPreference(ConfigDatabase.COLUMN_CONF_NAMESERVER, "Nameserver", R.string.pref_help_nameserver, "");
+ addPreference(ConfigDatabase.COLUMN_CONF_NAMESERVER, getString(R.string.pref_text_nameserver_label), R.string.pref_help_nameserver, "");
// Request Type
String[] requestTypes = new String[RequestType.values().length];
for (int i = 0; i < RequestType.values().length; i++) {
requestTypes[i] = RequestType.values()[i].name();
}
- addPreference(ConfigDatabase.COLUMN_CONF_REQUEST_TYPE, "Request Type", R.string.pref_help_request_type,
+ addPreference(ConfigDatabase.COLUMN_CONF_REQUEST_TYPE, getString(R.string.pref_text_request_type_label), R.string.pref_help_request_type,
requestTypes, RequestType.AUTODETECT.name());
// Lazy Mode
- addPreference(ConfigDatabase.COLUMN_CONF_LAZY_MODE, "Lazy mode", R.string.pref_help_lazy, true);
+ addPreference(ConfigDatabase.COLUMN_CONF_LAZY_MODE, getString(R.string.pref_text_lazy_mode_label), R.string.pref_help_lazy, true);
// Raw Mode
- addPreference(ConfigDatabase.COLUMN_CONF_RAW_MODE, "Raw Mode", R.string.pref_help_raw, false);
+ addPreference(ConfigDatabase.COLUMN_CONF_RAW_MODE, getString(R.string.pref_text_raw_mode_label), R.string.pref_help_raw, false);
// Default Route
- addPreference(ConfigDatabase.COLUMN_CONF_DEFAULT_ROUTE, "Default Route", R.string.pref_help_default_route, true);
+ addPreference(ConfigDatabase.COLUMN_CONF_DEFAULT_ROUTE, getString(R.string.pref_text_default_route_label), R.string.pref_help_default_route, true);
addPreference(ConfigDatabase.COLUMN_CONF_REQUEST_HOSTNAME_SIZE,
- "Request Hostname Size", R.string.pref_request_hostname_size, "255");
+ getString(R.string.pref_text_request_hostname_size_label), R.string.pref_request_hostname_size, "255");
addPreference(ConfigDatabase.COLUMN_CONF_RESPONSE_FRAGMENT_SIZE,
- "Response Fragment Size", R.string.pref_response_fragment_size, "0");
+ getString(R.string.pref_text_response_fragment_size_label), R.string.pref_response_fragment_size, "0");
}
@Override
diff --git a/src/main/res/layout/fragment_status.xml b/src/main/res/layout/fragment_status.xml
index 3735c7c..9e4f8c3 100644
--- a/src/main/res/layout/fragment_status.xml
+++ b/src/main/res/layout/fragment_status.xml
@@ -37,7 +37,7 @@
<Button
android:drawableLeft="@drawable/cancel"
- android:text="@string/close"
+ android:text="@string/configitem_description_close"
android:id="@+id/status_cancel"
android:layout_width="match_parent"
android:layout_height="50dp"
diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml
index 024dfd8..23a5c0c 100644
--- a/src/main/res/values-de/strings.xml
+++ b/src/main/res/values-de/strings.xml
@@ -21,7 +21,7 @@
<string name="main_description_add_account">Konto hinzufügen</string>
<string name="pref_description_cancel">Abbrechen</string>
- <string name="configitem_description_close">Tunnel schliessen</string>
+ <string name="configitem_description_close">Tunnel schließen</string>
<string name="pref_text_password_label">Passwort</string>
<string name="pref_text_topdomain_label">Tunnel Toplevel Domain</string>
<string name="pref_text_tunnel_nameserver_label">Tunnel Nameserver</string>
@@ -62,7 +62,16 @@
<string name="main_about">Über</string>
<string name="pref_delete">Löschen</string>
<string name="close">Schließen</string>
- <string name="connect">Verbinden</string>
- <string name="disconnect">Ausschalten</string>
+ <string name="connect">Verbinden...</string>
+ <string name="disconnect">Ausschalten...</string>
+ <string name="pref_text_response_fragment_size_label">Maximale Größe des Antwortfragments</string>
+ <string name="pref_text_name_label_short">Name</string>
+ <string name="pref_text_nameserver_label">Nameserver</string>
+ <string name="pref_text_tunnel_nameserver_label_or_empty">Tunnel Nameserver (oder leer)</string>
+ <string name="pref_text_request_type_label">Typ der DNS Abfragen</string>
+ <string name="pref_text_request_hostname_size_label">Maximale Größe des Upstream-Hostnamen</string>
+ <string name="pref_text_lazy_mode_label">Lazy mode</string>
+ <string name="pref_text_default_route_label">Standardroute</string>
+ <string name="vpnservice_connected_with_info">Verbindung: %1$s/%2$d MTU: %3$d</string>
</resources>
diff --git a/src/main/res/values-nl/strings.xml b/src/main/res/values-nl/strings.xml
index 8393f4b..22bd3e1 100644
--- a/src/main/res/values-nl/strings.xml
+++ b/src/main/res/values-nl/strings.xml
@@ -21,14 +21,14 @@
<string name="configitem_description_close">Sluit tunnel</string>
<string name="configitem_description_manage">Configureer dit verbindingsprofiel</string>
<string name="enable">Activeer</string>
- <string name="error">Foutmelding</string>
+ <string name="error">Fout</string>
<string name="fragment_list_add">Nieuwe Account</string>
<string name="main_about">Over</string>
<string name="main_create_tunnel">Maak een DNS-Tunnel van configuratie %s</string>
<string name="main_description_add_account">Voeg een account toe</string>
<string name="pref_delete">Verwijder</string>
<string name="pref_description_cancel">Annuleer</string>
- <string name="pref_help_default_route">Stel de standaard route in voor de tunnel</string>
+ <string name="pref_help_default_route">Leidt al het dataverkeer om door de tunnel.</string>
<string name="pref_help_lazy">Gebruik de luie modus voor hoger snelheid en mindere vertraging. Een klein gedeelte van de DNS relays lijkt verkeer dat op de luie modus verzonden is niet te kunnen verwerken, wat er toe kan leiden dat er (bijna) dataverkeer aankomt.</string>
<string name="pref_help_name">De naam van de configuratie.</string>
<string name="pref_help_nameserver">Een aangepaste adres van een Naamserver als de naamserver als de naamservermodus op \"aangepast\" staat.</string>
@@ -40,7 +40,7 @@
<string name="pref_help_request_type">Aangepast DNS request type. Normaal probeert Iodine automatisch het DNS request type met de hoogste bandbreedte te vinden en te gebruiken. Echter blijkt de DNS relay in sommige gevallen limieten op te leggen, waardoor andere DNS types onverwacht meer bandbreedte kunnen dragen. Als dat het geval is kunt u deze optie gebruiken om een ander type te selecteren. Van de meeste bandbreedte naar de minste zijn dit de ondersteunde DNS types: NULL, TXT, SRV, MX, CNAME en A.</string>
<string name="pref_help_topdomain">Het DNS verkeer zal als aanvragen van de subdomeinen onder _topdomain_ worden verzonden. Normaal gesproken is dit uw eigen domein. Gebruik een korte domeinnaam voor een hogere bandbreedte. Indien de gekozen nameserver die van Iodine is, kan elk tomdomein gekozen worden zolang hetzelfde domein op de server en de cliënt gekozen wordt.</string>
<string name="pref_help_tunnel_nameserver">De naamserver die gebruikt moet worden om het DNS verkeer door te sturen. Dit kan in principe elke naamserver zijn of de Iodined draaiende server indien die zonder omwegen bereikbaar is. Er kan zowel een IP adres als een hostname worden ingevuld. Het is niet verplicht dit in te vullen en indien dit niet wordt ingevuld, zal de standaard naamserver worden gebruikt.</string>
- <string name="pref_request_hostname_size">De maximale lengte van de opgevraagde (upstream) hostnamen. Vul een waarde van 100 to 255 in. De standaardinstelling is 255. Verminder A.U.B. deze waarde indien de DNS relay\'s onbetrouwbaar antwoord geven op volledige aanvragen, omdat de automatische detectie van de \"Downstream size\" anders niet betrouwbaar werkt.</string>
+ <string name="pref_request_hostname_size">De maximale lengte van de opgevraagde (upstream) hostnamen. Vul een waarde van 100 to 255 in. De standaardinstelling is 255. Verminder A.U.B. deze waarde indien de DNS relay\'s onbetrouwbaar antwoord geven op volledige aanvragen, omdat de automatische detectie van de Antwoord Grootte anders niet betrouwbaar werkt.</string>
<string name="pref_response_fragment_size">De grootte van de antwoorden. Wordt automatisch gedetecteerd wanneer 0 is ingevuld, wat normaal gesproken het geval is.</string>
<string name="pref_text_password_label">Wachtwoord</string>
<string name="pref_text_name_label">Configuatieprofiel Naam</string>
@@ -60,7 +60,17 @@
<string name="vpnservice_error_unknown_error_code">Onbekende fout. Code %d</string>
<string name="vpnservice_error_unknown_error_string">Onbekende fout. Reden: %s</string>
<string name="warning">Waarschuwing</string>
- <string name="connect">Verbind</string>
- <string name="disconnect">Verbreek verbinding</string>
+ <string name="connect">Verbinden...</string>
+ <string name="disconnect">Verbinding verbreken...</string>
<string name="pref_help_nameserver_mode">De Naamserver die moet worden gebruikt voor het opvragen van domeinnamen als de tunnel actief is.</string>
+ <string name="pref_text_lazy_mode_label">Luie modus</string>
+ <string name="pref_text_name_label_short">Naam</string>
+ <string name="pref_text_nameserver_label">Naamserver</string>
+ <string name="pref_text_request_hostname_size_label">Opgevraagde Hostnaam Grootte</string>
+ <string name="pref_text_request_type_label">DNS opvraagtype</string>
+ <string name="pref_text_response_fragment_size_label">Antwoord Grootte</string>
+ <string name="pref_text_tunnel_nameserver_label_or_empty">Tunnel Naamserver (optioneel)</string>
+ <string name="pref_text_default_route_label">Standaard Route</string>
+ <string name="vpnservice_connected_with_info">Verbonden: %1$s/%2$d MTE: %3$d</string>
+
</resources>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 4163767..21f2d8e 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -23,11 +23,20 @@
<string name="pref_description_cancel">Cancel</string>
<string name="configitem_description_close">Close Tunnel</string>
<string name="pref_text_password_label">Password</string>
- <string name="pref_text_topdomain_label">Tunnel Toplevel Domain</string>
+ <string name="pref_text_topdomain_label">Tunnel Top Domain</string>
+ <string name="pref_text_nameserver_label">Nameserver</string>
<string name="pref_text_tunnel_nameserver_label">Tunnel Nameserver</string>
+ <string name="pref_text_tunnel_nameserver_label_or_empty">Tunnel Nameserver (or empty)</string>
<string name="pref_text_nameserver_mode_label">Nameserver Mode</string>
<string name="pref_text_nameserver_address_label">Nameserver Address</string>
<string name="pref_text_name_label">Configuration Profile Name</string>
+ <string name="pref_text_name_label_short">Name</string>
+ <string name="pref_text_request_type_label">Request Type</string>
+ <string name="pref_text_lazy_mode_label">Lazy mode</string>
+ <string name="pref_text_raw_mode_label" translatable="false">Raw Mode</string>
+ <string name="pref_text_default_route_label">Default Route</string>
+ <string name="pref_text_request_hostname_size_label">Request Hostname Size</string>
+ <string name="pref_text_response_fragment_size_label">Response Fragment Size</string>
<string name="pref_text_use_default_nameserver">Use default Nameserver for tunneling</string>
<string name="pref_help_name">Name for this configuration.</string>
<string name="pref_help_topdomain">The dns traffic will be sent as queries for subdomains under _topdomain_. This is
@@ -82,14 +91,15 @@
<string name="error">Error</string>
<string name="configitem_description_manage">Configure this Connection Profile</string>
<string name="pref_title">Connection Configuration</string>
- <string name="pref_help_default_route">Set default Route for the tunnel device</string>
+ <string name="pref_help_default_route">Set default Route for the tunnel device. \nThis means that all the Internet traffic on your device will be redirected through the tunnel.</string>
<string name="main_create_tunnel">Create DNS Tunnel from Configuration named %s</string>
<string name="fragment_list_add">New Account</string>
<string name="main_about">About</string>
<string name="pref_delete">Delete</string>
<string name="close">Close</string>
- <string name="connect">Connect</string>
- <string name="disconnect">Disconnect</string>
+ <string name="connect">Connecting...</string>
+ <string name="disconnect">Disconnecting...</string>
+ <string name="vpnservice_connected_with_info">Connected: %1$s/%2$d MTU: %3$d</string>
</resources>