Skip to content

Commit 8484bf4

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 f437868 commit 8484bf4

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

init.lua

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@
1919
-- @module format
2020
local M = {}
2121

22-
-- Localizations.
23-
local _L = _L
24-
if not rawget(_L, 'Reformat') then
25-
-- Menu.
26-
_L['Reformat'] = 'Reformat'
27-
_L['Code'] = '_Code'
28-
_L['Paragraph'] = '_Paragraph'
29-
end
30-
3122
--- Helper function that returns whether or not the given config file exists in the current or
3223
-- a parent directory of the current buffer's filename.
3324
local function has_config_file(filename)
@@ -163,7 +154,10 @@ function M.paragraph()
163154
buffer:end_undo_action()
164155
end
165156

166-
-- Add menu entry.
157+
-- Add sub-menu.
158+
_L['Reformat'] = 'Reformat'
159+
_L['Code'] = '_Code'
160+
_L['Paragraph'] = '_Paragraph'
167161
local m_edit = textadept.menu.menubar['Edit']
168162
table.insert(m_edit, #m_edit - 1, {
169163
title = _L['Reformat'], --

0 commit comments

Comments
 (0)