"get-text" "1" "" "" "Starbuntu"

NAME

get-text - reads for translation purposes a translation file readable for humans, e.g. Starbuntu.po (provided by Starbuntu)

SYNOPSIS

[textdomaindir=<path of the folder above ./locale/> textdomain=<name of the translation file *.po without extension>] get-text [--<language code>] <English phrase> [<values of the variables>]

DESCRIPTION

The Starbuntu program get-text translates an English entry of a translation file '*,po'. To the program must be handed over the environment variables textdomaindir=<path of the translation file> (without '/Locale/$LANGUAGE/LC_MESSAGES') as well as textdomain=<name of the translation file> (without .po) if they don't have the values like in the example below. Optionally, the parameter --$LANGUAGE can be set if $LANGUAGE is not the given user language. If the entry to be translated contains variables, their values must also be handed over as parameters. This program works at least for Starbuntu, but in may cases also for other packages if the alternative program gettext fails because, p.e., the boot process has not yet been completed.

When calling get-text, it should be noted that in the given English phrase the dollar sign and the square brackets must be preceded by a backslash.

OPTIONS

--<language code>
e.g. --es for Spanish

FILES

/usr/local/bin/get-text
/usr/bin/gettext
/usr/local/share/locale/$LANGUAGE/LC_MESSAGES/*.po

ENVIRONMENT VARIABLES

textdomaindir
  <path of the folder above ./locale/> (e.g. /usr/local/share)
textdomain
  <name of the translation file *.po without extension> (e.g. Starbuntu)

EXAMPLE

textdomaindir="/usr/local/share" textdomain=Starbuntu get-text --es "Starbuntu upgradable to \\$newest!" 24.04.2.14

For comparison:

newest=24.04.2.14
msgid="Starbuntu upgradable to \\$newest!"
TEXTDOMAINDIR="/usr/share/locale" TEXTDOMAIN=Starbuntu LANGUAGE=es gettext "$msgid" | (export PATH `envsubst --variables "$msgid"`; envsubst "$msgid")

AUTHOR

Peter Starfinger <info@die-starfingers.de>

SEE ALSO

GNU program
gettext