Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

28 add items for localisation #29

Merged
merged 3 commits into from
Jan 16, 2025
Merged
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
15 changes: 9 additions & 6 deletions proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,19 @@ For simple interactive interfaces, `base::readline()` can be used to create a ba
* `r pkg(progress)` provides configurable text progress bars, for R and C++.
* `r pkg(shiny)` provides a framework to create browser-based interfaces, from function dialogues to more complex interactive web applications, that can be run locally with `runApp()` or deployed as static web or dynamic websites. See the [Web Technologies and Services](https://cran.r-project.org/web/views/WebTechnologies.html#frameworks) task view for other frameworks for building R-based web applications.

### Localisation
### Localization

Packages might be addressed to people using a different language and locale.
Localization in R uses GNU `gettext` as described in the notes on [Translating R Messages](https://developer.r-project.org/Translations30.html) which uses translations stored in PO files.
Localization in R uses GNU `gettext` as described in the notes on [Translating R Messages](https://developer.r-project.org/Translations30.html) which uses translations stored in PO files.

`tools:update_pkg_po` creates or updates the PO template files for a package,
and updates corresponding PO files as required. `tools::checkPoFile` can be
used to check translation files for inconsistent format strings.
`tools::update_pkg_po()` creates or updates the PO template (`.pot`) files for a package,
and updates corresponding PO (`.po`) files as required. `tools::checkPoFile()` can be
used to check translation files for inconsistently formatted strings.

CONSIDER: potools, https://github.com/eliocamp/rhelpi18n
* `r pkg(potools, priority = "core")` provides helpers to create/update `.pot` and `.po` files, compile the `.po` files for distribution in a package, and run diagnostics to detect issues, e.g., untranslated messages due to inappropriate R/C code.
* Alternative mechanisms for localization of R messages are provided by `r pkg(stranslate)`
and `r pkg(translated)`, using plain text and JSON files respectively.
* `r github("eliocamp/rhelpi18n")` provides experimental support for localization of help pages, based on YAML files provided by companion packages.

### Building and installing a source package

Expand Down