Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java @ 8114:84f42caeea2a
Reconstruct facet description of sediment load longitudinal sections. i18n will follow.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Wed, 20 Aug 2014 17:47:58 +0200 |
parents | 61dae359bb4f |
children | c200b76145ce |
comparison
equal
deleted
inserted
replaced
8113:f5c0ed04f673 | 8114:84f42caeea2a |
---|---|
129 /* Name has the pattern sedimentload.<unit>.<grainfraction_name> | 129 /* Name has the pattern sedimentload.<unit>.<grainfraction_name> |
130 * this is partly done for backwards compatibility and theming. | 130 * this is partly done for backwards compatibility and theming. |
131 * See issue 1681 for details. */ | 131 * See issue 1681 for details. */ |
132 name = NAME; | 132 name = NAME; |
133 | 133 |
134 String i18nUnit = ""; | |
135 | |
134 if (theLoad.getUnit().getName().equals("m3/a")) { | 136 if (theLoad.getUnit().getName().equals("m3/a")) { |
135 /* unit_id is NOT NULL */ | 137 /* unit_id is NOT NULL */ |
136 name += ".m3a"; | 138 name += ".m3a"; |
139 i18nUnit = "m\u00b3/a"; | |
137 } else { | 140 } else { |
138 name += ".ta"; | 141 name += ".ta"; |
142 i18nUnit = "t/a"; | |
139 } | 143 } |
140 | 144 |
141 String gfName; | 145 String gfName; |
142 if (theLoad.getGrainFraction() != null) { | 146 if (theLoad.getGrainFraction() != null) { |
143 gfName = theLoad.getGrainFraction().getName(); | 147 gfName = theLoad.getGrainFraction().getName(); |
150 | 154 |
151 description = Resources.getMsg( | 155 description = Resources.getMsg( |
152 callMeta, | 156 callMeta, |
153 "facet.sedimentload.ls." + gfName, | 157 "facet.sedimentload.ls." + gfName, |
154 "Error: please add l10n for facet.sedimentload.ls." + gfName, | 158 "Error: please add l10n for facet.sedimentload.ls." + gfName, |
155 new Object[] { desc }); | 159 new Object[] { desc, i18nUnit }); |
156 ((D4EArtifact)artifact).addStringData("load_id", idStr); | 160 ((D4EArtifact)artifact).addStringData("load_id", idStr); |
157 } | 161 } |
158 | 162 |
159 | 163 |
160 /** Copy deeply. */ | 164 /** Copy deeply. */ |