Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9053

Enable localizations for extracted modules

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.0.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Needs Assessment
    • Release Notes:
      New Feature
    • Release Notes Summary:
      We are now doing translations for extracted modules
    • QA Risk Assessment:
      Needs Assessment

      Description

      puppetlabs_spec_helper adds a dependency on gettext-setup which provides the gettext::* rake tasks, however, it is only enabled if the module defines a locales/ directory and provides a config.yaml within. So for each module, create locales/config.yaml containing (change project and package name):

      # This is the project-specific configuration file for setting up
      # fast_gettext for your project.
      gettext:
        # This is used for the name of the .pot and .po files; they will be
        # called <project_name>.pot?
        project_name: puppetlabs-augeas_core
        # This is used in comments in the .pot and .po files to indicate what
        # project the files belong to and should bea little more desctiptive than
        # <project_name>
        package_name: puppetlabs-augeas_core
        # The locale that the default messages in the .pot file are in
        default_locale: en
        # The email used for sending bug reports.
        bugs_address: docs@puppet.com
        # The holder of the copyright.
        copyright_holder: Puppet, Inc.
        # This determines which comments in code should be eligible for translation.
        # Any comments that start with this string will be externalized. (Leave
        # empty to include all.)
        comments_tag: TRANSLATOR
        # Patterns for +Dir.glob+ used to find all files that might contain
        # translatable content, relative to the project root directory
        source_files:
            - './lib/**/*.rb'
      

      Run bundle exec rake gettext:update_pot to create the initial .pot file
      Commit the newly added file
      Enable LOCALIZATION_ENABLED in ci-job-configs
      Verify i18n job runs and adds i18n commit to the repo, eg https://jenkins-master-prod-1.delivery.puppetlabs.net/view/modules/view/Core/view/augeas_core/view/master/job/forge-module_puppetlabs-augeas_core_i18n-ruby_master/
      .. and more

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                melissa Melissa Stone
                Reporter:
                josh Josh Cooper
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: