feat: add support for hidden labels when diffing Lokalise labels
This commit is contained in:
@@ -36,7 +36,6 @@ const perf = new PerformanceObserver((items) => {
|
||||
}
|
||||
performance.clearMeasures()
|
||||
})
|
||||
perf.observe({ type: "measure" })
|
||||
|
||||
async function waitUntilUploadDone(processId: string) {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
@@ -87,6 +86,8 @@ async function waitUntilUploadDone(processId: string) {
|
||||
}
|
||||
|
||||
export async function upload(filepath: string) {
|
||||
perf.observe({ type: "measure" })
|
||||
|
||||
try {
|
||||
log(`Uploading ${filepath}...`)
|
||||
|
||||
@@ -143,9 +144,15 @@ export async function upload(filepath: string) {
|
||||
await performanceMetrics
|
||||
}
|
||||
|
||||
export async function download(extractPath: string) {
|
||||
export async function download(extractPath: string, all: boolean = false) {
|
||||
perf.observe({ type: "measure" })
|
||||
|
||||
try {
|
||||
log("Downloading translations...")
|
||||
log(
|
||||
all
|
||||
? "Downloading all translations..."
|
||||
: "Downloading filtered translations..."
|
||||
)
|
||||
|
||||
performance.mark("downloadStart")
|
||||
|
||||
@@ -158,7 +165,7 @@ export async function download(extractPath: string) {
|
||||
icu_numeric: true,
|
||||
bundle_structure: "%LANG_ISO%.%FORMAT%",
|
||||
directory_prefix: "",
|
||||
filter_data: ["translated", "nonhidden"],
|
||||
filter_data: all ? [] : ["translated", "nonhidden"],
|
||||
export_empty_as: "skip",
|
||||
})
|
||||
performance.mark("lokaliseDownloadInitEnd")
|
||||
|
||||
Reference in New Issue
Block a user