Skip to content

Commit 9ddec0a

Browse files
committed
Do not forward-declare localizations.
This is a remnant from when _L returned something different if a localization did not exist.
1 parent 4f5dba1 commit 9ddec0a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

init.lua

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ M.browser = WIN32 and 'start ""' or OSX and 'open' or LINUX and 'xdg-open'
1919
-- The default value is `true`.
2020
M.line_numbers = true
2121

22-
-- Localizations.
23-
if not rawget(_L, 'Export') then
24-
_L['Export'] = 'E_xport'
25-
_L['Export to HTML...'] = 'Export to _HTML...'
26-
end
27-
2822
--- Exports a file to HTML format and opens the result in a web browser.
2923
-- @param[opt=buffer.filename] filename The filename to export.
3024
-- @param[optchain] out_filename The filename to export to. If `nil`, the user is prompted for one.
@@ -125,6 +119,8 @@ function M.to_html(filename, out_filename)
125119
end
126120

127121
-- Add a sub-menu.
122+
_L['Export'] = 'E_xport'
123+
_L['Export to HTML...'] = 'Export to _HTML...'
128124
local m_file = textadept.menu.menubar['File']
129125
table.insert(m_file, #m_file - 1, {''}) -- separator
130126
table.insert(m_file, #m_file - 1, {title = _L['Export'], {_L['Export to HTML...'], M.to_html}})

0 commit comments

Comments
 (0)