Skip to content

Commit 8802189

Browse files
Get correct message_source for deprecated messages (#311)
1 parent 5e0557f commit 8802189

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/get_po_messages.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,11 @@ get_po_messages <- function(po_file) {
123123
msg_j = msg_j + 1L
124124
}
125125

126-
# somewhat hacky approach -- strip the comment markers & recurse
126+
# somewhat hacky approach -- strip the comment markers & recurse;
127+
# retain the same file pattern to ensure 'message_source' is correct
127128
writeLines(
128129
gsub("^#~ ", "", grep("^#~ ", po_lines, value = TRUE)),
129-
tmp <- tempfile()
130+
tmp <- tempfile(pattern = basename(po_file))
130131
)
131132
on.exit(unlink(tmp))
132133
deprecated = get_po_messages(tmp)

0 commit comments

Comments
 (0)