Add translations
This commit is contained in:
@@ -84,7 +84,6 @@ class RepeaterFragment : Fragment(), ServiceConnection, Toolbar.OnMenuItemClickL
|
||||
val description get() = getString(when (neighbour?.state) {
|
||||
IpNeighbour.State.INCOMPLETE, null -> R.string.connected_state_incomplete
|
||||
IpNeighbour.State.VALID -> R.string.connected_state_valid
|
||||
IpNeighbour.State.VALID_DELAY -> R.string.connected_state_valid_delay
|
||||
IpNeighbour.State.FAILED -> R.string.connected_state_failed
|
||||
else -> throw IllegalStateException()
|
||||
}, iface)
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.io.IOException
|
||||
|
||||
data class IpNeighbour(val ip: String, val dev: String, val lladdr: String, val state: State) {
|
||||
enum class State {
|
||||
INCOMPLETE, VALID, VALID_DELAY, FAILED, DELETING
|
||||
INCOMPLETE, VALID, FAILED, DELETING
|
||||
}
|
||||
|
||||
companion object {
|
||||
@@ -38,8 +38,7 @@ data class IpNeighbour(val ip: String, val dev: String, val lladdr: String, val
|
||||
.singleOrNull() ?: "")
|
||||
val state = if (match.groupValues[1].isNotEmpty()) State.DELETING else when (match.groupValues[9]) {
|
||||
"", "INCOMPLETE" -> State.INCOMPLETE
|
||||
"REACHABLE", "STALE", "PROBE", "PERMANENT" -> State.VALID
|
||||
"DELAY" -> State.VALID_DELAY
|
||||
"REACHABLE", "DELAY", "STALE", "PROBE", "PERMANENT" -> State.VALID
|
||||
"FAILED" -> State.FAILED
|
||||
"NOARP" -> return null // skip
|
||||
else -> {
|
||||
|
||||
Reference in New Issue
Block a user