Re: [code] [textadept] No Localization:context

From: Mitchell <>
Date: Tue, 2 May 2017 12:06:19 -0400 (EDT)

Hi Sebastian,

On Mon, 1 May 2017, cryo shock wrote:

> Hi guys,
> in TA 9.3 I had manually modified the TA\modules\textadept\menu.lua as I
> added a context menu entry for the snippet menu:
> local default_context_menu = {
> ...
> {_L['Insert _Snippet...'], textadept.snippets._select}
> The funny thing is, that this worked on one of my PCs. The context menu
> entry said:
> Insert Snippet...
> One another PC though the context menu entry said:
> No Localization:Insert Snippet...
> Now I updated to v9.4 and added the very same line as before. On my first
> mentioned PC now the menu entry also says:
> No Localization:Insert Snippet...
> What exactly didn't I localize? A path or... code block? All the lines
> above mine are build up the same as far as I can tell, i.e.:
> {_L['Select _All'], buffer.select_all}
> I checked the API manual for localize and Localization but tbh it didn't
> enlighten me.

The default locale file with its messages is `core/locale.conf`. Try
copy-pasting the left-hand key without the trailing space.

> Second:
> How can I integrate this change to my init.lua? Or should I duplicate the
> folder structure and menu.lua from the TA folder to my ~\.textadept folder?

Are you talking about the context menu? If so, in a `events.INITIALIZED`
handler, try:

   events.connect(events.INITIALIZED, function()
     local context_menu =
     context_menu[#context_menu + 1] = {'label', function}

(You can also use `table.insert()`, etc.)

> Third question:
> Can I also add changes for other files (in my case the
> TA\share\themes\MS-Windows\gtk-2.0\gtkrc) to my init.lua or only to .lua
> files?

No, those changes have to happen in Textadept's own file structure. Lua
does not have access to those files and features.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 02 May 2017 - 12:06:19 EDT

This archive was generated by hypermail 2.2.0 : Wed 03 May 2017 - 06:32:41 EDT