aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/locale.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-11-19 23:53:30 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-11-19 23:53:30 -0500
commit5f98f4e9afdc411dd492d103ff7e26c258d9b935 (patch)
treea774d8090f3e6fcbe017b9d1d65307b6da2a8e50 /core/locale.lua
parent9cdaf41a724dd0d739611c698e92f4421a2fbafc (diff)
Rewrote LuaDoc.
Diffstat (limited to 'core/locale.lua')
-rw-r--r--core/locale.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/locale.lua b/core/locale.lua
index 715e817e..87123183 100644
--- a/core/locale.lua
+++ b/core/locale.lua
@@ -4,7 +4,7 @@ local M = {}
--[[ This comment is for LuaDoc.
---
--- Table of all messages used by Textadept for localization.
+-- Map of all messages used by Textadept to their localized form.
-- If the table does not contain the localized version of a given message, it
-- returns a string indicating so via a metamethod.
module('_L')]]
@@ -12,10 +12,11 @@ module('_L')]]
local none = 'No Localization: '
---
--- Returns whether or not a localized message exists for the given message.
+-- Returns whether or not *message* is localized.
-- This function is necessary since `_L[message]` never returns `nil`.
-- @param message The message to localize.
-- @return `true` if a localization exists, `false` otherwise.
+-- @name _EXISTS
function M._EXISTS(message) return M[message] ~= none..message end
local f = io.open(_USERHOME..'/locale.conf', 'rb')