Skip to content

Commit 627a3e7

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 c48910c commit 627a3e7

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

init.lua

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,6 @@ M.deletion_color_name = 'red'
7878
-- your theme's equivalent.
7979
M.modification_color_name = 'yellow'
8080

81-
-- Localizations.
82-
local _L = _L
83-
if not rawget(_L, 'Compare Files') then
84-
-- Dialogs.
85-
_L['Select the first file to compare'] = 'Select the first file to compare'
86-
_L['Select the file to compare to'] = 'Select the file to compare to'
87-
-- Status.
88-
_L['No more differences'] = 'No more differences'
89-
-- Menu.
90-
_L['Compare Files'] = 'Compare _Files'
91-
_L['Compare Files...'] = '_Compare Files...'
92-
_L['Compare This File With...'] = 'Compare This File _With...'
93-
_L['Compare Buffers'] = 'Compare _Buffers'
94-
_L['Next Change'] = '_Next Change'
95-
_L['Previous Change'] = '_Previous Change'
96-
_L['Merge Left'] = 'Merge _Left'
97-
_L['Merge Right'] = 'Merge _Right'
98-
_L['Stop Comparing'] = '_Stop Comparing'
99-
end
100-
10181
local lib = 'file_diff.diff'
10282
if OSX then
10383
lib = lib .. 'osx'
@@ -535,6 +515,15 @@ args.register('-d', '--diff', 2, M.start, 'Compares two files')
535515

536516
-- Add a menu and configure key bindings.
537517
-- (Insert 'Compare Files' menu in alphabetical order.)
518+
_L['Compare Files'] = 'Compare _Files'
519+
_L['Compare Files...'] = '_Compare Files...'
520+
_L['Compare This File With...'] = 'Compare This File _With...'
521+
_L['Compare Buffers'] = 'Compare _Buffers'
522+
_L['Next Change'] = '_Next Change'
523+
_L['Previous Change'] = '_Previous Change'
524+
_L['Merge Left'] = 'Merge _Left'
525+
_L['Merge Right'] = 'Merge _Right'
526+
_L['Stop Comparing'] = '_Stop Comparing'
538527
local m_tools = textadept.menu.menubar['Tools']
539528
local found_area
540529
for i = 1, #m_tools - 1 do

0 commit comments

Comments
 (0)