Skip to content

Don't recreate po files, just compile them

Jenny Danzymayr requested to merge evilscientress/gitlab:master into master

I was having an error with Gitlab that it created a lot of noise with the following warning message, most annoyingly in the create backup command even with the CRON=1 flag.

sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production CRON=1
Warning: fuzzy message was ignored.
  /opt/gitlabhq-11.10/locale/en/gitlab.po: msgid 'Tag'

I thought it was an error in Gitlab itself and oppened an issue, but it turned out to be an error in the ebulid.

Currently the ebuild contains the following lines related to I18N:

    einfo "Compile GetText PO files ..."
    su -l ${GIT_USER} -s /bin/sh -c "
        export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
        cd ${DEST_DIR}
        ${BUNDLE} exec rake gettext:pack RAILS_ENV=${RAILS_ENV}
        ${BUNDLE} exec rake gettext:po_to_json RAILS_ENV=${RAILS_ENV}" \
            || die "failed to compile GetText PO files"

And those are the problem, one is only supposed to compile the gettext po files, not recreate the po files them self. In fact the correct command as per the installation documentation is never run.

The correct command would be: ${BUNDLE} exec rake gettext:compile RAILS_ENV=${RAILS_ENV}.

This merge request fixes this issue.

Merge request reports