Skip to content

Commit

Permalink
chore: reput "other" case properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jy95 committed Jan 3, 2025
1 parent 76ea5ad commit 1192737
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static CompletableFuture<String> convertWithoutUnit(ResourceBundle bundl
MessageFormat messageFormat = new MessageFormat(msg, config.getLocale());

// Determine the condition
String condition = (hasLow && hasHigh) ? "0" : (hasHigh ? "1" : "2");
String condition = (hasLow && hasHigh) ? "0" : (hasHigh) ? "1" : (hasLow) ? "2" : "other";

// Create a map for the named arguments
Map<String, Object> arguments = Map.of(
Expand All @@ -73,7 +73,7 @@ private static CompletableFuture<String> convertWithUnit(ResourceBundle bundle,
: enhancedFromFHIRQuantityUnitToString(bundle, config, range.getLow());

// Determine the condition
String condition = (hasLow && hasHigh) ? "0" : (hasHigh ? "1" : "2");
String condition = (hasLow && hasHigh) ? "0" : (hasHigh) ? "1" : (hasLow) ? "2" : "other";

return unitRetrieval
.thenApplyAsync(unitAsText -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public CompletableFuture<String> convert(Dosage dosage) {
MessageFormat messageFormat = new MessageFormat(msg, this.getConfig().getLocale());

// Choose the correct condition based on the presence of start and end dates
String condition = hasStart && hasEnd ? "0" : (hasStart ? "1" : "2");
String condition = hasStart && hasEnd ? "0" : (hasStart ? "1" : "other");

// Create a map of named arguments
Map<String, Object> arguments = Map.of(
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/common_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fields.asNeeded = bei Bedarf
fields.asNeededFor = bei Bedarf für {reason}

fields.boundsDuration = für {duration}
fields.boundsPeriod = {condition, select, 0{von {startDate} bis {endDate}} 1{ab {startDate}} 2{bis {endDate}} }
fields.boundsPeriod = {condition, select, 0{von {startDate} bis {endDate}} 1{ab {startDate}} other{bis {endDate}} }

fields.boundsRange = für {range}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/common_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fields.asNeeded = as required
fields.asNeededFor = as required for {reason}

fields.boundsDuration = for {duration}
fields.boundsPeriod = {condition, select, 0{from {startDate} to {endDate}} 1{from {startDate}} 2{to {endDate}} }
fields.boundsPeriod = {condition, select, 0{from {startDate} to {endDate}} 1{from {startDate}} other{to {endDate}} }

fields.boundsRange = for {range}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/common_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fields.asNeeded = si n
fields.asNeededFor = si nécessaire pour {reason}

fields.boundsDuration = pour {duration}
fields.boundsPeriod = {condition, select, 0{du {startDate} au {endDate}} 1{à partir du {startDate}} 2{jusqu\u2019au {endDate}} }
fields.boundsPeriod = {condition, select, 0{du {startDate} au {endDate}} 1{à partir du {startDate}} other{jusqu\u2019au {endDate}} }

fields.boundsRange = pour {range}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/common_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fields.asNeeded = indien nodig
fields.asNeededFor = zoals nodig voor {reason}

fields.boundsDuration = gedurende {duration}
fields.boundsPeriod = {condition, select, 0{van {startDate} tot {endDate}} 1{van {startDate}} 2{tot {endDate}} }
fields.boundsPeriod = {condition, select, 0{van {startDate} tot {endDate}} 1{van {startDate}} other{tot {endDate}} }

fields.boundsRange = gedurende {range}

Expand Down

0 comments on commit 1192737

Please sign in to comment.