mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
fix three explicitly translated messages
This commit is contained in:
parent
3e29793d04
commit
5ef8b91db8
4 changed files with 20 additions and 4 deletions
|
@ -250,7 +250,23 @@ sudo ln -s /usr/bin/clang-format-3.9 /usr/bin/clang-format
|
||||||
|
|
||||||
## Message Translations
|
## Message Translations
|
||||||
|
|
||||||
Fish uses the GNU gettext library to translate messages from english to other languages. To create or update a translation run `make po/[LANGUAGE CODE].po`. Where `LANGUAGE CODE` is the two letter ISO 639-1 language code of the language you are translating to. For example, `de` for German. You'll need to have the `xgettext` and `msgmerge` commands installed to do this.
|
Fish uses the GNU gettext library to translate messages from english to other languages. To create or update a translation run `make po/[LANGUAGE CODE].po`. Where `LANGUAGE CODE` is the two letter ISO 639-1 language code of the language you are translating to. For example, `de` for German. You'll need to have the `xgettext`, `msgfmt` and `msgmerge` commands installed to do this.
|
||||||
|
|
||||||
|
All messages in fish script must be enclosed in single or double quote characters. They must also be translated via a subcommand. This means that the following are not valid:
|
||||||
|
|
||||||
|
```
|
||||||
|
echo (_ hello)
|
||||||
|
_ "goodbye"
|
||||||
|
```
|
||||||
|
|
||||||
|
Those should be written like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
echo (_ "hello")
|
||||||
|
echo (_ "goodbye")
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that you can use either single or double quotes to enclose the message to be translated. You can also optionally include spaces after the opening parentheses and before the closing paren.
|
||||||
|
|
||||||
Be cautious about blindly updating an existing translation file. Trivial changes to an existing message (e.g., changing the punctuation) will cause existing translations to be removed. That is because the tools do literal string matching. Which means that in general you need to carefully review any recommended deletions.
|
Be cautious about blindly updating an existing translation file. Trivial changes to an existing message (e.g., changing the punctuation) will cause existing translations to be removed. That is because the tools do literal string matching. Which means that in general you need to carefully review any recommended deletions.
|
||||||
|
|
||||||
|
|
|
@ -76,5 +76,5 @@ complete -c set -n '__fish_set_is_color' -s o -l bold --description 'Make font b
|
||||||
|
|
||||||
# Locale completions
|
# Locale completions
|
||||||
complete -c set -n '__fish_is_first_token' -x -a '$__fish_locale_vars' -d 'Locale variable'
|
complete -c set -n '__fish_is_first_token' -x -a '$__fish_locale_vars' -d 'Locale variable'
|
||||||
complete -c set -n '__fish_set_is_locale' -x -a '(locale -a)' -d (_ Locale)
|
complete -c set -n '__fish_set_is_locale' -x -a '(locale -a)' -d (_ "Locale")
|
||||||
complete -c set -s L -l long -d 'Do not truncate long lines'
|
complete -c set -s L -l long -d 'Do not truncate long lines'
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
function __fish_complete_directories -d "Complete directory prefixes" --argument comp desc
|
function __fish_complete_directories -d "Complete directory prefixes" --argument comp desc
|
||||||
if not set -q desc[1]
|
if not set -q desc[1]
|
||||||
set desc (_ Directory)
|
set desc (_ "Directory")
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l dirs $comp*/
|
set -l dirs $comp*/
|
||||||
|
|
|
@ -10,7 +10,7 @@ function __fish_print_packages
|
||||||
end
|
end
|
||||||
|
|
||||||
#Get the word 'Package' in the current language
|
#Get the word 'Package' in the current language
|
||||||
set -l package (_ Package)
|
set -l package (_ "Package")
|
||||||
|
|
||||||
# Set up cache directory
|
# Set up cache directory
|
||||||
if test -z "$XDG_CACHE_HOME"
|
if test -z "$XDG_CACHE_HOME"
|
||||||
|
|
Loading…
Reference in a new issue