Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Election export and import as a draft from a json file #79

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mjal
Copy link

@mjal mjal commented Oct 20, 2023

This PR address issue #65.

It adds a new tab to export an election (or a draft) as json.
The election will be transformed to the draft format.

image

The file containing the election as json can then be imported to create a new draft with all the necessary informations.

image

@glondu
Copy link
Owner

glondu commented Oct 24, 2023

Thank you for your efforts.

  1. "Export the election" would be better
  2. It would be better to offer a file download. Copy-pasting can be error-prone in some contexts.
  3. Conversely, an "Import an election" button that offers a file upload could work.
  4. Beware that the format is not the same for draft and validated elections.

@mjal mjal force-pushed the mjal/election_export_import branch 6 times, most recently from 1aafe98 to 4c3672d Compare November 23, 2023 15:43
@mjal mjal changed the title WIP: Election export and import into a text file like .json Election export and import as .json file Nov 23, 2023
@mjal mjal changed the title Election export and import as .json file Election export and import as a draft from a json file Nov 23, 2023
@mjal mjal force-pushed the mjal/election_export_import branch 3 times, most recently from f77bdcf to d75fe13 Compare November 26, 2023 23:13
@@ -19,6 +19,7 @@
(* <http://www.gnu.org/licenses/>. *)
(**************************************************************************)

open Js_of_ocaml
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be unfortunate to include this here but allows to declare read_full below.

@mjal
Copy link
Author

mjal commented Nov 26, 2023

This PR is ready.

@mjal mjal force-pushed the mjal/election_export_import branch from d75fe13 to 6e96fd6 Compare November 26, 2023 23:53
@glondu
Copy link
Owner

glondu commented Nov 27, 2023

A first global comment: we use ocamlformat to enforce a coherent coding style. Please install it in your OPAM switch, and run dune fmt so that the style is applied everywhere.

@mjal
Copy link
Author

mjal commented Nov 27, 2023

Ok!

How i18n works ? It seems that Belenios uses Weblate to manage translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants