Extracted remaining hard-coded strings that won't be changed
This commit is contained in:
@ -3,6 +3,7 @@ package net.i2p.android.router.netdb;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.v4.content.AsyncTaskLoader;
|
import android.support.v4.content.AsyncTaskLoader;
|
||||||
|
|
||||||
|
import net.i2p.android.router.R;
|
||||||
import net.i2p.data.Hash;
|
import net.i2p.data.Hash;
|
||||||
import net.i2p.data.router.RouterAddress;
|
import net.i2p.data.router.RouterAddress;
|
||||||
import net.i2p.data.router.RouterInfo;
|
import net.i2p.data.router.RouterInfo;
|
||||||
@ -69,14 +70,28 @@ public class NetDbStatsLoader extends AsyncTaskLoader<List<ObjectCounter<String>
|
|||||||
private static final int SSUI = 2;
|
private static final int SSUI = 2;
|
||||||
private static final int NTCP = 4;
|
private static final int NTCP = 4;
|
||||||
private static final int IPV6 = 8;
|
private static final int IPV6 = 8;
|
||||||
private static final String[] TNAMES = { "Hidden or starting up", "SSU", "SSU with introducers", "",
|
private static final int[] TNAMES = {
|
||||||
"NTCP", "NTCP and SSU", "NTCP and SSU with introducers", "",
|
R.string.tname_0,
|
||||||
"", "IPv6 SSU", "IPv6 Only SSU, introducers", "IPv6 SSU, introducers",
|
R.string.tname_1,
|
||||||
"IPv6 NTCP", "IPv6 NTCP, SSU", "IPv6 Only NTCP, SSU, introducers", "IPv6 NTCP, SSU, introducers" };
|
R.string.tname_2,
|
||||||
|
0,
|
||||||
|
R.string.tname_4,
|
||||||
|
R.string.tname_5,
|
||||||
|
R.string.tname_6,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
R.string.tname_9,
|
||||||
|
R.string.tname_10,
|
||||||
|
R.string.tname_11,
|
||||||
|
R.string.tname_12,
|
||||||
|
R.string.tname_13,
|
||||||
|
R.string.tname_14,
|
||||||
|
R.string.tname_15,
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* what transport types
|
* what transport types
|
||||||
*/
|
*/
|
||||||
private static String classifyTransports(RouterInfo info) {
|
private String classifyTransports(RouterInfo info) {
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
for (RouterAddress addr : info.getAddresses()) {
|
for (RouterAddress addr : info.getAddresses()) {
|
||||||
String style = addr.getTransportStyle();
|
String style = addr.getTransportStyle();
|
||||||
@ -93,7 +108,7 @@ public class NetDbStatsLoader extends AsyncTaskLoader<List<ObjectCounter<String>
|
|||||||
rv |= IPV6;
|
rv |= IPV6;
|
||||||
|
|
||||||
}
|
}
|
||||||
return TNAMES[rv];
|
return getContext().getString(TNAMES[rv]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -120,11 +120,11 @@ public class NetDbSummaryPagerFragment extends I2PFragmentBase implements
|
|||||||
public CharSequence getPageTitle(int i) {
|
public CharSequence getPageTitle(int i) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
return "Countries";
|
return getString(R.string.countries);
|
||||||
case 2:
|
case 2:
|
||||||
return "Transports";
|
return getString(R.string.settings_label_transports);
|
||||||
default:
|
default:
|
||||||
return "Versions";
|
return getString(R.string.versions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,16 +83,16 @@ public class NetDbSummaryTableFragment extends Fragment {
|
|||||||
|
|
||||||
switch (mCategory) {
|
switch (mCategory) {
|
||||||
case 1:
|
case 1:
|
||||||
tl1.setText("Transports");
|
tl1.setText(R.string.country);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
tl1.setText("Country");
|
tl1.setText(R.string.transport);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
tl1.setText("Version");
|
tl1.setText(R.string.version);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tl2.setText("Count");
|
tl2.setText(R.string.count);
|
||||||
|
|
||||||
titleRow.addView(tl1);
|
titleRow.addView(tl1);
|
||||||
titleRow.addView(tl2);
|
titleRow.addView(tl2);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string-array name="log_level_list">
|
<string-array name="log_level_list">
|
||||||
<item>ERROR</item>
|
<item>ERROR</item>
|
||||||
<item>All</item>
|
<item>@string/all</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="log_levels">
|
<string-array name="log_levels">
|
||||||
<item>CRIT</item>
|
<item>CRIT</item>
|
||||||
@ -12,9 +12,9 @@
|
|||||||
<item>DEBUG</item>
|
<item>DEBUG</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="netdb_pages">
|
<string-array name="netdb_pages">
|
||||||
<item>Statistics</item>
|
<item>@string/statistics</item>
|
||||||
<item>Routers</item>
|
<item>@string/routers</item>
|
||||||
<item>LeaseSets</item>
|
<item>@string/leasesets</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="setting0to3">
|
<string-array name="setting0to3">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
@ -114,8 +114,8 @@
|
|||||||
<item>interactive</item>
|
<item>interactive</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="tunnel_profile_names">
|
<string-array name="tunnel_profile_names">
|
||||||
<item>Bulk connection (downloads/websites/BT)</item>
|
<item>@string/profile_bulk</item>
|
||||||
<item>Interactive connection</item>
|
<item>@string/profile_interactive</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="access_modes">
|
<string-array name="access_modes">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
@ -123,9 +123,9 @@
|
|||||||
<item>2</item>
|
<item>2</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="access_mode_names">
|
<string-array name="access_mode_names">
|
||||||
<item>Disabled</item>
|
<item>@string/disabled</item>
|
||||||
<item>Whitelist</item>
|
<item>@string/whitelist</item>
|
||||||
<item>Blacklist</item>
|
<item>@string/blacklist</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="sigtypes">
|
<string-array name="sigtypes">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
|
@ -77,6 +77,28 @@
|
|||||||
<string name="configure_graphs">Configure graphs</string>
|
<string name="configure_graphs">Configure graphs</string>
|
||||||
<string name="graphs_not_ready">Graphs are not ready yet. Try again later.</string>
|
<string name="graphs_not_ready">Graphs are not ready yet. Try again later.</string>
|
||||||
|
|
||||||
|
<string name="statistics">Statistics</string>
|
||||||
|
<string name="routers">Routers</string>
|
||||||
|
<string name="leasesets">LeaseSets</string>
|
||||||
|
<string name="countries">Countries</string>
|
||||||
|
<string name="country">Country</string>
|
||||||
|
<string name="transport">Transport</string>
|
||||||
|
<string name="versions">Versions</string>
|
||||||
|
<string name="version">Version</string>
|
||||||
|
<string name="count">Count</string>
|
||||||
|
<string name="tname_0">Hidden or starting up</string>
|
||||||
|
<string name="tname_1" translatable="false">SSU</string>
|
||||||
|
<string name="tname_2" translatable="false">SSU with introducers</string>
|
||||||
|
<string name="tname_4" translatable="false">NTCP</string>
|
||||||
|
<string name="tname_5" translatable="false">NTCP and SSU</string>
|
||||||
|
<string name="tname_6" translatable="false">NTCP and SSU with introducers</string>
|
||||||
|
<string name="tname_9" translatable="false">IPv6 SSU</string>
|
||||||
|
<string name="tname_10" translatable="false">IPv6 Only SSU, introducers</string>
|
||||||
|
<string name="tname_11" translatable="false">IPv6 SSU, introducers</string>
|
||||||
|
<string name="tname_12" translatable="false">IPv6 NTCP</string>
|
||||||
|
<string name="tname_13" translatable="false">IPv6 NTCP, SSU</string>
|
||||||
|
<string name="tname_14" translatable="false">IPv6 Only NTCP, SSU, introducers</string>
|
||||||
|
<string name="tname_15" translatable="false">IPv6 NTCP, SSU, introducers</string>
|
||||||
<string name="netdb_routers_empty">No routers in your NetDB.</string>
|
<string name="netdb_routers_empty">No routers in your NetDB.</string>
|
||||||
<string name="netdb_leases_empty">No LeaseSets in your NetDB.</string>
|
<string name="netdb_leases_empty">No LeaseSets in your NetDB.</string>
|
||||||
|
|
||||||
@ -275,10 +297,15 @@
|
|||||||
<string name="tunnel_summ_use_ssl">Use SSL to connect to target</string>
|
<string name="tunnel_summ_use_ssl">Use SSL to connect to target</string>
|
||||||
<string name="tunnel_parameters">Tunnel parameters</string>
|
<string name="tunnel_parameters">Tunnel parameters</string>
|
||||||
<string name="profile">Profile</string>
|
<string name="profile">Profile</string>
|
||||||
|
<string name="profile_bulk">Bulk connection (downloads/websites/BT)</string>
|
||||||
|
<string name="profile_interactive">Interactive connection</string>
|
||||||
<string name="delay_connect">Delay connect</string>
|
<string name="delay_connect">Delay connect</string>
|
||||||
<string name="tunnel_summ_delay_connect">Enable for request/response connections</string>
|
<string name="tunnel_summ_delay_connect">Enable for request/response connections</string>
|
||||||
<string name="access_control">Access control</string>
|
<string name="access_control">Access control</string>
|
||||||
<string name="restricted_access">Restricted access</string>
|
<string name="restricted_access">Restricted access</string>
|
||||||
|
<string name="disabled">Disabled</string>
|
||||||
|
<string name="whitelist">Whitelist</string>
|
||||||
|
<string name="blacklist">Blacklist</string>
|
||||||
<string name="access_list">Access list</string>
|
<string name="access_list">Access list</string>
|
||||||
<string name="reject_inproxies">Reject inproxies</string>
|
<string name="reject_inproxies">Reject inproxies</string>
|
||||||
<string name="tunnel_summ_reject_inproxies">Only allow I2P users to connect</string>
|
<string name="tunnel_summ_reject_inproxies">Only allow I2P users to connect</string>
|
||||||
@ -334,6 +361,7 @@
|
|||||||
<string name="signature_type">Signature type</string>
|
<string name="signature_type">Signature type</string>
|
||||||
<string name="custom_options">Custom options</string>
|
<string name="custom_options">Custom options</string>
|
||||||
|
|
||||||
|
<string name="all">All</string>
|
||||||
<string name="no_messages">No messages</string>
|
<string name="no_messages">No messages</string>
|
||||||
<string name="no_error_messages">No error messages</string>
|
<string name="no_error_messages">No error messages</string>
|
||||||
<plurals name="log_error_messages">
|
<plurals name="log_error_messages">
|
||||||
|
Reference in New Issue
Block a user