i18n Angular index.html does not link to appropriate subfolder
Bug #2032430 reported by
Blake GH
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Installing Evergreen with different language support revealed an issue with Angular. This command:
ng build --configuration
does build the cs-CZ folder as well as the en-US folder. Found in:
../../web/eg2
But the index.html file includes lines like this:
<script src="/eg2/
Lacking the locale (cs-CZ) - Evergreen will default to whatever the RewriteRule line is configured for:
RewriteRule ^/eg2/(.*) https:/
Therefore, the Angular interfaces will still show en-US, even when the URL on the browser is
/eg2/cs-
tags: | added: install-upgrade |
tags: | added: i18n |
Changed in evergreen: | |
status: | New → Confirmed |
To post a comment you must log in.
Here's a work in progress branch:
https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ berick/ lp2032430- ang-locale- build-repairs
It tweaks the angular.json config file to better handle the install location for locales.
It also includes cs-CZ in the environment files, but that's just for testing this branch. We probably don't want to include those by default (though I'm not sure on that).
How I got it working:
--- =production
$ ng build --configuration
# Tell cs-CZ's index.html to load the cs-CZ version of the IDL. var/web/ opac/locale/ cs-CZ/fm_ IDL.dtd
# This part only works if the cs-CZ DTD file has been created
# (with make LOCALE=cs-CZ install) and deployed at
# /openils/
$ sed -i s/IDL2js\ "/IDL2js? locale= cs-CZ\" /g ../../web/ eg2/cs- CZ/index. html
---
Some notes:
1. building in non-production mode does not create the cs-CZ translations. Not sure why.
2. The cs-CZ UI is funky in places. Some strings are just missing, i.e. no fallback en-US translation. Not sure what this is about either.