From ddcc45f0615ab6ba776635a15e2183f8d50401a7 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 10 Feb 2009 10:24:56 -0500 Subject: Moved the textadept.locale table into the globals table. --- core/file_io.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/file_io.lua') diff --git a/core/file_io.lua b/core/file_io.lua index 4dce2721..8e487930 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -1,6 +1,7 @@ -- Copyright 2007-2009 Mitchell mitchellcaladbolg.net. See LICENSE. local textadept = _G.textadept +local locale = _G.locale --- -- Provides file input/output routines for Textadept. @@ -48,7 +49,6 @@ end -- specified, the user is prompted to open files from a dialog. -- @usage textadept.io.open(filename) function open(filenames) - local locale = textadept.locale filenames = filenames or cocoa_dialog('fileselect', { title = locale.IO_OPEN_TITLE, @@ -113,7 +113,7 @@ function save_as(buffer, filename) if not filename then filename = cocoa_dialog('filesave', { - title = textadept.locale.IO_SAVE_TITLE, + title = locale.IO_SAVE_TITLE, ['with-directory'] = (buffer.filename or ''):match('.+[/\\]'), ['with-file'] = (buffer.filename or ''):match('[^/\\]+$'), ['no-newline'] = true @@ -148,7 +148,6 @@ end -- buffer. -- @usage buffer:close() function close(buffer) - local locale = textadept.locale textadept.check_focused_buffer(buffer) if buffer.dirty and cocoa_dialog('yesno-msgbox', { title = locale.IO_CLOSE_TITLE, -- cgit v1.2.3