From 5c6c58d558c85381ae98f738d2b1a0e0cecaa58d Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 29 Mar 2010 22:03:40 -0400 Subject: Check for ~/.textadept/locale.conf first; core/locale.lua --- core/locale.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/locale.lua b/core/locale.lua index d4b56e19..93bf1024 100644 --- a/core/locale.lua +++ b/core/locale.lua @@ -8,8 +8,8 @@ module('locale', package.seeall) -- ## Overview -- -- All Textadept messages displayed are located in `core/locale.conf`. To change --- the language, simply replace that file with a similar file containing the --- translated messages. See `core/locale.conf` for more information. +-- the language, simply put a similar file containing the translated messages in +-- your `~/.textadept/` folder. See `core/locale.conf` for more information. -- -- Feel free to translate Textadept and send your modified `locale.conf` files -- to me. I will put them up on the site where they can be accessed. @@ -21,7 +21,8 @@ module('locale', package.seeall) local escapes = { ['\\n'] = '\n', ['\\r'] = '\r', ['\\t'] = '\t' } -local f = io.open(_HOME..'/core/locale.conf', 'rb') +local f = io.open(_USERHOME..'/locale.conf', 'rb') +if not f then f = io.open(_HOME..'/core/locale.conf', 'rb') end if not f then error('"core/locale.conf" not found.') end for line in f:lines() do if not line:find('^%s*%%') then -- cgit v1.2.3