Swisspost 460d0e0780 sVote source code publication | hace 5 años | |
---|---|---|
.. | ||
assembly | hace 5 años | |
fixtures | hace 5 años | |
po | hace 5 años | |
src | hace 5 años | |
test | hace 5 años | |
.gitignore | hace 5 años | |
LICENSE | hace 5 años | |
Makefile | hace 5 años | |
README.md | hace 5 años | |
THIRD-PARTY.bower.txt | hace 5 años | |
THIRD-PARTY.npm.txt | hace 5 años | |
gruntfile.js | hace 5 años | |
package-lock.json | hace 5 años | |
package.json | hace 5 años | |
pom.xml | hace 5 años |
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.