From c15e9a9cf36da02cb883eb14fd3a4ee23548f675 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 3 Jan 2009 22:50:12 -0500 Subject: Added localization support. All Textadept messages are in core/locale.lua which provides the new 'textadept.locale' module. --- core/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/init.lua') 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 -- cgit v1.2.3