Translate a WISEflow JSON import file from one language to another.
Source:R/translate.R
translate_json.RdWISEflow's JSON format is a nested list describing the frontpage, sections,
question types, question (stimulus) texts, answer options etc.
This function walks the list and passes the contents of each
stimulus, label, content, title and page_content node to the
Apertium API for translation.
Arguments
- jsonfile
Path to WISEflow JSON import file, e.g. from knitting an examiner quiz to
examiner::wiseflowformat.- langpair
Source|target language pair; one of those returned by
examiner:::list_pairs(). Example: "nob|nno_e".- outfile
Name of output file for the translated JSON file. Defaults to suffixing basename with the target language code. For example, converting
wiseflow_import.jsontonno_ewould yieldwiseflow_import_nno_e.json.
Details
Apertium tries to leave HTML tags and math alone, but may on rare occasions
mess up inlined CSS. For example, a style= attribute might become styla=
if translating to Norwegian nynorsk with "-a" verb endings.
A good way to check for such technical glitches is to view the translated
JSON file side-by-side with the original, using a line-oriented diff tool
like WinMerge,
KDiff3 or
Meld.
Once you spot a mistranslation, Find/Replace helps find all instances of a bug.
The WISEflow import page is https://europe.wiseflow.net/author/assignments/import-status
If you are not already logged in, WISEflow will have you log in, then forget where you were going. Just follow the link again.
Or, first log in to WISEflow, then click the "Authoring" tab, click "Go to assignments", click the gear icon (for "Manage assignments") near "New assignment", click "Import assignments".
Once on the "Assignment import status" page, click "Import", click "Select file type", click "WISEflow", click "Select file", select your file and click "Open", click "Preview file content". This brings you to the "Assignment Import" page; click "Import" at upper right, then click "Confirm".
This puts you back at the "Assignment import status" page, with a new top row for your current import. Once it says "Complete (100%)", click anywhere on the row, then click "Open item in assignments" at the right of the row.
You will now be at the imported assignment's page. Clicking the eye icon at upper right gives two options:
Preview assignment: Fails to show you the front page, but will show score at bottom.
Preview as participant: Shows front page, but not score.