forked from obophenotype/hpo-translations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (31 loc) · 1014 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
##### Process translations
install:
pip install -U babelon
###
prepare_data:
rm -rf crowdin_data/
unzip -d crowdin_data/ all_translations.zip
babelon/hp-%.babelon.tsv:
mkdir -p babelon/
babelon parse crowdin_data/$*/hpo_notes.xliff -o $@
LANGUAGES=cs nl tr
HP_TRANSLATIONS=$(patsubst %, babelon/hp-%.babelon.tsv, $(LANGUAGES))
# Recipe: Go to https://crowdin.com/project/hpo-translation/translations# and click "Build and Download"
# Safe the downloaded file as tests/data/all_translations.zip
# Run "make prepare_data" to unpack the translations
# Run "make languages" to process them
# Copy the results into hpo/src/ontology/translations
translations: $(HP_TRANSLATIONS)
.PHONY: help
help:
@echo "$$data"
define data
Usage: make command
----------------------------------------
Command reference
----------------------------------------
Core commands:
* prepare_data: Unpack XLIFF files from ZIP container
* translations: Compute all Babelon translations from the XLIFF files
endef
export data