potools

Tools for working with translations in R

https://github.com/michaelchirico/potools

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.6%) to scientific vocabulary

Keywords

i18n translation

Keywords from Contributors

gdal setup bigquery package-creation interface data-manipulation grammar documentation-tool csv fwf
Last synced: 10 months ago · JSON representation

Repository

Tools for working with translations in R

Basic Info
Statistics
  • Stars: 60
  • Watchers: 3
  • Forks: 1
  • Open Issues: 56
  • Releases: 1
Topics
i18n translation
Created almost 6 years ago · Last pushed about 2 years ago
Metadata Files
Readme Changelog

README.md

potools: Tools for Portability and Internationalization of R packages

Overview

R users are a global community. From Xiamen to Santiago, Addis Ababa to Tbilisi, Ogallala to Adelaide, R users are legion and speak many different languages. To serve these diverse communities, R includes built-in tools based on the GNU gettext system that make it possible to translate user-facing communications like messages, warnings, and errors. Unfortunately, this system uses new file types (.pot templates, .po files, and .mo binaries) that come with their own quirks and idiosyncrasies. The goal of potools is make it as easy as possible to translate your package by abstracting away as many details of the gettext system as possible.

The potool logo features a potoo and was designed by Allison Horst.

Installation

Start by installing the released version potools from CRAN:

R install.packages("potools")

Or the development version from GitHub:

```R

install.packages("remotes")

remotes::install_github("MichaelChirico/potools") ```

You'll also need to install gettext, the GNU command line toolkit that powers potools. Installation depends on your operating system:

  • On Windows, gettext is bundled with Rtools, so if you're developing packages you probably already have it.

  • On Mac, it's easiest to install with brew: brew install gettext

  • On Linux, it's usually already installed; otherwise you'll need to install gettext with your distro's standard tool.

Workflow

There are two core workflows provided by potools:

  • translate_package() is a one-stop-shop for interactively setting your package and providing translations, as described in ?translate_package.

  • po_extract(), po_create(), po_update(), and po_compile() let you perform the individual steps of translate_package() as described in vignette("developers") and vignette("translators").

Alternative software

potools is by no means the first tool for facilitating internationalization; other open-source projects have deeper experience in this domain and as a result there are some relatively mature options for working with gettext/the po ecosystem in general. Here is a smattering of such tools that I've come across:

  • Poedit - https://poedit.net/ - GUI Software for writing translations
  • Gtranslator - https://wiki.gnome.org/Apps/Gtranslator - GNOME Translation editor
  • Lokalize - https://userbase.kde.org/Lokalize - KDE's Computer-Aided Translation system
  • Virtaal - https://virtaal.translatehouse.org/ - Another FOSS software for translation on the desktop; not actively maintained
  • Pootle - https://pootle.translatehouse.org/ - Web-based translation server, from the same team as Virtaal (thesis comparing both); not actively maintained
  • Translate Toolkit - https://toolkit.translatehouse.org/ - Command-line utilities and Python library underlying Virtaal and Pootle, and even Weblate
  • Weblate - https://weblate.org/ - Web-based translation server with git integration, used by the R project for its core and recommended packages (the latter since the 2023 Sprint)
  • PO mode in Emacs - https://www.emacswiki.org/emacs/PoMode

Owner

  • Name: Michael Chirico
  • Login: MichaelChirico
  • Kind: user
  • Location: San Francisco

Economics PhD, Google Data Scientist, ex-@grab

GitHub Events

Total
  • Issues event: 7
  • Watch event: 2
  • Issue comment event: 5
Last Year
  • Issues event: 7
  • Watch event: 2
  • Issue comment event: 5

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 226
  • Total Committers: 6
  • Avg Commits per committer: 37.667
  • Development Distribution Score (DDS): 0.097
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michael Chirico m****4@g****m 204
Hadley Wickham h****m@g****m 16
Maëlle Salmon m****n@y****e 3
urswilke u****e@g****m 1
Leonardo Ferreira Fontenelle l****f@l****r 1
Michael Chirico m****o@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 78
  • Total pull requests: 49
  • Average time to close issues: 2 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 10
  • Total pull request authors: 5
  • Average comments per issue: 1.73
  • Average comments per pull request: 1.69
  • Merged pull requests: 46
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 9
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • MichaelChirico (45)
  • hadley (19)
  • HenrikBengtsson (5)
  • maelle (2)
  • tdhock (1)
  • hturner (1)
  • aitap (1)
  • LDalby (1)
  • eliocamp (1)
  • leofontenelle (1)
Pull Request Authors
  • MichaelChirico (29)
  • hadley (17)
  • maelle (3)
  • urswilke (1)
  • leofontenelle (1)
Top Labels
Issue Labels
enhancement (8) documentation (3) bug (3) testing (2) consistency (1) internals (1) src-translations (1)
Pull Request Labels
internals (1)

Packages

  • Total packages: 1
  • Total downloads:
    • cran 1,749 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: potools

Tools for Internationalization and Portability in R Packages

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,749 Last month
Rankings
Stargazers count: 7.1%
Forks count: 17.8%
Average: 22.6%
Downloads: 22.9%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.0.0 depends
  • data.table * imports
  • glue * imports
  • crayon * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
  • withr * suggests
tests/testthat/test_packages/r-devel/src/library/base/DESCRIPTION cran
  • methods * suggests
tests/testthat/test_packages/r-devel/src/library/grDevices/DESCRIPTION cran
  • KernSmooth * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
inst/pkg/DESCRIPTION cran
tests/testthat/test_packages/custom_translation/DESCRIPTION cran
tests/testthat/test_packages/no_msg/DESCRIPTION cran
tests/testthat/test_packages/plural_semi_named/DESCRIPTION cran
tests/testthat/test_packages/r_cat_msg/DESCRIPTION cran
tests/testthat/test_packages/r_data_pkg/DESCRIPTION cran
tests/testthat/test_packages/r_err_1/DESCRIPTION cran
tests/testthat/test_packages/r_err_2/DESCRIPTION cran
tests/testthat/test_packages/r_fuzzy/DESCRIPTION cran
tests/testthat/test_packages/r_msg/DESCRIPTION cran
tests/testthat/test_packages/r_non_template/DESCRIPTION cran
tests/testthat/test_packages/r_src_c/DESCRIPTION cran
tests/testthat/test_packages/r_src_err_1/DESCRIPTION cran
tests/testthat/test_packages/r_src_err_2/DESCRIPTION cran
tests/testthat/test_packages/r_src_err_3/DESCRIPTION cran
tests/testthat/test_packages/r_src_fuzzy/DESCRIPTION cran
tests/testthat/test_packages/r_src_untranslated/DESCRIPTION cran
tests/testthat/test_packages/unusual_msg/DESCRIPTION cran
vignettes/GreatSpelling/DESCRIPTION cran