scratch-l10n 5.0.309 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +6 -0
- package/dist/l10n.js +3 -0
- package/dist/l10n.js.map +1 -1
- package/dist/localeData.js +3 -0
- package/dist/localeData.js.map +1 -1
- package/dist/supportedLocales.js +3 -0
- package/dist/supportedLocales.js.map +1 -1
- package/package.json +23 -21
- package/scripts/{build-data.mjs → build-data.mts} +15 -6
- package/scripts/{build-i18n-src.js → build-i18n-src.mts} +16 -11
- package/scripts/lib/concurrent.mts +37 -0
- package/scripts/lib/freshdesk-api.mts +322 -0
- package/scripts/lib/help-utils.mts +221 -0
- package/{lib/progress-logger.mjs → scripts/lib/progress-logger.mts} +10 -5
- package/scripts/lib/transifex-formats.mts +53 -0
- package/scripts/lib/transifex-objects.mts +143 -0
- package/scripts/lib/transifex.mts +284 -0
- package/scripts/lib/validate.mts +107 -0
- package/scripts/tsconfig.json +20 -0
- package/scripts/tx-pull-editor.mts +74 -0
- package/scripts/{tx-pull-help-articles.js → tx-pull-help-articles.mts} +5 -13
- package/scripts/{tx-pull-help-names.js → tx-pull-help-names.mts} +5 -13
- package/scripts/{tx-pull-locale-articles.js → tx-pull-locale-articles.mts} +5 -13
- package/scripts/{tx-pull-www.mjs → tx-pull-www.mts} +16 -29
- package/scripts/{tx-push-help.mjs → tx-push-help.mts} +39 -37
- package/scripts/{tx-push-src.js → tx-push-src.mts} +13 -20
- package/scripts/update-translations.sh +2 -2
- package/scripts/{validate-extension-inputs.mjs → validate-extension-inputs.mts} +20 -10
- package/scripts/{validate-translations.mjs → validate-translations.mts} +7 -12
- package/scripts/{validate-www.mjs → validate-www.mts} +15 -13
- package/src/supported-locales.mjs +3 -0
- package/www/scratch-website.about-l10njson/nn.json +1 -1
- package/www/scratch-website.splash-l10njson/mi.json +2 -2
- package/www/scratch-website.teacher-faq-l10njson/cy.json +1 -1
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -75
- package/.github/workflows/ci-cd.yml +0 -55
- package/.github/workflows/commitlint.yml +0 -12
- package/.github/workflows/daily-help-update.yml +0 -40
- package/.github/workflows/daily-tx-pull.yml +0 -54
- package/.github/workflows/signature-assistant.yml +0 -31
- package/lib/batch.js +0 -15
- package/lib/transifex.js +0 -242
- package/lib/validate.mjs +0 -48
- package/scripts/freshdesk-api.js +0 -149
- package/scripts/help-utils.js +0 -190
- package/scripts/tx-pull-editor.mjs +0 -83
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,63 @@
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [6.0.1](https://github.com/scratchfoundation/scratch-l10n/compare/v6.0.0...v6.0.1) (2025-07-16)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **deps:** update dependency tsx to v4.20.3 ([#678](https://github.com/scratchfoundation/scratch-l10n/issues/678)) ([e0d6eef](https://github.com/scratchfoundation/scratch-l10n/commit/e0d6eefdaa01931a4b0009addb9b4cad5aca635a))
|
12
|
+
|
13
|
+
# [6.0.0](https://github.com/scratchfoundation/scratch-l10n/compare/v5.0.309...v6.0.0) (2025-07-16)
|
14
|
+
|
15
|
+
|
16
|
+
### Bug Fixes
|
17
|
+
|
18
|
+
* check placeholder names but not extended plural info ([65d67eb](https://github.com/scratchfoundation/scratch-l10n/commit/65d67eb3014620e39bc7ff81243dbf7ba6b28711))
|
19
|
+
* disable numeric placeholder validation ([65ffd90](https://github.com/scratchfoundation/scratch-l10n/commit/65ffd90e20d31de368cb2d7364cfe53b90c59b4b))
|
20
|
+
* fix incorrect placeholder ([332e9b7](https://github.com/scratchfoundation/scratch-l10n/commit/332e9b7931d89440dfd50ddf75c1679ae2c29e8d))
|
21
|
+
* fix more incorrect placeholders ([fe6680d](https://github.com/scratchfoundation/scratch-l10n/commit/fe6680d931572039b5dfb62071377f17c9136436))
|
22
|
+
* make validation failure message easier to read ([42c13a3](https://github.com/scratchfoundation/scratch-l10n/commit/42c13a32b93dffdba6f640b3807739bcad94d7db))
|
23
|
+
* use top-level "await" to make sure exceptions show ([0385c16](https://github.com/scratchfoundation/scratch-l10n/commit/0385c1602b44fa5ad8b349adb1b7c9f24197647e))
|
24
|
+
|
25
|
+
|
26
|
+
* refactor!: use TypeScript and fix bugs in scripts/ ([fc1e381](https://github.com/scratchfoundation/scratch-l10n/commit/fc1e38186b484e5206e724a9ab2866c26f493ea3))
|
27
|
+
|
28
|
+
|
29
|
+
### Features
|
30
|
+
|
31
|
+
* validate placeholders more thoroughly ([accefc6](https://github.com/scratchfoundation/scratch-l10n/commit/accefc6e9144898eb865a2c626211589f5c1b7de))
|
32
|
+
|
33
|
+
|
34
|
+
### Performance Improvements
|
35
|
+
|
36
|
+
* replace batch mapping with pool mapping ([b605020](https://github.com/scratchfoundation/scratch-l10n/commit/b605020d95359f55e395b989befd6758036ee02b))
|
37
|
+
|
38
|
+
|
39
|
+
### BREAKING CHANGES
|
40
|
+
|
41
|
+
* Code under `scripts/` is now TypeScript and runs using `tsx`. This _shouldn't_
|
42
|
+
break anyone, but in theory it could...
|
43
|
+
|
44
|
+
The files under `scripts/` now use TypeScript, which exposed quite a few bugs. They're configured to
|
45
|
+
run with `tsx` so we don't need a build step.
|
46
|
+
|
47
|
+
Some of the common changes:
|
48
|
+
- Some functions returning promises were called without `await` or `.then()`, which meant that
|
49
|
+
exceptions thrown by them were being ignored. I've added `await` to all cases that I found. I
|
50
|
+
changed some functions and promise chains to use `async` instead, especially where it's easier to
|
51
|
+
read and/or easier to get exceptions right.
|
52
|
+
- Most Transifex objects have a property called `attributes`. Some of our functions tried to access
|
53
|
+
properties of `attributes` as if they were properties of the Transifex object directly (`o.foo`
|
54
|
+
instead of `o.attributes.foo`). TypeScript helps quite a bit with finding this kind of error.
|
55
|
+
- Added `'utf8'` parameter to `fs.readFile` and `fs.readFileSync` in several places. We were already
|
56
|
+
treating the return value as a string (usually passing it to `JSON.parse`), but without specifying
|
57
|
+
the text encoding, the actual return value was a buffer. Adding the text encoding parameter makes
|
58
|
+
our usage type-correct.
|
59
|
+
- In some cases, correct code was hard to read since it wasn't clear what type of data was being
|
60
|
+
handled. Adding type annotations, plus a few comments here and there, should help with
|
61
|
+
understanding the code in the future. Some placeholder comments were removed or filled in.
|
62
|
+
|
6
63
|
## [5.0.309](https://github.com/scratchfoundation/scratch-l10n/compare/v5.0.308...v5.0.309) (2025-07-16)
|
7
64
|
|
8
65
|
|
package/README.md
CHANGED
@@ -7,6 +7,12 @@ you would like to contribute translations, please sign up to translate on Transi
|
|
7
7
|
|
8
8
|
## Using scratch-l10n in development
|
9
9
|
|
10
|
+
Files under `src/` and `dist/` are JavaScript and meant to be used at runtime.
|
11
|
+
|
12
|
+
Files under `scripts/` are generally TypeScript and are meant to be used during development or at build time.
|
13
|
+
|
14
|
+
Most other directories contain the localization data itself: both source and translated strings.
|
15
|
+
|
10
16
|
### Basic Use
|
11
17
|
|
12
18
|
```js
|
package/dist/l10n.js
CHANGED
@@ -24594,6 +24594,9 @@ const customLocales = {
|
|
24594
24594
|
},
|
24595
24595
|
}
|
24596
24596
|
|
24597
|
+
/**
|
24598
|
+
* @type {Record<string,string>}
|
24599
|
+
*/
|
24597
24600
|
const localeMap = {
|
24598
24601
|
'aa-dj': 'aa_DJ',
|
24599
24602
|
'es-419': 'es_419',
|