Nationalizationsync
Description
Nationalizationsync is an utility program: provided a modified JSON nationalization, it propagates the new categorical information to other nationalizations using LangLinks.
How to use it?
-
Choose a working dir: this will contain all seed nationalizations, aka the nationalization from which all the others will be derived using LangLinks. This folder should contain your modified JSON and all the other that in the past were manually modified, as of now: en.json
, es.json
, fr.json
, it.json
, pt.json
and zh.json
.
-
Run Nationalizationsync on your working dir: docker run -d -v /path/2/work/dir:/data negapedia/wikiassignment nationalizationsync
. Eventually check progress with docker logs -f $(docker ps -lq)
. At the end, after some hours, this folder will contain all newly regenerated nationalizations, double check logs and results.
-
Install golang and set it properly, or later commands will fail.
-
Install (or update) go-bindata: go get -u github.com/shuLhan/go-bindata/...
and check that it works (go-bindata --help
).
-
Install (or update) wikiassignment: go get -u github.com/negapedia/wikiassignment/
.
-
Find the installation folder and change the working directory into it: cd /path/2/your/wikiassignment/
.
-
Remove previous nationalizations in your local languages folder: rm nationalization/internal/languages/*
.
-
Add the new nationalizations, generated from step 2
: mv /path/2/work/dir/* nationalization/internal/languages/
.
-
Change directory into nationalization/internal
: cd nationalization/internal/
.
-
Regenerate golang assets from JSON nationalizations: go generate
.
-
Include in the git versioning possible new files: git add -A
.
-
Commit the changes: for ex. git commit -am "Updated pl nationalization, additional sync seeds: en, es, fr, it, pt and zh"
.
-
Set wikiassignment remote repository: git remote set-url origin git@github.com:negapedia/wikiassignment.git
.
-
Push the changes: git push
.
-
Double check the diff of the changes on Github.
-
Being logged in docker hub, manually trigger a new build for the refresh image, takes a little more than one hour.
-
Rejoice. ;)