open-index/open-npm huggingface dataset:
npm package: @mozilla/l10n
Description: Mozilla tools for localization
Author: Eemeli Aro
Latest version: 0.11.2

# @mozilla/l10n

This is a library of JavaScript tools and utilities for working with localization files,
primarily built for internal use at Mozilla.

It's being bootstrapped to fulfil the needs of the [Pontoon](https://pontoon.mozilla.org/) frontend,
and to match the behaviour of the Python [moz.l10n](https://pypi.org/project/moz.l10n/) library.

The data structures used by the library are defined by a
[JSON Schema](https://github.com/mozilla/moz-l10n/blob/main/schemas/message.json).

The library currently supports the following message pattern formats:

- `android`: Android string resources
- `fluent`: Fluent (without internal selectors)
- `mf2`: MessageFormat 2.0
- `plain`: Patterns without placeholders (used in multiple resource formats)
- `webext`: WebExtensions (messages.json)
- `xliff`: XLIFF 1.2, including XCode customizations

The tooling for `android` and `xliff` depends on `DOMParser`, `XMLSerializer`, and related classes
which are available in browser environments.
The parser for `fluent` depends on the `@fluent/syntax` package,
and the parser for `mf2` depends on the `messageformat` package.

## API

### parsePattern()

```js
import { ParseError, parsePattern } from '@mozilla/l10n'
```

```js
function parsePattern(
  format: 'android' | 'fluent' | 'mf2' | 'plain' | 'webext' | 'xliff',
  src: string,
  baseMsg?: Message
): Pattern

class ParseError extends Error {
  range?: [number, number]  // Set for fluent, mf2, and webext errors
}
```

Parse the string representation of a single flat message pattern into a data structure
([JSON Schema](https://github.com/mozilla/moz-l10n/blob/main/schemas/message.json)).

The `baseMsg` is required by `webext` for named placeholders.

If `onError` is undefined, errors are thrown.

### serializePattern()

```js
import { SerializeError, serializePattern } from '@mozilla/l10n'
```

```js
function serializePattern(
  format: 'android' | 'fluent' | 'mf2' | 'plain' | 'webext' | 'xliff',
  pattern: Pattern,
  onError?: (error: SerializeError) => void
): string

class SerializeError extends Error {
  pos?: number  // Set for fluent, plain, and webext errors
}
```

Serialize the data representation of a single flat message pattern into a string

If `onError` is undefined, errors are thrown.

### Types

```ts
import type {
  Message,
  PatternMessage,
  SelectMessage,
  Pattern,
  Expression,
  Markup
} from '@mozilla/l10n'
```

```ts
type Message = Pattern | PatternMessage | SelectMessage
type Pattern = (string | Expression | Markup)[]
```
npm package: @mozilla/raptor
Description: CLI tool for Firefox OS Gaia performance tests
Author: Eli Perelman
Latest version: 5.0.2

# raptor
### Performance testing for Firefox OS

## Documentation

For documentation and usage, please visit the [Raptor wiki](https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/Raptor) page on MDN.

## Contributing

To contribute to Raptor, please [file a bug on Bugzilla](https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20OS&component=Gaia::PerformanceTest) under the Firefox OS Gaia::PerformanceTest component.

## Maintainers

- Eli Perelman, [eli@mozilla.com](mailto:eli@mozilla.com), :Eli on Mozilla IRC
- Rob Wood, [rwood@mozilla.com](mailto:rwood@mozilla.com), :rwood on Mozilla IRC

# Support

For support related to Raptor, performance testing, or performance automation for Firefox OS, please reach out to a maintainer on Mozilla IRC in the #raptor channel.