aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/locale.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-01-17 20:19:15 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-01-17 20:19:15 -0500
commit97ea188d73d72fd9807eee7710b55bde39a6ef5a (patch)
tree7939eb06cc4be7fcd414244aea0eb3fd9e09f75a /core/locale.lua
parentd64023344dc20f539b2830acddf07bfaed73f944 (diff)
Updated LuaDoc.
Diffstat (limited to 'core/locale.lua')
-rw-r--r--core/locale.lua21
1 files changed, 20 insertions, 1 deletions
diff --git a/core/locale.lua b/core/locale.lua
index ec7263c8..b59141f5 100644
--- a/core/locale.lua
+++ b/core/locale.lua
@@ -2,6 +2,19 @@
local M = {}
+--[[ This comment is for LuaDoc.
+---
+-- Table of all messages used by Textadept for localization.
+module('_L')]]
+
+-- Markdown:
+-- # Settings
+--
+-- * `_NIL` [string]: String returned when no localization for a given message
+-- exists.
+
+M._NIL = 'No Localization'
+
local f = io.open(_USERHOME..'/locale.conf', 'rb')
if not f then f = io.open(_HOME..'/core/locale.conf', 'rb') end
if not f then error('"core/locale.conf" not found.') end
@@ -13,4 +26,10 @@ for line in f:lines() do
end
f:close()
-return setmetatable(M, { __index = function() return 'No Localization' end })
+---
+-- This table contains no functions.
+-- @class function
+-- @name no_functions
+local no_functions
+
+return setmetatable(M, { __index = function() return M._NIL end })