From 936198372e19d8cf7b6c121be099ad27c4de03e2 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Sat, 8 Sep 2018 16:24:12 +0200 Subject: [PATCH] translate CoNS --- R/mo_property.R | 8 ++++++++ tests/testthat/test-mo_property.R | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/R/mo_property.R b/R/mo_property.R index 333168bf..408f3e34 100644 --- a/R/mo_property.R +++ b/R/mo_property.R @@ -222,6 +222,8 @@ mo_translate <- function(x, language) { case_when( # German language == "de" ~ x %>% + gsub("Coagulase Negative Staphylococcus","Koagulase-negative Staphylococcus", ., fixed = TRUE) %>% + gsub("Coagulase Positive Staphylococcus","Koagulase-positive Staphylococcus", ., fixed = TRUE) %>% gsub("(no MO)", "(kein MO)", ., fixed = TRUE) %>% gsub("Negative rods", "Negative St\u00e4bchen", ., fixed = TRUE) %>% gsub("Negative cocci", "Negative Kokken", ., fixed = TRUE) %>% @@ -240,6 +242,8 @@ mo_translate <- function(x, language) { # Dutch language == "nl" ~ x %>% + gsub("Coagulase Negative Staphylococcus","Coagulase-negatieve Staphylococcus", ., fixed = TRUE) %>% + gsub("Coagulase Positive Staphylococcus","Coagulase-positieve Staphylococcus", ., fixed = TRUE) %>% gsub("(no MO)", "(geen MO)", ., fixed = TRUE) %>% gsub("Negative rods", "Negatieve staven", ., fixed = TRUE) %>% gsub("Negative cocci", "Negatieve kokken", ., fixed = TRUE) %>% @@ -258,6 +262,8 @@ mo_translate <- function(x, language) { # Spanish language == "es" ~ x %>% + gsub("Coagulase Negative Staphylococcus","Staphylococcus coagulasa negativo", ., fixed = TRUE) %>% + gsub("Coagulase Positive Staphylococcus","Staphylococcus coagulasa positivo", ., fixed = TRUE) %>% gsub("(no MO)", "(sin MO)", ., fixed = TRUE) %>% gsub("Negative rods", "Bacilos negativos", ., fixed = TRUE) %>% gsub("Negative cocci", "Cocos negativos", ., fixed = TRUE) %>% @@ -276,6 +282,8 @@ mo_translate <- function(x, language) { # Portuguese language == "pt" ~ x %>% + gsub("Coagulase Negative Staphylococcus","Staphylococcus coagulase negativo", ., fixed = TRUE) %>% + gsub("Coagulase Positive Staphylococcus","Staphylococcus coagulase positivo", ., fixed = TRUE) %>% gsub("(no MO)", "(sem MO)", ., fixed = TRUE) %>% gsub("Negative rods", "Bacilos negativos", ., fixed = TRUE) %>% gsub("Negative cocci", "Cocos negativos", ., fixed = TRUE) %>% diff --git a/tests/testthat/test-mo_property.R b/tests/testthat/test-mo_property.R index 545dd23d..08209c4c 100644 --- a/tests/testthat/test-mo_property.R +++ b/tests/testthat/test-mo_property.R @@ -17,7 +17,6 @@ test_that("mo_property works", { expect_equal(mo_shortname("S. aga", Lancefield = TRUE), "GBS") expect_equal(mo_type("E. coli", language = "de"), "Bakterium") - expect_equal(mo_gramstain("E. coli", language = "de"), "Negative St\u00e4bchen") expect_equal(mo_type("E. coli", language = "nl"), "Bacterie") expect_equal(mo_gramstain("E. coli", language = "nl"), "Negatieve staven")