-
Notifications
You must be signed in to change notification settings - Fork 23
Description
The hardcoded config.yaml filename in GettextSetup.initialize is a bit limiting for packagers of software using gettext-setup. Ideally this would be unique per package (e.g. puppet.yaml) or simply not exist, and the software passes the configuration in as a hash rather than reading an external file.
It works OK if the software's packaged into a private directory, but when packaging into a standard Linux/Unix layout with locales all under /usr/share/locale (e.g. /usr/share/local/fr/LC_MESSAGES/puppet.po) the config file names from multiple packages will clash - they'd all be /usr/share/local/config.yaml.
If the initialize method took a config filename as a second argument or in the options hash, set to config.yaml by default, apps could then pass in their own filenames. Or if the initialize method simply used options, then apps could call initialize(project_name: 'puppet', package_name: ...) etc.
(Though either of these suggestions requires changes in every project to make it effective.)