Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Add script to import legacy pages and translations #26

Merged
merged 4 commits into from Jan 21, 2015

Conversation

jgmize
Copy link
Contributor

@jgmize jgmize commented Dec 29, 2014

Add json data from existing (legacy) site
Add django_extensions and six to requirements
Run script with './manage.py runscript create_pages'

@jgmize jgmize added the WIP label Dec 29, 2014
@jgmize
Copy link
Contributor Author

jgmize commented Dec 29, 2014

@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?

@glogiotatidis
Copy link
Contributor

@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:

@glogiotatidis
Copy link
Contributor

test this please

@jgmize jgmize force-pushed the legacy branch 2 times, most recently from f29e001 to dc1d8a2 Compare January 8, 2015 05:18
@jgmize
Copy link
Contributor Author

jgmize commented Jan 8, 2015

@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
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, got it

@glogiotatidis
Copy link
Contributor

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.

@jgmize jgmize force-pushed the legacy branch 2 times, most recently from b1414c1 to 73b0c6d Compare January 16, 2015 08:22
Add json data from existing (legacy) site
Add django_extensions and six to requirements
Run script with './manage.py runscript create_pages'
@jgmize
Copy link
Contributor Author

jgmize commented Jan 18, 2015

With the latest updates there is a single command to import pages and translations from the legacy data:
./manage.py runscript import_legacy_pages_and_translations

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.

@jgmize
Copy link
Contributor Author

jgmize commented Jan 18, 2015

test this please.

@jgmize jgmize removed the WIP label Jan 21, 2015
@jgmize jgmize changed the title Add WIP script to create legacy pages Add script to import legacy pages and translations Jan 21, 2015
@jgmize
Copy link
Contributor Author

jgmize commented Jan 21, 2015

As we discussed in the dev meeting, I'll merge this now and add acceptance tests and further refinements in future PRs.

jgmize added a commit that referenced this pull request Jan 21, 2015
Add script to import legacy pages and translations
@jgmize jgmize merged commit 8e14fb3 into mozilla:master Jan 21, 2015
@jgmize jgmize deleted the legacy branch January 21, 2015 03:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants