fish-shell/doc_src
Fabian Homborg 4785440f65
Add an "_" builtin to call into gettext (#7036)
* Add an "_" builtin to call into gettext

We already have gettext in C++ (if available), so it seems weird to
fork off a command to start it from script.

This is only for fish's own translations. There's no way to call into
other catalogs, it just translates all arguments separately.

This is faster by a factor of ~1000, which allows us to call
translations much more, especially from scripts.

E.g. making fish_greeting global by default would hurt cost-wise,
given that my fish starts up in 8ms and just calling the current `_`
function takes 2ms, and that would have two calls.

Incidentally, this also makes us rely on a weirdly defined function
less, so it:
Fixes #6804.

* docs: Add `_` docs

Let's see if that filename works out.

* Reword _ docs
2020-05-29 20:53:44 +02:00
..
_static doc: make <kbd> style more prominent 2020-03-19 18:22:40 +01:00
cmds Add an "_" builtin to call into gettext (#7036) 2020-05-29 20:53:44 +02:00
commands.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
completions.rst docs: don't quote code snippets 2020-04-13 22:56:22 +02:00
conf.py docs: Make a fish-completions manpage 2020-03-21 12:07:30 +01:00
design.rst docs: don't quote code snippets 2020-04-13 22:56:22 +02:00
faq.rst Reword sentence 2020-05-28 17:39:37 +02:00
fish_indent_lexer.py We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
index.rst docs: Some rewording in Special Variables 2020-05-24 20:23:31 +02:00
license.rst chore: bump copyright year 2019 → 2020 2020-03-14 14:03:09 -07:00
tutorial.rst docs/tutorial: Recommend fish_add_path over $fish_user_paths 2020-05-29 20:51:09 +02:00