Skip to content

Make config.yaml filename configurable, or pass in config from code #43

@domcleal

Description

@domcleal

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions