Skip to content

Commit 7ef30b9

Browse files
Merge pull request #32 from r-devel/checkpofiles
Add a step to run `checkPoFiles()`
2 parents ccf7631 + e1cf5b4 commit 7ef30b9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

web/Weblate-server.qmd

+8-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ The basic idea is to compare the Weblate repo (which copies the R subversion rep
158158
git reset --hard weblate/master # force-reset to match state on Weblate (usual caution with --hard applies)
159159
```
160160

161-
1. Revert unwanted changes to reduce noise, e.g. something like:
161+
1. Make needed manual changes to reduce noise and ensure quality, e.g. something like:
162162

163163
```r
164164
library(data.table)
@@ -174,13 +174,19 @@ The basic idea is to compare the Weblate repo (which copies the R subversion rep
174174
}
175175
set_branch <- \(branch) system2('git', c('checkout', branch))
176176
177-
# SUMMARIZE the changed translations, and delete empty .po files
178177
set_branch('weblate/master')
178+
po_report <- tools::checkPoFiles("")
179+
if (length(po_report)) {
180+
print(po_report)
181+
stop("Fix above issues in .po files identified by tools::checkPoFiles() to proceed.")
182+
}
183+
179184
weblate_summary <- po_counts(po_files())
180185
set_branch('svn/master')
181186
svn_summary <- po_counts(po_files())
182187
set_branch('master')
183188
189+
# SUMMARIZE the changed translations, and delete empty .po files
184190
po_summary <- merge(weblate_summary, svn_summary, by = "filename", all = TRUE, suffixes = c("_weblate", "_svn"))
185191
po_summary[, package := basename(dirname(dirname(filename)))]
186192
# Drop empty & record files

0 commit comments

Comments
 (0)