Releases: MichaelChirico/potools
Releases · MichaelChirico/potools
v0.2.4
New features
- To encourage a more modular workflow,
translate_package()has been split into individual exported functions. Thanks @hadley for the suggestion & design review, in addition to the effort filing PRs to achieve this.po_extract()extracts messages from package source code to create template.potfiles (@hadley, #243).po_create()creates skeletal.pofiles for a given language from the.pottemplate (@hadley, #235)po_compile()converts.potranslation files into binary.mofiles used for installation (@hadley, #234).po_update()incorporates and merges source message changes to existing.pofiles (@hadley, #235)
- Two new vignettes, "Translation for package developers" and "Translation for package translators" explain in some detail the process of translation from two perspectives -- that of the package developer and that of the message translator.
check_potools_sys_reqs()(mostly intended for internal use, but exported for testing) gains awhichargument to fine-tune which system requirements to check, #275 and #288. Thanks @hadley for the suggestion and @LDalby for early dev testing which emphasized the need for this.- New
po_explain_plurals()helps de-mystify how to supply plurals for different languages. For example,po_explain_plurals("pl", 3)explains that "For Polish (Polski), plural index 2 applies when n = 0, 5-21, 25-31, 35-41, ...", #278. Thanks @hadley for the suggestion to independently export this functionality which was already used as part oftranslate_package().
Bug fixes
translate_package()works in batch mode, #224. Thanks @HenrikBengtsson for the report.check_cracked_messages()recognizes named arguments (e.g.call.tostop()orappendLFtomessage()) and keeps them in the original call, #227. Thanks @hadley for the report.- A test for non-GNU versions of
gettexthas been improved, #221. Please report any issues here -- I don't have any good way of testing non-GNU tools. - .po files generated by {potools} will default to using
charset=UTF-8, notcharset=ASCII, to prevent encoding issues (@MichaelChirico, #299). Thanks @maelle for the report!
Notes
- {potools} now has a site built by
pkgdownand hosted on GitHub pages: https://michaelchirico.github.io/potools/. Thanks @hadley for the initial implementation. - {potools} has a new hex logo featuring a potoo! Thanks to @hadley for coordinating and @allisonhorst for the drawing!
- The test suite now relies on the 3rd edition of
testthat, meaning a version requirement in the Suggested dependency. - The default value of
verbosehas been changed toTRUEintranslate_package()andget_message_data(). Verbosity has also been increased to help detect the source of issues, #288. Thanks for @LDalby for reporting an unhelpful error. - The package now contains Japanese translations of
potoolsitself to serve as an example. See po/R-ja.po. #241; thanks @HenrikBengtsson for the suggestion.
New languages/locales supported out of the box:
- Swedish (svenska)