*Deprecated* This material is for historical purposes only See https://wiki.duraspace.org/display/VIVODOC/All+Documentation for current documentation
*Deprecated* See https://wiki.duraspace.org/display/VIVODOC/All+Documentation for current documentation
Here are some examples of the process I use to keep the es_GO files current
Vitro/webapp/languages/es_GO/i18n/all_es_GO.properties
Got to the property utilities directory
cd git/VIVO/utilities/languageSupport/translateValuesInPropertyFile
reads the properties file, sorts by key, then prints the values, one per line
ruby property_stripper.rb ../../../../Vitro/webapp/web/i18n/all.properties vitro_all.props
write the new file in the form of the old one.
ruby property_inserter.rb ../../../../Vitro/webapp/web/i18n/all.properties vitro_all_es.props ../../../../Vitro/webapp/languages/es_GO/i18n/all_es_GO.properties vitro_all_es_GO.properties
Copy the new translation file to overwrite the previous one.
cp vitro_all_es_GO.properties ../../../../Vitro/webapp/languages/es_GO/i18n/all_es_GO.properties
This assumes that the only changes are additions, not deletions or modifications. It would be nice to do a diff between the previous and the current english-language files, so we can see what properties have been deleted or modified. Then, we would delete those from the old translation file before using it as an override. This means that the new translation would affect deletions and modifications also.
cd git/VIVO/utilities/languageSupport/translateValuesInPropertyFile ruby property_stripper.rb ../../../themes/wilma/i18n/all.properties wilma.props
translate...
ruby property_inserter.rb ../../../themes/wilma/i18n/all.properties wilma.props ../../../languages/es_GO/themes/wilma/i18n/all_es_GO.properties wilma_es_GO.properties cp wilma_es_GO.properties ../../../languages/es_GO/themes/wilma/i18n/all_es_GO.properties
VIVO/languages/es_GO//rdf/display/everytime/PropertyConfig_es_GO.n3
Not as polished as the scripts for properties files. There is no way to do an incremental translation. All the script will do is to replace the entire file.
cd git/VIVO/utilities/languageSupport/translateDisplayNames ruby display_name_stripper.rb ../../../rdf/display/everytime/PropertyConfig.n3 displayNames_en_US
translate displayNames_en_US
and save as displayNames_es_GO
(the names are not significant)
ruby display_name_inserter.rb ../../../rdf/display/everytime/PropertyConfig.n3 displayNames_es_GO es-GO PropertyConfig_es_GO.n3 cp PropertyConfig_es_GO.n3 ../../../languages/es_GO/rdf/display/everytime/PropertyConfig_es_GO.n3
VIVO/languages/es_GO//rdf/tbox/firsttime/initialTBoxAnnotations_es_GO.n3
As with DisplayNames, these scripts do not allow an incremental translation. As they stand now, a nicely curated file would be completely overwritten by its update.
cd git/VIVO/utilities/languageSupport/translateLabelsInOntology ruby label_stripper.rb ../../../rdf/tbox/firsttime/initialTBoxAnnotations.n3 vivo_core_filter labels_en_US ruby label_inserter.rb ../../../rdf/tbox/firsttime/initialTBoxAnnotations.n3 labels_es_GO es-GO vivo_core_filter initialTBoxAnnotations_es_GO.n3 cp initialTBoxAnnotations_es_GO.n3 ../../../languages/es_GO/rdf/tbox/firsttime/initialTBoxAnnotations_es_GO.n3
translate labels_en_US
, save as labels_es_GO
cd git/VIVO/utilities/languageSupport/translateLabelsInOntology ruby label_stripper.rb ../../../rdf/tbox/firsttime/initialTBoxAnnotations.n3 vivo_core_filter labels_en_US ruby label_inserter.rb ../../../rdf/tbox/firsttime/initialTBoxAnnotations.n3 labels_es_GO es-GO vivo_core_filter initialTBoxAnnotations_es_GO.n3 cp initialTBoxAnnotations_es_GO.n3 ../../../languages/es_GO/rdf/tbox/firsttime/initialTBoxAnnotations_es_GO.n3