summaryrefslogtreecommitdiff
path: root/utils/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-04-12utils: use dhall substitutes for config typesdhall-substitutesstuebinm1-2/+6
this uses my own version of dhall_rust [1], which has actual support for adding in new types in rust code, which are derived via serde, instead of just gluing in extra code for every file that is read in (in particular, this results in actually useful error messages).
2021-04-08add translation logic, locales for en and destuebinm1-2/+11
This adds a basic "replace fixed keys"-approach to translating the UI of surveys. So far this works great, but for complex things it may fail for some languages — for now I'll just try to take care not to add any output that puts things in the middle of sentences, which I think should work for a simple survey thing. The default language is still english, which is important as the language is declared withing a survey config — i.e. if loading it fails, it cannot be applied, and the "enter passphrase" dialog can also not change based on locales. This could possibly be fixed by adding an unencrypted "header" to the encrypted configs, but for now I'm not sure if that makes a lot of sense — it may be easier to just guess based on the browser's settings, and otherwise fall back to some specified default language. The "thanks for your answers"-page also has no translation so far.
2021-04-05utils: change name to survey-generatestuebinm1-1/+0
2021-04-05utils: switch to asymmetric encryptionstuebinm1-6/+10
2021-04-05util: make outfile configurable (or print to stdout)stuebinm1-1/+12
2021-04-05add utility programstuebinm1-0/+103
This can be used to write configs in dhall (instead of plain json), combined with some input validation and (optionally) automatic encryption via the age rust crate.