Mercurial > dive4elements > river
changeset 7881:f9e3ef5d38d0
Use description from database for i18n (completed revision dc8910e29dd4).
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 16 May 2014 13:17:29 +0200 |
parents | a575eaae7899 |
children | 4534659e200e |
files | artifacts/doc/conf/meta-data.xml artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml Fri May 16 13:14:52 2014 +0200 +++ b/artifacts/doc/conf/meta-data.xml Fri May 16 13:17:29 2014 +0200 @@ -1348,7 +1348,7 @@ factory="porosity" target_out="{$out}" info="{$description}" - ids="{$pid}" /> + ids="{$pid};{$description}" /> </dc:for-each> </dc:if> </dc:context>
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java Fri May 16 13:14:52 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java Fri May 16 13:17:29 2014 +0200 @@ -76,14 +76,22 @@ String code = D4EArtifact.getDatacageIDValue(data); + String[] split = code.split(";"); + String id = split[0]; + String desc = ""; + if (split.length >= 2) { + desc = split[1]; + } + if (code != null) { this.name = NAME; this.description = Resources.getMsg( callMeta, "facet.porosity", - "Porosity"); + "Porosity", + new Object[] { desc }); D4EArtifact d4e = (D4EArtifact) artifact; - d4e.addStringData("porosity_id", code); + d4e.addStringData("porosity_id", id); } } }