Re: Help Line Text
Benno Schulenberg <[email protected]> Fri, 21 Feb 2020 16:39:23 +0100
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Alan, [CC'ing you in case you're not subscribed. Please answer only to the list.] Op 21-02-2020 om 02:38 schreef [email protected]: > Is it possible to change the text in the two help lines at the bottom of the screen? There is a way, but it's not straightforward. Nano is internationalized, so almost all of its messages can be translated. This translation mechanism also allows to simply reword nano's texts. But... it's quite a bit of work. First you must find out where your nano looks for its MO file. Run 'strace nano 2>TRAIL' and exit right away. Then 'grep nano.mo TRAIL'. The first path where it looks for the nano.mo file probably gives an ENOENT. Then that is where you want to create a new MO file. Then get nano's current POT file: https://translationproject.org/POT-files/nano-4.8-pre1.pot Rename that file to something like 'customized-nano.en.po'. Then open the file with nano and search for the "Read File" msgid. Change the corresponding msgstr (which is empty), to "Open". Search for and change all other strings you want to change. Then run: 'msgfmt -cv customized-nano.en.po'. This produces a messages.mo file. Then you 'sudo cp -v' this messages.mo to the full path that the 'grep nano.mo TRAIL' showed first, probably something like: /usr/share/locale/en_US/LC_MESSAGES/nano.mo When you then run nano, all the changes you made should be there. > [...] not to mention that GNU nano is a text editor, so it > is a bit redundant to mention that the shortcut will cut/paste "Text". Those were inherited from Pico: for nearly twenty years, nano has more or less faithfully copied the exact look of Pico. But I agree that those texts could be shortened/improved. > Perhaps the > help line text could be changed in the .nanorc file in the future (feature request)? No. That is too niche. You are the first to ask for this. And, for people that really want this, there is already a mechanism for this: using the translation MO files. > Please allow me to get ahead of myself for a minute, but could a settings menu > inside nano be a good idea? It would probably look cool. But... No. A preferences or settings menu is more something for a graphical program. Nano is a command-line tool. > Would such a thing be implementable with ncurses, Sure. > and be an interface to modify the .nanorc file? There is already an interface for modifying .nanorc file: nano itself. :) That is what nano is mainly used for: to make quick edits to config files. > Perhaps changing exactly what appears > in the help lines could be a nice feature, and maybe even reordering the > shortcuts in the help lines could be useful? In which order would you prefer to see the shortcuts in the help lines? And for whom? How would this be helpful? Benno
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEv9AJBh5TUFKtDfIVDSjU0qCs6IQFAl5P+bQACgkQDSjU0qCs 6ITZhg//fS3m0H9HHiEyPuGhinXB5mlUX1vIyh6lLXzsUgn0gEvWx7b8YAkXelr0 6//K/3mTZ74JH3Cdv5rtq7WffNSHP8uz6JUBMqLZgRmNVuU6x/LOYMCeaxUrpf20 00S8ZKBuBDOyeuyY5pbSB+DfIZ0srbnzJLNDHNMkC9xInDSxGhl7jWYQVHuw34rL yuYdc/B3ISnCoKG42eOGDMKb7NC8Dk1iAID4qqXnIkTkqZPs90Uq75kKrRD0OviM eBEnK6z+/9pQ9/AYl2yIzgIjX9RhwvbuQEa98Z1wBeE2bm0ptO1bDPT5BPfDmpQK LIenkL669YIZfoRMSsPi8HVD/4Wo/xFgs0cYJfWQiHF8rAWfM2u/YGsFh0loVhUa 84AenohKBSBiIWG/WsTmHYwdNdxaq9A3QknTESoMpwv8wVYcdC8ABAIYpz+CWV53 ysKNCmZSdfYn1BBww8GkmrO6Js/Ccy4rL3mIM1BP31+YkJD0fWdT5bc33JemBIp2 sha06OyKqkeGZWJDeSolnrJKQUz9ZRcsVhDa3vbqs11D5JC+/TFHpo0VuL3S9FFH ZbfyN0YHt7rkFqi7MlT2fYaLgFzkMAwv+ML0ArezQ/xRhwZtnfqsTm2vDBqSo2zj PV1kgMwO03OznctuT+zzD5KG9BBwvCPFKDzl4mKVP2w6ECRPGg8= =TEIV -----END PGP SIGNATURE-----