Closed hadley closed 3 years ago
Changed it to add or update, depending on whether or not the .po
file already exists. That makes tr_add()
and even worse name.
I think this is better as po_create()
and po_update()
. I think po_update()
should update all languages if none supplied; but that needs code from #234, so I'll wait until you've have a chance to review that.
I'm little surprised that potools doesn't already use msginit
There are a couple of gettext tools I would do well to integrate better with / provide good wrappers for...
Merging #235 (a088663) into master (d68b90b) will decrease coverage by
1.51%
. The diff coverage is22.22%
.
@@ Coverage Diff @@
## master #235 +/- ##
==========================================
- Coverage 98.80% 97.29% -1.52%
==========================================
Files 17 17
Lines 1341 1367 +26
==========================================
+ Hits 1325 1330 +5
- Misses 16 37 +21
Impacted Files | Coverage Δ | |
---|---|---|
R/msgmerge.R | 58.20% <22.22%> (-24.72%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update d68b90b...a088663. Read the comment docs.
Ok, reimplemented basically from scratch; I'll add a bunch of tests shortly.
Looking great, thanks!
I don't love the name
tr_add()
, and it's making me doubt that the developer/translator distinction is that useful, because this function might be run by the developer or an R-packages savvy translator.I tweaked the
.Rproj
to make my usual roxygen2 workflow a little smoother; let me know if you want to revert.I'm little surprised that potools doesn't already use
msginit
, so maybe I should instead copy the approach used intranslate_package()
?