aboutsummaryrefslogtreecommitdiff
path: root/core/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-01-03 22:50:12 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-01-03 22:50:12 -0500
commitc15e9a9cf36da02cb883eb14fd3a4ee23548f675 (patch)
treebe8de81c387208fa5011399d31df5c772e626f50 /core/init.lua
parentfd48dede42c0678e4a5410bd635a02d255fe89d6 (diff)
downloadtextadept-c15e9a9cf36da02cb883eb14fd3a4ee23548f675.tar.gz
textadept-c15e9a9cf36da02cb883eb14fd3a4ee23548f675.zip
Added localization support.
All Textadept messages are in core/locale.lua which provides the new 'textadept.locale' module.
Diffstat (limited to 'core/init.lua')
-rw-r--r--core/init.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/init.lua b/core/init.lua
index 7fc94052..57d06a3d 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -9,6 +9,7 @@ end
_THEME = ''
require 'iface'
+require 'locale'
require 'events'
require 'file_io'
if not MAC then
@@ -22,10 +23,11 @@ end
-- if the check fails.
-- @param buffer The buffer in question.
function textadept.check_focused_buffer(buffer)
+ local locale = textadept.locale
if type(buffer) ~= 'table' or not buffer.doc_pointer then
- error('Buffer argument expected.', 2)
+ error(locale.ERR_BUFFER_EXPECTED, 2)
elseif textadept.focused_doc_pointer ~= buffer.doc_pointer then
- error('The indexed buffer is not the focused one.', 2)
+ error(locale.ERR_BUFFER_NOT_FOCUSED, 2)
end
end