Project

General

Profile

Bug #8874

gettext 3.1.13+ causes locale tx-update errors due to .edit.po files

Added by Dominic Cleal over 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internationalization
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Since gettext 3.1.13+ locale updates aren't working quite right, as some new .edit.po and timestamp files in the locale directories are created, which breaks the git commits in our Makefile.

The intention appears to be that we pull translations into the .edit.po files instead, which get merged into the .po files by gettext.


Related issues

Related to Hammer CLI - Tracker #8978: Drop Ruby 1.8 support in hammerClosed2015-01-15

Blocks Foreman - Bug #13033: plugin:gettext rake task doesn't load with gettext_i18n_rails_js 1.xClosed2016-01-07

Associated revisions

Revision 4406f5af (diff)
Added by Dominic Cleal over 3 years ago

fixes #8874 - rework POT/PO updates for gettext 3's edit.po

3.1.13 adds an intermediate .edit.po file alongside each .po, which is meant
to be kept outside of SCM and updated by users, whereupon it's merged back into
the .po on the next rake gettext:find execution.

Previously we overwrote all gettext .po file changes with files directly from
Transifex, but now these are downloaded to .edit.po and gettext merges them
back in. Fuzzy merges have been disabled as they were inaccurate.

History

#1 Updated by Dominic Cleal over 4 years ago

Previously...

  • make -C locale tx-update
    • pulls rails locale files
    • runs tx pull, which overwrites locale/*/foreman.po
    • git commits
    • runs rake locale:po_to_json, which converts foreman.po to app.js
    • runs rake locale:find, which overwrites locale/foreman.po, re-merges locale/*/foreman.po
    • reverts locale/*/foreman.po from previous step
    • git amends

Now there's an .edit.po and real .po file, tx pull should in theory go to the edit file first, then let gettext handle merging back to .po.

#2 Updated by Dominic Cleal over 4 years ago

I opened https://github.com/ruby-gettext/gettext/issues/36 to ask for examples or help on what the .edit.po is for, and how it should be used before deciding exactly how to proceed.

#3 Updated by Michael Moll over 4 years ago

  • Related to Tracker #8978: Drop Ruby 1.8 support in hammer added

#4 Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2096 added
  • Pull request deleted ()

#5 Updated by Dominic Cleal over 4 years ago

Now:

  • make -C locale tx-update
    • pulls rails locale files
    • runs rake locale:find, which updates foreman.pot, generates .po and .edit.po files
    • runs tx pull, which overwrites locale/*/foreman.edit.po
    • runs rake locale:find, which merges into locale/*/foreman.po
    • runs rake locale:po_to_json, which converts foreman.po to app.js
    • git commits

#6 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 28

Needed to rebuild POT/PO files in 1.8.

#7 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 28 to 50

#8 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 50 to 56

#9 Updated by Dominic Cleal about 4 years ago

  • Legacy Backlogs Release (now unused) deleted (56)

#10 Updated by Dominic Cleal over 3 years ago

  • Blocks Bug #13033: plugin:gettext rake task doesn't load with gettext_i18n_rails_js 1.x added

#11 Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/theforeman/foreman_discovery/pull/244 added

#12 Updated by Dominic Cleal over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#13 Updated by Dominic Cleal over 3 years ago

  • Legacy Backlogs Release (now unused) set to 71

Also available in: Atom PDF