diff options
author | 2010-10-15 16:52:12 -0400 | |
---|---|---|
committer | 2010-10-15 16:52:12 -0400 | |
commit | 6d11c044ec0059405c9e2813e39e9b618e7068c8 (patch) | |
tree | bd2d28c04d63d633817cc1f29c74608e36c7c3cb /modules/textadept/keys.lua | |
parent | 32602279973cef2783399c08709b3567f8369371 (diff) | |
download | textadept-6d11c044ec0059405c9e2813e39e9b618e7068c8.tar.gz textadept-6d11c044ec0059405c9e2813e39e9b618e7068c8.zip |
Changed locale implementation.
Diffstat (limited to 'modules/textadept/keys.lua')
-rw-r--r-- | modules/textadept/keys.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 9a38c709..a5e93225 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -1,6 +1,6 @@ -- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE. -local locale = _G.locale +local L = _G.locale.localize local events = _G.events --- @@ -553,7 +553,7 @@ local function run_key_command(lexer, scope) if type(key) ~= 'table' then return INVALID end end if #key == 0 and next(key) then - gui.statusbar_text = locale.KEYCHAIN..table.concat(keychain, ' ') + gui.statusbar_text = L('Keychain:')..' '..table.concat(keychain, ' ') return CHAIN end @@ -567,7 +567,7 @@ local function run_key_command(lexer, scope) end if type(f) ~= 'function' then - error(locale.KEYS_UNKNOWN_COMMAND..tostring(f)) + error(L('Unknown command:')..tostring(f)) end return f(unpack(args)) == false and PROPAGATE or HALT end @@ -629,8 +629,8 @@ local function keypress(code, shift, control, alt) -- Clear the key sequence, but keep any status messages from the key -- command itself. keychain = {} - if not (gui.statusbar_text == locale.INVALID or - gui.statusbar_text:find('^'..locale.KEYCHAIN)) then + if not (gui.statusbar_text == L('Invalid sequence') or + gui.statusbar_text:find('^'..L('Keychain:'))) then gui.statusbar_text = '' end end @@ -641,7 +641,7 @@ local function keypress(code, shift, control, alt) local size = #keychain - 1 clear_key_sequence() if not success and size > 0 then -- INVALID keychain sequence - gui.statusbar_text = locale.KEYS_INVALID + gui.statusbar_text = L('Invalid sequence') return true end -- PROPAGATE otherwise. |