Update comment about maximum number of server locales
This commit is contained in:
parent
2816b2f06f
commit
d37d191811
1 changed files with 3 additions and 3 deletions
|
@ -1,13 +1,13 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// Copyright 2021-2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// We ["MUST NOT generate more than three digits after the decimal point"][0]. We use a
|
||||
// space-efficient algorithm that runs out of digits after 28 languages. This should be
|
||||
// fine for most users and [the server doesn't parse more than 15 languages, at least
|
||||
// for badges][1].
|
||||
// in some cases][1].
|
||||
//
|
||||
// [0]: https://httpwg.org/specs/rfc7231.html#quality.values
|
||||
// [1]: https://github.com/signalapp/Signal-Server/blob/d2bc3c736080c3d852c9e88af0bffcb6632d9975/service/src/main/java/org/whispersystems/textsecuregcm/badges/ConfiguredProfileBadgeConverter.java#L29
|
||||
// [1]: https://github.com/signalapp/Signal-Server/blob/bf6d3aa32407ff52b5547ed6ce2e7a2f2bbb0f03/service/src/main/java/org/signal/i18n/HeaderControlledResourceBundleLookup.java#L19
|
||||
const MAX_LANGUAGES_TO_FORMAT = 28;
|
||||
|
||||
export function formatAcceptLanguageHeader(
|
||||
|
|
Loading…
Reference in a new issue