Skip to content

chore(resources): update to latest CLDR preview 🙀#7477

Merged
srl295 merged 14 commits intofeature-ldmlfrom
chore/resources/7411-ldmlupdate-epic-ldml
Oct 20, 2022
Merged

chore(resources): update to latest CLDR preview 🙀#7477
srl295 merged 14 commits intofeature-ldmlfrom
chore/resources/7411-ldmlupdate-epic-ldml

Conversation

@srl295
Copy link
Member

@srl295 srl295 commented Oct 18, 2022

Note: there's a commit that does nothing other than sort the existing schema, this is to allow comparison in the later commit.

  • moved dtd/xsd into the dtd/ subdir - left the schema where they were
  • brought in 3.0, test subdirs. Now each subdir matches CLDR.
  • Note, the CLDR xml files don't compile yet! Will work on that in a subsequent PR

Fixes: #7411
reopen of #7471 in the head fork

@keymanapp-test-bot skip

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Oct 18, 2022

User Test Results

Test specification and instructions

User tests are not required

For: chore(developer): update kmc to latest LDML keyboard DTD version 🙀  #7411
jq -S . >  ldml-keyboard.schema.json

sort the keys, so that subsequent changes can be reviewed

For: chore(developer): update kmc to latest LDML keyboard DTD version 🙀  #7411
CLDR commit: b3c0702a837c4e11193483b85253b11e148fb06b

For: chore(developer): update kmc to latest LDML keyboard DTD version 🙀  #7411
- update tooling in common and kmc
- update spec
- update test files
@srl295 srl295 force-pushed the chore/resources/7411-ldmlupdate-epic-ldml branch from 61b946a to 66a5cdb Compare October 18, 2022 16:33
- dtd is in a subdirectory to match CLDR layout
- backspace is now a transform type. Keep the same test.
CLDR data update from unicode-org/cldr#2469

- displays is not an array

#7411
With this change, fr-t-k0-azerty.xml and mt.xml can load without any
ERROR 300007: The source file has an invalid structure errors.

Other errs show up, but it is progress.

Fixes #7411
@srl295 srl295 added this to the A16S13 milestone Oct 18, 2022
@srl295
Copy link
Member Author

srl295 commented Oct 18, 2022

check/web/file-size — ❌ Oh dear! keymanweb.js is 20,773 bytes (5%) larger than 16.0.82, now 412,265 bytes

What is it pulling in?

@mcdurdin
Copy link
Member

mcdurdin commented Oct 18, 2022

check/web/file-size — ❌ Oh dear! keymanweb.js is 20,773 bytes (5%) larger than 16.0.82, now 412,265 bytes

What is it pulling in?

I think you'll find your branch is out of date with master, and 16.0.82 has the touch alias element code removed (#7343). The file size check is suboptimal because it compares against latest release version rather than BASE of branch (because we often don't have a build for base of branch, so this is harder to do).

tl;dr: you can ignore it in this instance 😁

@srl295
Copy link
Member Author

srl295 commented Oct 18, 2022

#7479 adds on to this to support some standard CLDR files

Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, some polish suggestiosn for the fetch-latest-cldr-techpreview.sh

Comment on lines 63 to 72
if(!source) {
return null;
return [null, null];
}
if(!k.validate(source)) {
return null;
return [null, null];
}
let kmx = k.compile(source);
if(!kmx) {
return null;
return [null, null];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

Comment on lines 29 to 31
echo >&2 "$0: error: ${CHECK_1} did not exist"
echo >&2 "$0: error: Is ${CLDR_DIR} a valid cldr keyboard directory?"
exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use die() from build-utils.sh instead with a two-line message?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using die, but how do I get a two line message to die()?

Comment on lines 36 to 38
echo >&2 "$0: error: ${CHECK_2} did not exist"
echo >&2 "$0: error: Is ${CLDR_DIR} a valid cldr keyboard directory?"
exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use die() from build-utils.sh instead with a two-line message?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using die, but how do I get a two line message to die()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's improve die() to support multi-line messages: each parameter will be a new line.

…dr-epic-ldml

fix(developer): support CLDR sample keyboards 🙀
srl295 and others added 2 commits October 19, 2022 15:27
Co-authored-by: Marc Durdin <marc@durdin.net>
@srl295 srl295 force-pushed the chore/resources/7411-ldmlupdate-epic-ldml branch from b09b63b to b5f6ff9 Compare October 19, 2022 20:38
- also fix ${JQ} from $(JQ)
@srl295 srl295 force-pushed the chore/resources/7411-ldmlupdate-epic-ldml branch from b5f6ff9 to b30af3f Compare October 19, 2022 20:40
update from 425f591aaa2abbd0016d33a09b967ae7f4847414

PR: unicode-org/cldr#2469
@srl295 srl295 requested a review from mcdurdin October 19, 2022 20:41
Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

echo "${xsd} -> ${json}"
(cd .. ; npx -p jgexml xsd2json techpreview/"${xsd}" techpreview/"${json}") || exit
echo 'fixup-schema.js' "${json}"
node fixup-schema.js "${json}" || die "failed to fixup schema ${json}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically we don't need die here because of set -e, but LGTM anyway

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

Co-authored-by: Marc Durdin <marc@durdin.net>
@srl295 srl295 merged commit be63384 into feature-ldml Oct 20, 2022
@srl295 srl295 deleted the chore/resources/7411-ldmlupdate-epic-ldml branch October 20, 2022 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants