Skip to content

Instantly share code, notes, and snippets.

@jacob-jonkman
Last active January 3, 2020 10:43
Show Gist options
  • Save jacob-jonkman/eb455acccd10d8141b385cda6bd50c24 to your computer and use it in GitHub Desktop.
Save jacob-jonkman/eb455acccd10d8141b385cda6bd50c24 to your computer and use it in GitHub Desktop.
function writeTranslationsPerProject(projects: Project[]): void {
Promise.all(projects.map(project => {
listLanguagesOptions.formData.id = project.id;
return constructTranslationsperLanguage(project.id)
.then(translations => {
return firebase.database().ref('translations/' + project.name.replace('Winestep-', '') + '/').set(translations)
.then(() => console.log(project.name, 'done!'));
})
})).then(() => process.exit());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment