From 6d11c044ec0059405c9e2813e39e9b618e7068c8 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 15 Oct 2010 16:52:12 -0400 Subject: Changed locale implementation. --- modules/textadept/keys.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/textadept/keys.lua') 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 mitchellcaladbolg.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. -- cgit v1.2.3