2006-02-21 23:37:01 +08:00
|
|
|
#
|
2016-08-08 10:29:14 +08:00
|
|
|
# Alias for gettext or a fallback if gettext isn't installed.
|
2006-02-21 23:37:01 +08:00
|
|
|
#
|
2019-01-19 06:40:52 +08:00
|
|
|
# Use ggettext if available.
|
|
|
|
# This is the case on OpenIndiana, where the default gettext
|
|
|
|
# interprets `\n` itself, so
|
|
|
|
# printf (_ 'somemessage\n')
|
|
|
|
# won't print a newline.
|
|
|
|
if command -sq ggettext
|
|
|
|
function _ --description "Alias for the ggettext command"
|
|
|
|
command ggettext fish $argv
|
|
|
|
end
|
|
|
|
else if command -sq gettext
|
2016-08-08 10:29:14 +08:00
|
|
|
function _ --description "Alias for the gettext command"
|
|
|
|
command gettext fish $argv
|
|
|
|
end
|
2006-02-21 23:37:01 +08:00
|
|
|
else
|
2016-08-08 10:29:14 +08:00
|
|
|
function _ --description "Fallback alias for the gettext command"
|
|
|
|
echo -n $argv
|
|
|
|
end
|
2006-02-21 23:37:01 +08:00
|
|
|
end
|
|
|
|
|