diff --git a/.gitattributes b/.gitattributes index 9656b8609c..9784838523 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,3 +18,4 @@ /frontend_tests export-ignore /node_modules export-ignore /humbug export-ignore +/locale export-ignore diff --git a/README.dev.md b/README.dev.md index 5965fdc533..3a372b0253 100644 --- a/README.dev.md +++ b/README.dev.md @@ -341,6 +341,7 @@ if [ $(uname) = "OpenBSD" ]; then sudo cp ./puppet/zulip/files/postgresql/zulip_ ./tools/do-destroy-rebuild-database ./tools/postgres-init-test-db ./tools/do-destroy-rebuild-test-database +./manage.py compilemessages npm install ``` diff --git a/provision.py b/provision.py index 118a17d810..4666735000 100644 --- a/provision.py +++ b/provision.py @@ -185,6 +185,7 @@ def main(): run(["tools/do-destroy-rebuild-database"]) run(["tools/postgres-init-test-db"]) run(["tools/do-destroy-rebuild-test-database"]) + run(["python", "./manage.py", "compilemessages"]) # Install the latest npm. run(["sudo", "npm", "install", "-g", "npm"]) # Run npm install last because it can be flaky, and that way one diff --git a/tools/build-release-tarball b/tools/build-release-tarball index c1877afd2f..695c5f1f56 100755 --- a/tools/build-release-tarball +++ b/tools/build-release-tarball @@ -83,7 +83,7 @@ find prod-static/serve/third/gemoji/images/emoji/ -regex '.*\.[0-9a-f]+\.png' -d cd "$TMPDIR" -tar --append -f "$TARBALL" "$prefix/prod-static" "$prefix/build_id" "$prefix/version" +tar --append -f "$TARBALL" "$prefix/prod-static" "$prefix/build_id" "$prefix/version" "$prefix/locale" rm -rf "$prefix" diff --git a/tools/update-prod-static b/tools/update-prod-static index 0e990db901..3e71a94c00 100755 --- a/tools/update-prod-static +++ b/tools/update-prod-static @@ -45,6 +45,10 @@ subprocess.check_call(['bash', '-ex', 'tools/download-zxcvbn'], subprocess.check_call(['python', './manage.py', 'collectstatic', '--noinput'], stdout=fp, stderr=fp) +# Compile translation strings to generate `.mo` files. +subprocess.check_call(['python', './manage.py', 'compilemessages'], + stdout=fp, stderr=fp) + # Move the source maps out of the serve/ directory and into their # proper place. subprocess.check_call(['rm', '-rf', 'prod-static/source-map'],