(lang)
| 260 | } |
| 261 | |
| 262 | async function pullTranslations(lang) { |
| 263 | const { local, remote, filePath } = await loadData(lang); |
| 264 | Object.entries(local) |
| 265 | .forEach(([key, value]) => { |
| 266 | const remoteMessage = remote[key] && remote[key].message; |
| 267 | if (remoteMessage) value.message = remoteMessage; |
| 268 | }); |
| 269 | await writeFile(filePath, yaml.dump(local), 'utf8'); |
| 270 | } |
| 271 | |
| 272 | async function batchHandle(handle, allowedLangs) { |
| 273 | process.stdout.write('Loading languages...'); |