Open leokim-l opened 2 months ago
@leokim-l Sorry, I have overseen this mention. Here would be a translation. Shall I ask Zafer to check this?
public String atAgeForVignette(PhenopacketAge ppktAge) {
if (ppktAge.ageType().equals(PhenopacketAgeType.ISO8601_AGE_TYPE)) {
return "Yaşında " + atIsoAgeExact(ppktAge);
} else if (ppktAge.ageType().equals(PhenopacketAgeType.HPO_ONSET_AGE_TYPE)) {
if (ppktAge.isFetus()) {
return "Fetal dönemde";
} else if (ppktAge.isCongenital()) {
return "Doğumda";
} else if (ppktAge.isEmbryo()) {
return "Embriyonik dönemde";
} else if (ppktAge.isNeonate()) {
return "Yenidoğan döneminde";
} else if (ppktAge.isInfant()) {
return "Bebeklik döneminde";
} else if (ppktAge.isChild()) {
return "Çocukken";
} else if (ppktAge.isJuvenile()) {
return "Ergenlik döneminde";
} else if (ppktAge.isYoungAdult()) {
return "Genç yetişkinken";
} else if (ppktAge.isMiddleAge()) {
return "Orta yaşta";
} else if (ppktAge.isLateAdultAge()) {
return "Geç yetişkinlik döneminde";
} else if (ppktAge.isAdult()) {
return "Yetişkinlikte";
} else {
throw new PhenolRuntimeException("Tanımlanamayan başlangıç: " + ppktAge.toString());
}
} else {
throw new PhenolRuntimeException("Geçersiz yaş türü");
}
}
is there anything else I can help with?
@gracsh @aslgraefe Looking at its current structure, probably the easiest thing would be to follow the Italian structure below (i.e. do exactly the same as below, just translating the terms). In this way, we should get rid of all those errors such as (identical for Chinese and Turkish)
[ERROR] Could not process PMID_36932076_Patient_3_zh-prompt.txt: No Chinese translation for Antenatal onset [ERROR] Could not process PMID_30791088_female_zh-prompt.txt: No Chinese translation for Second trimester onset
https://github.com/monarch-initiative/phenopacket2prompt/blob/e495f5a6b163b3e924ce8602bedfb7ac5f40a31c/src/main/java/org/monarchinitiative/phenopacket2prompt/output/impl/italian/PpktIndividualItalian.java#L287-L319
As a matter of fact, thanks to
https://github.com/monarch-initiative/phenopacket2prompt/blob/7ab8655e00a769b883b284dfe80e64b521c3c8a6/src/main/java/org/monarchinitiative/phenopacket2prompt/model/HpoOnsetAge.java#L29
and
https://github.com/monarch-initiative/phenopacket2prompt/blob/7ab8655e00a769b883b284dfe80e64b521c3c8a6/src/main/java/org/monarchinitiative/phenopacket2prompt/model/HpoOnsetAge.java#L136-L139
we are not really using these specific onset terms, rather an umbrella (parent) term. The same applies to the very granular adulthood terms, all likewise collected in
https://github.com/monarch-initiative/phenopacket2prompt/blob/7ab8655e00a769b883b284dfe80e64b521c3c8a6/src/main/java/org/monarchinitiative/phenopacket2prompt/model/HpoOnsetAge.java#L66