diff options
author | 2009-01-03 22:50:12 -0500 | |
---|---|---|
committer | 2009-01-03 22:50:12 -0500 | |
commit | c15e9a9cf36da02cb883eb14fd3a4ee23548f675 (patch) | |
tree | be8de81c387208fa5011399d31df5c772e626f50 /core/init.lua | |
parent | fd48dede42c0678e4a5410bd635a02d255fe89d6 (diff) | |
download | textadept-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.lua | 6 |
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 |