9.4 Guided tour
This section gives you a guided tour of Daisy's translation management features to give an idea of what can be done.
9.4.1 Completely fictional example
Alice wants to create two sites about cookies. They will have the same content, but one will be in English, the other will be in French. Because her native tongue is English she will be writing content for the English site and ask her friend Bob to translate everything in French.
Alice has already set up the Daisy repository and a Daisy Wiki. Next, she runs daisy-wiki-add-site to help her create the sites. Here is a shortened transcript of the daisy-wiki-add-site command. Alice's input is shown in bold:
alice@hive:~$ $DAISY_HOME/install/daisy-wiki-add-site-dev /home/alice/daisy/wikidata +--------------------------------------------------------------------------+ | Daisy Wiki New Site Creation | +--------------------------------------------------------------------------+ This program will create one or more new Daisy Wiki sites. This consists of: * creating a collection for the documents of the site(s) * creating one navigation document per site(s) * creating one (home) page per the site, linked from the navigation * adding the site definition(s) in the <wikidata dir>/sites directory == Login To Daisy Repository Server == Address where the Daisy Repository Server is listening [default = http://localhost:9263] : Enter login (user) and password for Daisy (this should be a user with the Administrator role): Enter login: alice Enter password: (not shown) Connecting to the repository. Choose between single- or multi-language setup. =============================================== A single-language setup consists of one collection and one site with the same name A multi-language setup consists of: * multiple languages and sites. The sites will be called <basename>-<language> * one collection (whose name is equal to the basename of your sites) Use multi-language setup? [yes/no, default: no] yes Choose a basename for your sites. ================================= Your site names will be in this format: <basename>-<language>, and the basename will be used to name the collection Enter a basename for the sites (without spaces): cookies Choose languages for your sites =============================== You can now enter one or more languages for your site. Currently defined languages are: default If you enter a non-existing names, a new language will be defined (names must start with a letter (a-z or A-Z) and can then contain letters, digits and the symbols - and _ It is recommended to use the 2-letter codes from ISO 639. A list of these codes can be found at: http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt If unsure, or when creating a mixed language site, just press enter to use the 'default' language. Enter the first language [default: default]: en Enter another language, or just hit enter to finish: fr Enter another language, or just hit enter to finish: Activate translation management ? ================================= Daisy comes with translation management features, which help you keep translated documents in sync with a reference language. Do you want to use translation management? [default: yes] yes With translation management, each document has a 'reference language' In most cases, this language is the same for all documents. If this is the case, it is useful to specify this language as the default reference language - this means that new documents will be initialised with this language as the reference language. These are the available languages: 1: en 2: fr Which language is the default reference language ([1 - 2])? 1 Setting up the site =================== Creating collection cookies Collection created. Creating sample document. (en) Sample document created, id = 281-DSY Creating navigation document. (en) Navigation document created, id = 282-DSY Updating navigation document. Navigation document updated. Creating variant for sample document. (fr) Creating variant for navigation document. (fr) Written /home/alice/daisy/wikidata/sites/cookies-en/siteconf.xml Written /home/alice/daisy/wikidata/sites/cookies-fr/siteconf.xml Finished. alice@hive:~$
Next, Alice goes to http://localhost:8888/ and she sees her two shiny new sites:
She goes to the site "cookies-en" and sees the sample home document that has been created.
Alice starts editing the home page:
(Similarly, she edits the navigation document to fit her needs).
Now Alice creates a user account for her friend Bob and asks him to start translating right away...
Bob quickly logs into Daisy. Bob goes to the translation management tool and creates an overview that tells him the home page and the navigation document need to be translated.
Bob quickly translates the home page. To indicate he has translated the second version of the English home page, he sets the "synced with" field accordingly:
(Similarly, he translates the navigation document and sets the "synced with" field.).
Now, when going back to the translation management tool, Bob would notice there are no more translations left to be done. Every now and then, Bob checks back to see if there is content to be translated.