ladybird/Meta
Timothy Flynn 1f546476d5 LibJS+LibUnicode: Fix computation of compact pattern exponents
The compact scale of each formatting rule was precomputed in commit:
be69eae651

Using the formula: compact scale = magnitude - pattern scale

This computation was off-by-one.

For example, consider the format key "10000-count-one", which maps to
"00 thousand" in en-US. What we are really after is the exponent that
best represents the string "thousand" for values greater than 10000
and less than 100000 (the next format key). We were previously doing:

    log10(10000) - "00 thousand".count("0") = 2

Which clearly isn't what we want. Instead, if we do:

    log10(10000) + 1 - "00 thousand".count("0") = 3

We get the correct exponent for each format key for each locale.

This commit also renames the generated variable from "compact_scale" to
"exponent" to match the terminology used in ECMA-402.
2021-11-16 00:56:55 +00:00
..
Azure Meta: Run IPC magic number linter during CI and pre-commit 2021-11-05 00:17:01 +03:30
CMake LibUnicode: Ensure UnicodeNumberFormat is aware of default content 2021-11-13 11:52:45 +00:00
HeaderCheck HeaderCheck: It checks some of your headers 2021-10-20 09:20:18 +01:00
Lagom LibJS+LibUnicode: Fix computation of compact pattern exponents 2021-11-16 00:56:55 +00:00
ShellCompletions/zsh Meta: Add basic Zsh completions for serenity.sh 2021-04-22 09:55:48 +02:00
Websites Websites: Import serenityos.org website changes 2021-10-30 17:42:26 +02:00
bochsrc Meta: Increase RAM amount for Bochs 2021-06-25 15:19:09 +02:00
build-image-extlinux.sh Meta: Fix syslinux detection on Arch Linux 2021-07-20 15:12:19 +02:00
build-image-grub.sh Meta: Run 'du' with '--apparent-size', except on macOS 2021-05-16 22:50:46 +01:00
build-image-qemu.sh Meta: Assume and find GNU du 2021-08-18 10:59:50 +02:00
build-manpages-website.sh man.serenityos.org: Make section titles more descriptive 2021-10-22 19:49:28 +03:00
build-root-filesystem.sh Kernel: Write test that crashes ProcFS 2021-10-31 18:44:12 +01:00
check-ak-test-files.sh Meta: Remove unnecessary -i 2021-11-02 12:23:30 +01:00
check-debug-flags.sh Meta: Use grep -E/F, not grep -P 2021-11-02 12:23:30 +01:00
check-markdown.sh Meta: Run check-markdown as part of 'Azure Linux NoFuzz' 2021-10-10 15:18:55 -07:00
check-newlines-at-eof.py Tests: Add regression tests for the LibCpp preprocessor 2021-08-14 12:40:55 +02:00
check-style.py Meta: Reimplement license checker in python 2021-10-27 11:35:47 -07:00
check-symbols.sh CI: Don't fail check-symbols if symbol is defiend somewhere else 2021-03-19 22:55:53 +01:00
check-syscall-lists.sh Meta: Use grep -E/F, not grep -P 2021-11-02 12:23:30 +01:00
convert-markdown-links.lua man.serenityos.org: Fix links to man(1), avoid unnecessary shells 2021-10-22 19:49:28 +03:00
debug-kernel.sh Meta: Set SERENITY_ARCH if it is not set in debug-kernel.sh 2021-09-17 09:16:40 +00:00
export-argsparser-manpages.sh Meta: Check auto-generated manpages for completeness on CI 2021-11-01 21:12:58 +01:00
extlinux.conf Kernel: Separate framebuffers from bootmode 2021-10-25 23:38:28 +02:00
generate-embedded-resource-assembly.sh Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
generate-libwasm-spec-test.py Meta: Implement support for the "unlinkable" Wasm spectest assertion 2021-08-30 22:47:02 +02:00
generate-libwasm-spec-test.sh Meta: Run the Wasm spec tests in CI 2021-05-27 17:28:41 +04:30
grub-ebr.cfg Kernel: Separate framebuffers from bootmode 2021-10-25 23:38:28 +02:00
grub-gpt.cfg Kernel: Separate framebuffers from bootmode 2021-10-25 23:38:28 +02:00
grub-mbr.cfg Kernel: Separate framebuffers from bootmode 2021-10-25 23:38:28 +02:00
install-ports-tree.sh Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR 2021-04-20 15:27:52 +02:00
lint-ci.sh Meta: Remove useless lint-ipc-ids.sh script 2021-11-05 00:17:01 +03:30
lint-clang-format.sh Meta: Adhere to latest ScriptCheck standards (SC2268) 2021-11-02 12:23:30 +01:00
lint-commit.sh Meta: Use grep -E/F, not grep -P 2021-11-02 12:23:30 +01:00
lint-executable-resources.sh Meta: Add special case for macOS 2021-11-02 12:23:30 +01:00
lint-keymaps.py Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
lint-missing-resources.sh Meta: Use grep -E/F, not grep -P 2021-11-02 12:23:30 +01:00
lint-ports.py Meta: Update lint-ports.py for the SerenityPorts move 2021-08-30 20:49:37 +02:00
lint-prettier.sh Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
lint-python.sh Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
lint-shell-scripts.sh Meta: Add a check to ensure grep -P stays gone 2021-11-02 12:23:30 +01:00
new-project.sh Meta: Add new-project.sh :^) 2021-08-13 21:12:17 +04:30
refresh-serenity-qtcreator.sh Meta: Make QtCreator aware of all CMake files 2021-09-15 20:21:19 +00:00
run.sh Kernel: Separate framebuffers from bootmode 2021-10-25 23:38:28 +02:00
screenshot-000ccc0.png Meta: Update ReadMe with a new screenshot. :^) 2019-02-12 15:47:37 +01:00
screenshot-0f85753.png Meta: Update the screenshot in the ReadMe :^) 2021-04-04 09:57:36 +02:00
screenshot-8ea4375.png Meta: Time for a new screenshot! :^) 2020-06-02 19:29:31 +02:00
screenshot-1133aca.png Meta: Time for a new screenshot (Quake edition) :^) 2019-11-06 21:51:33 +01:00
screenshot-9145a72.png Meta: Time for a new screnshot! :^) 2019-09-18 12:15:02 +02:00
screenshot-23263aa.png Meta: Update ReadMe with a new screenshot :^) 2019-02-27 13:17:43 +01:00
screenshot-191112e.png Meta: Time for a new screenshot to keep things fresh. :^) 2019-06-07 18:14:13 +02:00
screenshot-b5521e1.png Meta: Time for a new screenshot! :^) 2019-03-08 01:10:33 +01:00
screenshot-b36968c.png README+Meta: Update the screenshot :^) 2021-08-18 14:27:37 +02:00
screenshot-cdb82f6.png Meta: Tweak ReadMe and add a new screenshot. 2019-03-20 15:52:37 +01:00
screenshot-d727005.png Meta: Tweak ReadMe and add a new screenshot. 2019-04-30 15:27:35 +02:00
screenshot-ef9fbef.png Meta: Time for a new screenshot :^) 2019-04-06 01:31:12 +02:00
screenshot-f8fc892.png Add a little ReadMe. 2019-02-08 11:06:34 +01:00
serenity.sh Meta: Don't check for toolchain if serenity.sh target is lagom 2021-11-02 11:09:05 +01:00
serenity_gdb.py Meta: Update the gdb script for the new RefPtr layout 2021-11-12 13:01:59 +00:00
text-to-cpp-string.sh Meta: Use a bash shebang for text-to-cpp-string.sh 2021-01-22 18:41:08 +01:00
tweet-commits.js Meta: Ensure long messages fit in commit tweet 2021-06-18 13:34:17 +01:00