...
Step 4) Editing the problematics files
4-1 Property, theme and other generic files
several directory structures and files need to be set up to initialize the implementation of the linguistic context in VIVO.
Step | Action |
---|
1) Create directory structures in Vitro-languages and VIVO-languages The demonstration is for the integration of the French Canadian fr_CA in Vitro-languages and VIVO-Languages |
Code Block |
---|
language | bash |
---|
title | Preparing Vitro-languages |
---|
| cd $GIT_REPO/Vitro-languages
mkdir -p fr_CA/webapp/src/main/webapp/i18n
cp en_US/webapp/src/main/webapp/i18n/all_en_US.properties fr_CA/webapp/src/main/webapp/i18n/all_fr_CA.properties |
Code Block |
---|
language | bash |
---|
title | Preparing VIVO-languages |
---|
| cd $GIT_REPO/VIVO-languages
mkdir -p fr_CA/webapp/src/main/webapp/i18n
cp en_US/webapp/src/main/webapp/i18n/all_en_US.properties fr_CA/webapp/src/main/webapp/i18n/all_fr_CA.properties |
|
2) Translate the content of each properties file ('all_en_CA.properties' 'all_en_CA.properties') into the target language (here, the en_CA) |
Code Block |
---|
title | Canadian French Translation example |
---|
| save_changes=Sauvegarder
save_entry=Sauvegarder
select_existing=Choisir l'enregistrement existant
select_an_existing=Choisir un enregistrement existant
add_an_entry_to=Ajouter un enregistrement de type
change_entry_for=Modifier l'enregistrement pour:
add_new_entry_for=Ajouter un enregistrement pour:
change_text_for=Changement du texte pour:
cancel_link = Annuler
cancel_title = annuler
required_fields = champs requis |
|
3) Creating themes Copy and adapt the themes from en_US to en_CA for VIVO-Languages Translate each file of type en_US in the fr_CA/.../themes directory - translate the content into the target language
- rename the file extension xxx_en_US.xxx with the extension of the target language (e.g. xxx_en_CA.xxx)
|
Code Block |
---|
mkdir -p VIVO-languages/fr_CA/webapp/src/main/webapp/themes/
cp -r VIVO-languages/en_US/webapp/src/main/webapp/themes/* VIVO-languages/fr_CA/webapp/src/main/webapp/themes/ |
|
4) Creating assembly files the 'home.xml' file is necessary to ensure a viable compilation of the language files. Only VIVO-languages contains the home directory. |
Code Block |
---|
mkdir -p VIVO-languages/fr_CA/home/src/main/assembly/
cp VIVO-languages/en_US/home/src/main/assembly/home.xml VIVO-languages/fr_CA/home/src/main/assembly/ |
|
4-2 POM files for compilation
Step 5) If necessary reset the various VIVO's indexes and databases
...