Dan Espen wrote:
> Dominique Michel <dominique.mic...@vtxnet.ch> writes:
>
>> I try to get UseGettext to work with FvwmScript and Fvwm-Crystal.
>>
>> From FvwmScript man page:
>>
>> UseGettext [locale_path]
>>     You can reset this catalog or add some catalogs exactly in the same
>>     way than with the LocalePath fvwm command (see the fvwm manual
>>     page).
>>
>> In Fvwm-Crystal config, one of the first instruction is:
>>
>> LocalePath
>> $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
>>
>> If I put exactly the same path in my FvwmScript
>> UseGettext
>> $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
>>
>> the script crash with a syntax error at that line:
>> UseGettext!
>> [/home/dom/.fvwm-crystal/scripts/FontSelector/FontSelector] Line 7:
>> syntax error
>>
>> The beginning of the script:
>>
>> # FvwmScript Font Selector
>> # A Font Selector for Fvwm-Crystal
>> # Copyright Dominique Michel <dominique_li...@users.sourceforge.net>
>> 2013
>> # Released under the GNU GPL license v2 or later
>>
>> # Header ̣{{{1
>> UseGettext
>> $[FVWM_USERDIR]/locale;fvwm-crystal:$[FVWM_SYSTEMDIR]/locale;fvwm-crystal:+
>> WindowLocaleTitle {FVWM-Crystal Font Selector}
>>
>> Is it something I can do, or is it a bug?
>
> See my other reply.  I don't think FvwmScript is going to expand
> $[FVWM_SYSTEMDIR].
>
It does, but the string in FvwmScript have to be quoted in FvwmScript
quotes:
UseGettext {$FVWM_USERDIR/locale;fvwm-crystal:$FVWM_SYSTEMDIR/locale;fvwm-crystal:+}

If this doesn't work the problem could be that fvwm-crystal doesn't
export FVWM_USERDIR in the shell, too. It is not enough to set
FVWM_USERDIR in the config. I have had the same problems and fixed it in
the start up script.

For crystal the following should be added in fvwm-crystal startup script:
# Default path
# if a variable 'configfile' is defined in the environment, its value is
# preserved; otherwise, the scripts look for configuration in common places.
configfile="$HOME/fvwm-crystal/$configname"
export FVWM_USERDIR=$HOME/fvwm-crystal
export FNS_SYSTEMDIR=`dirname ${0}`/../share/fvwm-crystal

Thomas

Reply via email to