Add script to import legacy pages and translations #26
Conversation
@glogiotatidis would you mind taking a look at the Jenkins console output from the failed build and see if you can figure out the devicemapper error we're getting? |
@jgmize there is a docker / fig race condition going on. afaik this is unsolved. Best work around atm is to retrigger the tests by saying: |
test this please |
f29e001
to
dc1d8a2
Compare
@glogiotatidis there's still a little more work to do on this, but with the code in the latest update I've successfully converted the german translation from the legacy json to a po file: https://github.com/mozilla/masterfirefoxos-l10n/blob/master/de/LC_MESSAGES/django.po |
@@ -41,7 +41,7 @@ Python and HTML files are automatically handled by django's | |||
into a text file be parsable by `makemessages` command. To extract the | |||
database strings run:: | |||
|
|||
./manage.py cron extract_database_strings | |||
./manage.py runscript db_strings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that should be ./manage.py db_strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, got it
I think we need a fixture with the generated Pages to load it on dev and prod. Direct commits to locale directory with db-strings will be overwritten by dev's empty database. |
b1414c1
to
73b0c6d
Compare
Add json data from existing (legacy) site Add django_extensions and six to requirements Run script with './manage.py runscript create_pages'
With the latest updates there is a single command to import pages and translations from the legacy data: Please test this locally, and I'll work on some acceptance tests text. I believe we should be able to run this command in dev and prod to address the empty db issue. |
test this please. |
As we discussed in the dev meeting, I'll merge this now and add acceptance tests and further refinements in future PRs. |
Add script to import legacy pages and translations
Add json data from existing (legacy) site
Add django_extensions and six to requirements
Run script with './manage.py runscript create_pages'