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/run.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) mode change 100644 => 100755 modules/textadept/run.lua (limited to 'modules/textadept/run.lua') diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua old mode 100644 new mode 100755 index 78b1fbdb..772214cb --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -1,6 +1,6 @@ -- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. -local locale = _G.locale +local L = _G.locale.localize --- -- Module for running/executing source files. @@ -107,7 +107,7 @@ error_detail = {} -- @see error_detail function goto_error(pos, line_num) local type = buffer._type - if type == locale.MESSAGE_BUFFER or type == locale.ERROR_BUFFER then + if type == L('[Message Buffer]') or type == L('[Error Buffer]') then line = buffer:get_line(line_num) for _, error_detail in pairs(error_detail) do local captures = { line:match(error_detail.pattern) } @@ -121,8 +121,7 @@ function goto_error(pos, line_num) local msg = captures[error_detail.message] if msg then buffer:call_tip_show(buffer.current_pos, msg) end else - error(string.format( - locale.M_TEXTADEPT_RUN_FILE_DOES_NOT_EXIST, utf8_filename)) + error(string.format('"%s" %s', L('does not exist'), utf8_filename)) end break end -- cgit v1.2.3