aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/locale.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-09-12 11:24:11 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-09-12 11:24:11 -0400
commit9dc8ce16a1efc6482db6f1d5456d42958e79a06c (patch)
treee26ff636143fc74f92a6a3359a73e93194da6bc3 /core/locale.lua
parent4305f32ac153b7a45a1c001da2fcd412af905168 (diff)
Documentation overhaul.
Rewrote most of the manual and Lua API to complement each other. Key bindings reference moved from Appendix to modules/textadept/keys.lua LuaDoc.
Diffstat (limited to 'core/locale.lua')
-rw-r--r--core/locale.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/locale.lua b/core/locale.lua
index 449f4dee..68a8266c 100644
--- a/core/locale.lua
+++ b/core/locale.lua
@@ -5,12 +5,15 @@ local M = {}
--[[ This comment is for LuaDoc.
---
-- Table of all messages used by Textadept for localization.
+-- If the table does not contain the localized version of a given message, it
+-- returns a string indicating so via a metamethod.
module('_L')]]
local none = 'No Localization: '
---
-- Returns whether or not a localized message exists for the given message.
+-- This function is necessary since `_L[message]` never returns `nil`.
-- @param message The message to localize.
-- @return `true` if a localization exists, `false` otherwise.
function M._EXISTS(message) return M[message] ~= none..message end