mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix quote and text
This commit is contained in:
@@ -53,7 +53,7 @@ local function calculatePsk(ssid, pwd)
|
||||
local fp = io.popen(("wpa_passphrase %q %q"):format(ssid, pwd))
|
||||
local out = fp:read("*a")
|
||||
fp:close()
|
||||
return string.match(out, 'psk=([a-f0-9]+)')
|
||||
return string.match(out, "psk=([a-f0-9]+)")
|
||||
end
|
||||
|
||||
--- Authenticates network.
|
||||
@@ -69,14 +69,14 @@ function WpaSupplicant:authenticateNetwork(network)
|
||||
if err then return false, err end
|
||||
|
||||
local re = wcli:setNetwork(nw_id, "ssid", string.format("\"%s\"", network.ssid))
|
||||
if re == 'FAIL' then
|
||||
if re == "FAIL" then
|
||||
wcli:removeNetwork(nw_id)
|
||||
return false, _("An error occurred while selecting network.")
|
||||
end
|
||||
-- if password is empty it’s an open AP
|
||||
if network.password and (network.password == nil or string.len(network.password) == 0) then -- Open AP
|
||||
re = wcli:setNetwork(nw_id, "key_mgmt", "NONE")
|
||||
if re == 'FAIL' then
|
||||
if re == "FAIL" then
|
||||
wcli:removeNetwork(nw_id)
|
||||
return false, _("An error occurred while setting passwordless mode.")
|
||||
end
|
||||
@@ -87,7 +87,7 @@ function WpaSupplicant:authenticateNetwork(network)
|
||||
self:saveNetwork(network)
|
||||
end
|
||||
re = wcli:setNetwork(nw_id, "psk", network.psk)
|
||||
if re == 'FAIL' then
|
||||
if re == "FAIL" then
|
||||
wcli:removeNetwork(nw_id)
|
||||
return false, _("An error occurred while setting password.")
|
||||
end
|
||||
@@ -118,7 +118,7 @@ function WpaSupplicant:authenticateNetwork(network)
|
||||
elseif ev:isAuthFailed() then
|
||||
failure_cnt = failure_cnt + 1
|
||||
if failure_cnt > 3 then
|
||||
re, msg = false, _('Failed to authenticate')
|
||||
re, msg = false, _("Failed to authenticate")
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -132,7 +132,7 @@ function WpaSupplicant:authenticateNetwork(network)
|
||||
UIManager:close(info)
|
||||
UIManager:forceRePaint()
|
||||
if cnt >= max_retry then
|
||||
re, msg = false, _('Timed out')
|
||||
re, msg = false, _("Timed out")
|
||||
end
|
||||
return re, msg
|
||||
end
|
||||
|
||||
@@ -287,7 +287,7 @@ function NetworkItem:onEditNetwork()
|
||||
password_input = InputDialog:new{
|
||||
title = self.info.ssid,
|
||||
input = self.info.password,
|
||||
input_hint = _("password (leave empty if open network)"),
|
||||
input_hint = _("password (leave empty for open networks)"),
|
||||
input_type = "text",
|
||||
text_type = "password",
|
||||
buttons = {
|
||||
@@ -329,7 +329,7 @@ function NetworkItem:onAddNetwork()
|
||||
password_input = InputDialog:new{
|
||||
title = self.info.ssid,
|
||||
input = "",
|
||||
input_hint = _("password (leave empty if open network)"),
|
||||
input_hint = _("password (leave empty for open networks)"),
|
||||
input_type = "text",
|
||||
text_type = "password",
|
||||
buttons = {
|
||||
|
||||
Reference in New Issue
Block a user