Skip to content

Commit 6fc8f4d

Browse files
committed
add npm run dist translations command
and don't purge translations on `npm run dist`
1 parent a591db7 commit 6fc8f4d

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
2121

2222
#### Development
2323
* Upgrade schema-builder to version 5.2, updates transifex API to v3 (see also [iD#9375])
24+
* Don't purge and re-fetch translations when running `npm run dist`: To do a "full" dist run – including updated translations – one can run `npm run dist translations` now.
2425

2526
[iD#9375]: https://github.com/openstreetmap/iD/pull/9375
2627

scripts/dist.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import schemaBuilder from '@ideditor/schema-builder';
22

3+
let translationOptions = {};
4+
if (process.argv.includes('translations')) {
5+
translationOptions = {
6+
translOrgId: 'openstreetmap',
7+
translProjectId: 'id-editor',
8+
translResourceIds: ['presets'],
9+
translReviewedOnly: ['vi']
10+
};
11+
}
12+
313
schemaBuilder.buildDist({
414
taginfoProjectInfo: {
515
name: 'iD Tagging Schema',
@@ -9,8 +19,5 @@ schemaBuilder.buildDist({
919
contact_name: 'Martin Raifer',
1020
contact_email: 'martin@raifer.tech'
1121
},
12-
translOrgId: 'openstreetmap',
13-
translProjectId: 'id-editor',
14-
translResourceIds: ['presets'],
15-
translReviewedOnly: ['vi']
22+
...translationOptions
1623
});

0 commit comments

Comments
 (0)