diff --git a/web/Weblate-server.qmd b/web/Weblate-server.qmd index a19c382..e67de54 100644 --- a/web/Weblate-server.qmd +++ b/web/Weblate-server.qmd @@ -158,7 +158,7 @@ The basic idea is to compare the Weblate repo (which copies the R subversion rep git reset --hard weblate/master # force-reset to match state on Weblate (usual caution with --hard applies) ``` -1. Revert unwanted changes to reduce noise, e.g. something like: +1. Make needed manual changes to reduce noise and ensure quality, e.g. something like: ```r library(data.table) @@ -174,13 +174,19 @@ The basic idea is to compare the Weblate repo (which copies the R subversion rep } set_branch <- \(branch) system2('git', c('checkout', branch)) - # SUMMARIZE the changed translations, and delete empty .po files set_branch('weblate/master') + po_report <- tools::checkPoFiles("") + if (length(po_report)) { + print(po_report) + stop("Fix above issues in .po files identified by tools::checkPoFiles() to proceed.") + } + weblate_summary <- po_counts(po_files()) set_branch('svn/master') svn_summary <- po_counts(po_files()) set_branch('master') + # SUMMARIZE the changed translations, and delete empty .po files po_summary <- merge(weblate_summary, svn_summary, by = "filename", all = TRUE, suffixes = c("_weblate", "_svn")) po_summary[, package := basename(dirname(dirname(filename)))] # Drop empty & record files