In version of 3.2 of WeeChat, the default way of storing the
configuration and data, will be the XDG one. Let's adopt to this. Map
file will be stored on different location depending of the version of
weechat, but also, if mapping file would be spotted on one of the
defined locations, it would be used. Whatever version of the weechat you
have preferences are:
$XDG_DATA_HOME/weechat/replacement_map.json
$XDG_CONFIG_HOME/weechat/replacement_map.json
~/.weechat/weechat/replacement_map.json
whatever $XDG_somethinig is pointed to, or where
weechat_config_dir/weechat_data_dir are pointing. Those values are
retrieved from WeeChat, so you should know, where the replacement_map
should go.
Using different path for the weechat configuration results in inability
to find right replacemenet_map json file. Fix it by using
string_eval_path_home method, which will return right weechat config
directory.