diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2010-03-29 22:03:40 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2010-03-29 22:03:40 -0400 |
commit | 5c6c58d558c85381ae98f738d2b1a0e0cecaa58d (patch) | |
tree | 45845edc3022bb9d78d9e3d151d989ae97d9fae3 /core/locale.lua | |
parent | 1177ef981b04a0c368ab4cbad5e0f6bfdd252cb6 (diff) |
Check for ~/.textadept/locale.conf first; core/locale.lua
Diffstat (limited to 'core/locale.lua')
-rw-r--r-- | core/locale.lua | 7 |
1 files changed, 4 insertions, 3 deletions
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 |