Swisspost 460d0e0780 sVote source code publication | 5 years ago | |
---|---|---|
.. | ||
assembly | 5 years ago | |
fixtures | 5 years ago | |
po | 5 years ago | |
src | 5 years ago | |
test | 5 years ago | |
.gitignore | 5 years ago | |
LICENSE | 5 years ago | |
Makefile | 5 years ago | |
README.md | 5 years ago | |
THIRD-PARTY.bower.txt | 5 years ago | |
THIRD-PARTY.npm.txt | 5 years ago | |
gruntfile.js | 5 years ago | |
package-lock.json | 5 years ago | |
package.json | 5 years ago | |
pom.xml | 5 years ago |
nwjs (node-webkit) desktop app acting as a frontend for OV configuration. It works with the Secure Data Manager REST service, which you can grab from: https://scm.scytl.net/stash/projects/PROJ/repos/20120073-ov-secure-data-manager
The following resources from ov-secure-data-manager need to be in your user home directory:
On startup the app will automatically launch the local REST service.
grunt app
will build the platform executables. You will find them in the _desktopapp folder
A mock backend server is PARTIALLY implemented. To use it you need to edit src/app/services/endpoints.js and ensure that the relative version of the host config value is used, like so:
host : '/sdm-ws-rest/',
// host: 'http://localhost:8090/sdm-ws-rest/',
Then just run
$ grunt dev
and point your browser to http://localhost:3000/
grunt app
to build the development version.java -jar <userhome>/sdm-ws-rest.jar
to manually start the servergrunt release
(or just grunt
)will build all platform executables and bundle them in a zip file in the 'dist' folder.
Note that as of 19/01/2016 english is no longer the base language, although the literal text in the code is unchanged. English ('en') is now another language just like any other, meaning it has it's own translation file and you can now change translated english text without disrupting the other translations. Please don't modify any source literals.
The i18n service (in src/service) configures available languages like so. This is the single point of language configuration.
angular.module('i18n', [])
.constant('i18n', {
languages: [{
code: 'fr',
shortname: 'FR',
name: 'Francais'
}, {
code: 'de',
shortname: 'DE',
name: 'Deutsch'
}, {
code: 'en',
shortname: 'EN',
name: 'English'
}],
default: 'en'
});
The default language will be automatically selected on app startup.
To add a new language just add an entry to i18n and make sure the default is ok.
Then of course you need to create a new catalog (po file) from the template (pot file) and add translations to it. Next run `grunt nggettext_compile'.
After you added/changed text to be translated, run grunt
nggettext_extract' to update the template ( _pot_ file), then use your
favorite _poeditor_ to add/edit translations to the _po_ files, and
finally run
grunt nggettext_compile' to convert the po files into
the JSON files in 'assets/lang' used by the app.