Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions vignettes/_translation_links.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
# idea is to look like 'Other languages: en | fr | de'
.write.translation.links = function(fmt) {
url = "https://rdatatable.gitlab.io/data.table/articles"
path = dirname(litedown::get_context("input"))
if (basename(path) == "vignettes") {
context = litedown::get_context("input")
path = dirname(context)
if (basename(path) %in% c(".", "vignettes")) {
lang = "en"
} else {
lang = basename(path)
path = dirname(path)
path = ".."
}
translation = dir(path,
recursive = TRUE,
pattern = glob2rx(litedown::get_context("input"))
)
translation = dir(path = path, recursive = TRUE, pattern = basename(context))
transl_lang = ifelse(dirname(translation) == ".", "en", dirname(translation))
block = if (!all(transl_lang == lang)) {
linked_transl = sprintf("[%s](%s)", transl_lang, file.path(url, sub("(?i)\\.Rmd$", ".html", translation)))
Expand Down
7 changes: 3 additions & 4 deletions vignettes/datatable-fread-and-fwrite.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: "Fast Read and Fast Write"
date: "`r Sys.Date()`"
output:
markdown::html_format
date: "`{r} Sys.Date()`"
output: litedown::html_format
vignette: >
%\VignetteIndexEntry{Fast Read and Fast Write}
%\VignetteEngine{litedown::vignette}
Expand All @@ -11,7 +10,7 @@ vignette: >

```{r echo=FALSE, file='_translation_links.R'}
```
`r .write.translation.links("Translations of this document are available in: %s")`
`{r} .write.translation.links("Translations of this document are available in: %s")`

```{r, echo = FALSE, message = FALSE}
require(data.table)
Expand Down
7 changes: 3 additions & 4 deletions vignettes/es/datatable-fread-and-fwrite.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: "Lectura y escritura rápida: fread()/fwrite()"
date: "`r Sys.Date()`"
output:
markdown::html_format
date: "`{r} Sys.Date()`"
output: litedown::html_format
vignette: >
%\VignetteIndexEntry{Fast Read and Fast Write}
%\VignetteEngine{litedown::vignette}
Expand All @@ -12,7 +11,7 @@ vignette: >
```{r echo=FALSE, file='../_translation_links.R'}
```

`r .write.translation.links("Las traducciones de este documento están disponibles en: %s")`
`{r} .write.translation.links("Las traducciones de este documento están disponibles en: %s")`

```{r, echo = FALSE, message = FALSE}
require(data.table)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-benchmarking.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Analyse comparative (benchmark) de data.table"
date: "`{r} Sys.Date()`"
output:
markdown::html_format:
litedown::html_format:
options:
toc: true
number_sections: true
Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-faq.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Foire aux questions de data.table"
date: "`{r} Sys.Date()`"
output:
markdown::html_format:
litedown::html_format:
options:
toc: true
number_sections: true
Expand Down
5 changes: 2 additions & 3 deletions vignettes/fr/datatable-fread-and-fwrite.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: "Lecture et écriture rapides"
date: "`r Sys.Date()`"
output:
markdown::html_format
date: "`{r} Sys.Date()`"
output: litedown::html_format
vignette: >
%\VignetteIndexEntry{Lecture et écriture rapides}
%\VignetteEngine{litedown::vignette}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Introduction à data.table"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Introduction à data.table}
%\VignetteEngine{litedown::vignette}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-keys-fast-subset.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Extraire des sous-ensemble avec les clés et la recherche binaire rapide"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Extraire des sous-ensemble avec les clés et la recherche binaire rapide}
%\VignetteEngine{litedown::vignette}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-programming.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Programmation avec data.table"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Programmation avec data.table}
%\VignetteEngine{litedown::vignette}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-reference-semantics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Sémantique de référence"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Sémantique de référence}
%\VignetteEngine{litedown::vignette}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-reshape.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Restructurer efficacement avec les data.tables"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Restructurer efficacement avec les data.tables}
%\VignetteEngine{litedown::vignette}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/fr/datatable-sd-usage.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Utiliser .SD pour l’analyse de données"
date: "`{r} Sys.Date()`"
output:
markdown::html_format:
litedown::html_format:
options:
toc: true
number_sections: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Indices secondaires et auto-indexation"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Indices secondaires et auto-indexation}
%\VignetteEngine{litedown::vignette}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/ru/datatable-importing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Использование data.table в других пакетах"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Использование data.table в других пакетах}
%\VignetteEngine{litedown::vignette}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/ru/datatable-intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Введение в data.table"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Введение в data.table}
%\VignetteEngine{litedown::vignette}
Expand Down
6 changes: 1 addition & 5 deletions vignettes/ru/datatable-reshape.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
title: "Быстрое изменение формы данных с помощью data.table"
date: "`{r} Sys.Date()`"
output:
markdown::html_format
litedown::html_format
vignette: >
%\VignetteIndexEntry{Быстрое изменение формы данных с помощью data.table}
%\VignetteEngine{litedown::vignette}
\usepackage[utf8]{inputenc}
---

```{r echo=FALSE, file='../_translation_links.R'}
```
`r .write.translation.links("Данное руководство также доступно на следующих языках: %s")`

```{r, echo = FALSE, message = FALSE}
require(data.table)
litedown::reactor(comment = "# ")
Expand Down
Loading