=== OPTIONAL: Building for an alternate locale
* Using fr-CA as an example.
-* An fr-CA configuration is supplied by default.
+* An fr-CA configuration is supplied by default. Additional configs
+ must be added where needed.
* Currently translation builds are only available on --prod build mode.
* Uncomment the locale lines in eg_vhost.conf and restart apache.
[source,sh]
---------------------------------------------------------------------
-npm run build-translations
-# Modify some <target> entries in src/locale/messages.fr-CA.xlf to test
-ng build --configuration=production-fr-CA --output-path ../../web/eg2/fr-CA --deploy-url /eg2/fr-CA/ --base-href /eg2/fr-CA
----------------------------------------------------------------------
-
-* Currently, the IDL import has to be manually modified in
- ../../web/eg2/fr-CA/index.html like so:
-* TODO: create a script to do this and modify the "lang" attribute
- for alt locales.
-
-[source,html]
----------------------------------------------------------------------
-<script src="/js/dojo/opensrf/JSON_v1.js?locale=fr-CA"></script>
+npm run export-strings
+npm run merge-strings -- fr-CA
+# APPLY TRANSLATIONS TO src/locale/messages.fr-CA.xlf
+npm run build-fr-CA
---------------------------------------------------------------------
=== Deploy
"lint": "ng lint",
"e2e": "ng e2e",
"create-mock-idl": "cd src/test_data && perl idl2js.pl",
- "build-translations": "ng xi18n --output-path locale && xliffmerge fr-CA"
+ "export-strings": "ng xi18n --output-path locale",
+ "merge-strings": "xliffmerge",
+ "build-fr-CA": "ng build --configuration=production-fr-CA --output-path ../../web/eg2/fr-CA --deploy-url /eg2/fr-CA/ --base-href /eg2/fr-CA; sed -i s/IDL2js\\\"/IDL2js?locale=fr-CA\\\"/g ../../web/eg2/fr-CA/index.html; sed -i s/lang=\\\"en\\\"/lang=\\\"fr\\\"/g ../../web/eg2/fr-CA/index.html"
},
"private": true,
"dependencies": {