aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/locale.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-01 10:30:09 -0400
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-01 10:30:09 -0400
commit8da5f6b4a13f14b9dd3cb9dc23ad4f7bf41e91c1 (patch)
tree376f0ba87acd8e312205e828ea12d6cf9c1c3ce5 /core/locale.lua
parentb0d3f180a5e23704a20ccf8262df9b8703b744e4 (diff)
Handle CRLF in locale files.
Previously, LF was expected, so CR (if present) would be in every message.
Diffstat (limited to 'core/locale.lua')
-rw-r--r--core/locale.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/locale.lua b/core/locale.lua
index e691f21c..48701116 100644
--- a/core/locale.lua
+++ b/core/locale.lua
@@ -24,7 +24,7 @@ for line in f:lines() do
-- Any line that starts with a non-word character except '[' is considered a
-- comment.
if not line:find('^%s*[^%w_%[]') then
- local id, str = line:match('^(.-)%s*=%s*(.+)$')
+ local id, str = line:match('^(.-)%s*=%s*(.-)\r?$')
if id and str and assert(not M[id], 'duplicate locale key "%s"', id) then
M[id] = not CURSES and str or str:gsub('_', '')
end