Skip to content

Commit

Permalink
@fluent/langneg 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stasm committed Jul 25, 2019
1 parent d2e2524 commit 34f7c0f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion fluent-langneg/.esdoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": "./src",
"destination": "../html/fluent-langneg",
"destination": "../html/langneg",
"plugins": [
{
"name": "esdoc-standard-plugin"
Expand Down
4 changes: 2 additions & 2 deletions fluent-langneg/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fluent-langneg.js
compat.js
/index.js
/compat.js
4 changes: 4 additions & 0 deletions fluent-langneg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## @fluent/langneg 0.3.0 (July 25, 2019)

- Rename `fluent-langneg` to `@fluent/langneg`.

## fluent-langneg 0.3.0 (July 25, 2019)

- Deprecate `fluent-langneg` in favor of `@fluent/langneg`.
Expand Down
21 changes: 10 additions & 11 deletions fluent-langneg/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# fluent-langneg
# @fluent/langneg

`fluent-langneg` is an API for negotiating languages. It's part of
Project Fluent, a localization framework designed to unleash
the expressive power of the natural language.
`@fluent/langneg` is an API for negotiating languages. It's part of Project
Fluent, a localization framework designed to unleash the expressive power of
the natural language.

It's main function is to provide functionality around the
[Intl.Locale][] API with a focus
on language negotiation, matching and selection.
It's main function is to provide functionality around the [Intl.Locale][] API
with a focus on language negotiation, matching and selection.


## Installation

`fluent-langneg` can be used both on the client-side and the server-side.
`@fluent/langneg` can be used both on the client-side and the server-side.
You can install it from the npm registry or use it as a standalone script.

npm install fluent-langneg
npm install @fluent/langneg


## How to use

```javascript
import { negotiateLanguages } from 'fluent-langneg';
import { negotiateLanguages } from '@fluent/langneg';

const supportedLocales = negotiateLanguages(
navigator.languages, // requested locales
Expand All @@ -30,7 +29,7 @@ const supportedLocales = negotiateLanguages(
```

The API reference is available at
https://projectfluent.org/fluent.js/fluent-langneg.
https://projectfluent.org/fluent.js/langneg.

## Strategies

Expand Down
8 changes: 4 additions & 4 deletions fluent-langneg/makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PACKAGE := fluent-langneg
PACKAGE := @fluent/langneg
GLOBAL := FluentLangNeg

include ../common.mk

build: $(PACKAGE).js compat.js
build: index.js compat.js

$(PACKAGE).js: $(SOURCES)
index.js: $(SOURCES)
@rollup $(CURDIR)/src/index.js \
--config $(ROOT)/bundle_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
Expand All @@ -24,6 +24,6 @@ compat.js: $(SOURCES)
@echo -e " $(OK) $@ built"

clean:
@rm -f $(PACKAGE).js compat.js
@rm -f index.js compat.js
@rm -rf .nyc_output coverage
@echo -e " $(OK) clean"
4 changes: 2 additions & 2 deletions fluent-langneg/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fluent-langneg",
"name": "@fluent/langneg",
"description": "Language Negotiation API for Fluent",
"version": "0.3.0",
"homepage": "https://projectfluent.org",
Expand All @@ -18,7 +18,7 @@
"directories": {
"lib": "./src"
},
"main": "./fluent-langneg.js",
"main": "./index.js",
"module": "./src/index.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit 34f7c0f

Please sign in to comment.