Skip to content

Commit

Permalink
csasdown::fr()
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Dec 7, 2023
1 parent be1d398 commit 118206a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/inject-bilingual-code.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,23 +124,23 @@ inject_bilingual_code <- function(fn = get_index_filename(
if(doc_type %in% c("techreport","manureport")){
yaml_code <- c(
'---',
'title: `r ifelse(fr(), meta$french_title, meta$title)`',
'region: `r ifelse(fr(), meta$french_region, meta$region)`',
'title: `r ifelse(csasdown::fr(), meta$french_title, meta$title)`',
'region: `r ifelse(csasdown::fr(), meta$french_region, meta$region)`',
'csl: `r csl`',
'---')
} else if (doc_type == "sr") { # no title language flipping
yaml_code <- c(
'---',
'month: `r ifelse(fr(), meta$french_month, meta$month)`',
'region: `r ifelse(fr(), meta$french_region, meta$region)`',
'month: `r ifelse(csasdown::fr(), meta$french_month, meta$month)`',
'region: `r ifelse(csasdown::fr(), meta$french_region, meta$region)`',
'csl: `r csl`',
'---')
} else {
yaml_code <- c(
'---',
'title: `r ifelse(fr(), meta$french_title, meta$title)`',
'month: `r ifelse(fr(), meta$french_month, meta$month)`',
'region: `r ifelse(fr(), meta$french_region, meta$region)`',
'title: `r ifelse(csasdown::fr(), meta$french_title, meta$title)`',
'month: `r ifelse(csasdown::fr(), meta$french_month, meta$month)`',
'region: `r ifelse(csasdown::fr(), meta$french_region, meta$region)`',
'csl: `r csl`',
'---')
}
Expand Down

0 comments on commit 118206a

Please sign in to comment.