• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / fx-private-relay / c0df5861-e71c-4488-aecd-23ab1ba4d8b9

20 Jan 2025 01:59AM CUT coverage: 85.092% (+0.02%) from 85.075%
c0df5861-e71c-4488-aecd-23ab1ba4d8b9

Pull #5323

circleci

web-flow
Bump the boto group with 7 updates

Bumps the boto group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [boto3](https://github.com/boto/boto3) | `1.35.97` | `1.36.2` |
| [boto3-stubs](https://github.com/youtype/mypy_boto3_builder) | `1.35.97` | `1.36.2` |
| [botocore-stubs](https://github.com/youtype/botocore-stubs) | `1.35.97` | `1.36.2` |
| [mypy-boto3-s3](https://github.com/youtype/mypy_boto3_builder) | `1.35.93` | `1.36.0` |
| [mypy-boto3-ses](https://github.com/youtype/mypy_boto3_builder) | `1.35.93` | `1.36.0` |
| [mypy-boto3-sns](https://github.com/youtype/mypy_boto3_builder) | `1.35.93` | `1.36.0` |
| [mypy-boto3-sqs](https://github.com/youtype/mypy_boto3_builder) | `1.35.93` | `1.36.0` |


Updates `boto3` from 1.35.97 to 1.36.2
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.35.97...1.36.2)

Updates `boto3-stubs` from 1.35.97 to 1.36.2
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

Updates `botocore-stubs` from 1.35.97 to 1.36.2
- [Release notes](https://github.com/youtype/botocore-stubs/releases)
- [Commits](https://github.com/youtype/botocore-stubs/commits)

Updates `mypy-boto3-s3` from 1.35.93 to 1.36.0
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

Updates `mypy-boto3-ses` from 1.35.93 to 1.36.0
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

Updates `mypy-boto3-sns` from 1.35.93 to 1.36.0
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

Updates `mypy-boto3-sqs` from 1.35.93 to 1.36.0
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/yout... (continued)
Pull Request #5323: Bump the boto group with 7 updates

2434 of 3561 branches covered (68.35%)

Branch coverage included in aggregate %.

16996 of 19273 relevant lines covered (88.19%)

9.92 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/frontend/src/components/waitlist/LocalePicker.tsx
1
import { SelectHTMLAttributes, useEffect, useState } from "react";
×
2
import { getLocale } from "../../functions/getLocale";
×
3
import { useL10n } from "../../hooks/l10n";
×
4

5
type LocaleDisplayNames = Record<string, string>;
6
type Languages = {
7
  main: Record<
8
    string,
9
    {
10
      localeDisplayNames: {
11
        languages: LocaleDisplayNames;
12
      };
13
    }
14
  >;
15
};
16
export type Props = SelectHTMLAttributes<HTMLSelectElement> & {
17
  supportedLocales: string[];
18
};
19
export const LocalePicker = ({ supportedLocales, ...selectProps }: Props) => {
×
20
  const l10n = useL10n();
×
21
  const currentLocale = getLocale(l10n);
×
22
  const [localeDisplayNames, setLocaleDisplayNames] =
23
    useState<LocaleDisplayNames>();
×
24

25
  useEffect(() => {
×
26
    importLanguages(currentLocale).then((localeDisplayNames) => {
×
27
      setLocaleDisplayNames(localeDisplayNames);
×
28
    });
29
  }, [currentLocale]);
30

31
  const options = Object.entries(localeDisplayNames ?? {})
×
32
    .sort(([_codeA, nameA], [_codeB, nameB]) => nameA.localeCompare(nameB))
×
33
    .filter(([code]) => supportedLocales.includes(code))
×
34
    .map(([code, name]) => (
35
      <option key={code} value={code}>
×
36
        {name}
37
      </option>
38
    ));
39

40
  return <select {...selectProps}>{options}</select>;
41
};
42

43
async function importLanguages(locale: string): Promise<LocaleDisplayNames> {
44
  try {
×
45
    const languages: Languages = await import(
×
46
      `cldr-localenames-modern/main/${locale}/languages.json`
×
47
    );
48
    return languages.main[locale].localeDisplayNames.languages;
×
49
  } catch (_e) {
50
    try {
×
51
      // cldr-localenames-modern doesn't include suffixed locale codes for
52
      // locales in their main territory (i.e. it only has `es`, not `es-ES`, or
53
      // `nl` but not `nl-NL`, or `sv` but not `sv-SE`), so try loading a
54
      // truncated version if the full version was not found:
55
      const truncatedLocale = locale.split("-")[0];
×
56
      const languages: Languages = await import(
×
57
        `cldr-localenames-modern/main/${truncatedLocale}/languages.json`
×
58
      );
59
      return languages.main[truncatedLocale].localeDisplayNames.languages;
×
60
    } catch (_e) {
61
      const languagesEn = await import(
×
62
        "cldr-localenames-modern/main/en/languages.json"
63
      );
64
      return languagesEn.main.en.localeDisplayNames.languages;
×
65
    }
66
  }
67
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc