Skip to content

Commit d6ff192

Browse files
maelleyabellini
andauthored
add mentions of tools useful for translation and localization (#940)
* add mentions of tools useful for translation and localization * es translation * Update pkg_building.es.Rmd Co-authored-by: Yanina Bellini Saibene <[email protected]> * Update pkg_building.es.Rmd Co-authored-by: Yanina Bellini Saibene <[email protected]> * Update pkg_building.es.Rmd Co-authored-by: Yanina Bellini Saibene <[email protected]> --------- Co-authored-by: Yanina Bellini Saibene <[email protected]>
1 parent c80e9d0 commit d6ff192

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

booknews.Rmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## dev version
44

5+
- 2025-07-11, add mentions of tools useful for translation and localization (#812).
6+
57
- 2025-07-09, add mention of tinytest. (#904)
68

79
- 2025-07-09, add mention of the allcontributors package. (#899)

pkg_building.Rmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ We recommend you to use the [`codemetar` package](https://github.com/ropensci/co
6363

6464
- Provide a way for users to opt out of verbosity, preferably at the package level: make message creation dependent on an environment variable or option (like ["usethis.quiet"](https://usethis.r-lib.org/reference/ui.html?q=usethis.quiet#silencing-output) in the usethis package), rather than on a function parameter. The control of messages could be on several levels ("none", "inform", "debug") rather than logical (no messages at all / all messages). Control of verbosity is useful for end users but also in tests. More interesting comments can be found in an [issue of the tidyverse design guide](https://github.com/tidyverse/design/issues/42).
6565

66+
- You can provide translations for your package's messages. The [potools](https://michaelchirico.github.io/potools/) R package can help you with that task.
67+
6668
### Interactive/Graphical Interfaces {#interactive-graphical-interfaces}
6769

6870
If providing a graphical user interface (GUI) (such as a Shiny app), to facilitate workflow, include a mechanism to automatically reproduce steps taken in the GUI. This could include auto-generation of code to reproduce the same outcomes, the output of intermediate values produced in the interactive tool, or simply clear and well-documented mapping between GUI actions and scripted functions. (See also ["Testing"](#testing) below.)
@@ -255,6 +257,8 @@ f <- function(a = TRUE) {
255257

256258
- Starting from roxygen2 version 7.0.0, `R6` classes are officially supported. See the [roxygen2 docs](https://roxygen2.r-lib.org/articles/rd-other.html#r6) for details on how to document `R6` classes.
257259

260+
- There is no support for providing manual pages in different languages yet, but some interesting progress in the [rhelpi18n R package](https://github.com/eliocamp/rhelpi18n).
261+
258262
### URLs in documentation {#ur-ls-in-documentation}
259263

260264
This subsection is particularly relevant to authors wishing to submit their package to CRAN.
@@ -276,6 +280,12 @@ You only need to worry about automatic deployment of your website until approval
276280

277281
Before submission and before transfer, you could use the [approach documented by `pkgdown`](https://pkgdown.r-lib.org/reference/deploy_site_github.html) or the [`tic` package](https://docs.ropensci.org/tic/) for automatic deployment of the package's website. This would save you the hassle of running (and remembering to run) `pkgdown::build_site()` yourself every time the site needs to be updated. First refer to our [chapter on continuous integration](#ci) if you're not familiar with continuous integration. In any case, do not forget to update all occurrences of the website URL after transfer to the ropensci organization.
278282

283+
### Language
284+
285+
If your package's documentation is written in a language other than English (but supported by the rOpenSci software peer-review system), you can declare that language for your pkgdown website to be [localized](https://pkgdown.r-lib.org/articles/translations.html).
286+
287+
It is [not yet possible to get a multilingual pkgdown website](https://github.com/r-lib/pkgdown/issues/2258) out of the box.
288+
279289
### Grouping functions in the reference {#function-grouping}
280290

281291
When your package has many functions, use grouping in the reference, which you can do more or less automatically.

pkg_building.es.Rmd

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ CodeMeta utiliza [términos de Schema.org](https://schema.org/) por lo que, a me
6666

6767
- Proporciona una forma para suprimir la verbosidad, preferiblemente a nivel de paquete: haz que la creación de mensajes dependa de una variable u opción de entorno (como ["usethis.quiet"](https://usethis.r-lib.org/reference/ui.html?q=usethis.quiet#silencing-output) en el paquete usethis), en lugar de en un parámetro de la función. El control de los mensajes podría ser a varios niveles ("ninguno, "informar", "depurar") en lugar de lógico (ningún mensaje / todos los mensajes). El control de la verbosidad es útil para usuarios/as finales, pero también en las pruebas. Puedes encontrar más comentarios interesantes en [este issue de la guía de diseño de tidyverse](https://github.com/tidyverse/design/issues/42).
6868

69+
- Puedes proporcionar traducciones para los mensajes de tu paquete. El paquete [potools](https://michaelchirico.github.io/potools/) puede ayudarte con esa tarea.
70+
6971
### Interfaces interactivas o gráficas {#interactive-graphical-interfaces}
7072

7173
Si proporcionas una interfaz gráfica de usuario (GUI) (como una aplicación Shiny), para facilitar el flujo de trabajo incluye un mecanismo para reproducir automáticamente los pasos realizados en la GUI.
@@ -283,6 +285,8 @@ f <- function(a = TRUE) {
283285
- A partir de la versión 7.0.0 de roxygen2, las clases `R6` son oficialmente compatibles.
284286
Consulta la [documentación de roxygen2](https://roxygen2.r-lib.org/articles/rd-other.html#r6) para saber cómo documentar las clases `R6`.
285287

288+
- Todavía no hay soporte para proporcionar páginas web de manual en diferentes idiomas, pero se han producido avances interesantes en el paquete [rhelpi18n](https://github.com/eliocamp/rhelpi18n).
289+
286290
### URLs en la documentación {#ur-ls-in-documentation}
287291

288292
Esta subsección es especialmente relevante para quienes deseen enviar su paquete a CRAN.
@@ -313,6 +317,13 @@ Esto te ahorrará el trabajo de ejecutar (y acordarte de ejecutar) `pkgdown::bui
313317
Consulta nuestro [capítulo sobre integración continua](#ci) si ésto no te resulta familiar.
314318
En cualquier caso, no olvides actualizar la URL del sitio web en todos los lados donde aparezca después de hacer la transferencia a la organización ropensci.
315319

320+
321+
### Idioma
322+
323+
Si la documentación de tu paquete está escrita en un idioma distinto del inglés (pero compatible con el sistema de revisión de software por pares de rOpenSci), puedes declarar ese idioma para que el sitio web pkgdown se [localice](https://pkgdown.r-lib.org/articles/translations.html).
324+
325+
Todavía no es posible obtener un sitio web pkgdown multilingüe listo para usar (https://github.com/r-lib/pkgdown/issues/2258).
326+
316327
### Agrupar funciones en el índice {#function-grouping}
317328

318329
Cuando tu paquete tenga muchas funciones, es conveniente que aparezcan agrupadas en el índice de la documentación, lo cual se puede hacer de forma más o menos automática.

0 commit comments

Comments
 (0)