Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lion/localize

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/localize - npm Package Compare versions

Comparing version 0.16.1 to 0.17.0

docs/assets/all-locales.js

14

CHANGELOG.md
# Change Log
## 0.17.0
### Minor Changes
- f3e54c56: Publish documentation with a format for Rocket
- 5db622e9: BREAKING: Align exports fields. This means no more wildcards, meaning you always import with bare import specifiers, extensionless. Import components where customElements.define side effect is executed by importing from '@lion/package/define'. For multi-component packages this defines all components (e.g. radio-group + radio). If you want to only import a single one, do '@lion/radio-group/define-radio' for example for just lion-radio.
### Patch Changes
- Updated dependencies [f3e54c56]
- Updated dependencies [5db622e9]
- @lion/core@0.15.0
- singleton-manager@1.4.0
## 0.16.1

@@ -4,0 +18,0 @@

14

package.json
{
"name": "@lion/localize",
"version": "0.16.1",
"version": "0.17.0",
"description": "The localization system helps to manage localization data split into locales and automate its loading",

@@ -27,7 +27,7 @@ "license": "MIT",

"scripts": {
"custom-elements-manifest": "custom-elements-manifest analyze --litelement --exclude 'docs/**/*' 'test-helpers/**/*'",
"debug": "cd ../../ && npm run debug -- --group localize",
"debug:firefox": "cd ../../ && npm run debug:firefox -- --group localize",
"debug:webkit": "cd ../../ && npm run debug:webkit -- --group localize",
"prepublishOnly": "../../scripts/npm-prepublish.js && npm run custom-elements-manifest",
"publish-docs": "node ../../packages-node/publish-docs/src/cli.js --github-url https://github.com/ing-bank/lion/ --git-root-dir ../../ --copy-dir docs/docs/systems/localize/assets",
"prepublishOnly": "npm run publish-docs",
"test": "cd ../../ && npm run test:browser -- --group localize"

@@ -38,4 +38,4 @@ },

"@bundled-es-modules/message-format": "6.0.4",
"@lion/core": "0.14.1",
"singleton-manager": "1.3.0"
"@lion/core": "0.15.0",
"singleton-manager": "1.4.0"
},

@@ -50,7 +50,7 @@ "keywords": [

},
"customElementsManifest": "custom-elements.json",
"exports": {
".": "./index.js",
"./test-helpers": "./test-helpers.js"
"./test-helpers": "./test-helpers/index.js",
"./docs/": "./docs/"
}
}

@@ -1,11 +0,3 @@

[//]: # 'AUTO INSERT HEADER PREPUBLISH'
# Systems >> Localize >> Overview ||10
# Localize
```js script
export default {
title: 'Localize/Intro',
};
```
Is meant to translate text into multiple languages.

@@ -20,16 +12,14 @@ In it's simplest form it is a function that returns the translated text for a namespace + key.

Further examples can be seen at [Features Overview Demo](?path=/docs/localize-features-overview--as-function) and a more in depth description can be found at [Localize System Overview](?path=/docs/localize-system-overview--page).
Further examples and a more in depth description can be found at the [Features Page](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/docs/systems/localize/features.md).
## Content
| Feature | Description |
| --------------------------------------------------------------------- | --------------------------------------------- |
| [Translate Text](?path=/docs/localize-features-overview--as-function) | Load and translate text in multiple languages |
| [Format Numbers](?path=/docs/localize-numbers--formatting) | Format numbers in multiple languages |
| [Format Dates](?path=/docs/localize-dates--formatting) | Format dates in multiple languages |
| Feature | Description |
| ---------------------------------------- | --------------------------------------------- |
| [Translate Text](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/docs/systems/localize/text.md) | Load and translate text in multiple languages |
| [Format Numbers](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/docs/systems/localize/numbers.md) | Format numbers in multiple languages |
| [Format Dates](https://github.com/ing-bank/lion/blob/6f2b6f940a0875091f1d940f45f0cd32dffce9ac/docs/docs/systems/localize/dates.md) | Format dates in multiple languages |
## How to use
## Installation
### Installation
```bash

@@ -36,0 +26,0 @@ npm i --save @lion/localize

import { expect } from '@open-wc/testing';
import { localize } from '../../src/localize.js';
import { localizeTearDown } from '../../test-helpers.js';
import { localizeTearDown } from '../../test-helpers/index.js';

@@ -5,0 +5,0 @@ import { formatDate } from '../../src/date/formatDate.js';

import { expect } from '@open-wc/testing';
import { localize } from '../../src/localize.js';
import { localizeTearDown } from '../../test-helpers.js';
import { localizeTearDown } from '../../test-helpers/index.js';

@@ -5,0 +5,0 @@ import { getDateFormatBasedOnLocale } from '../../src/date/getDateFormatBasedOnLocale.js';

import { expect } from '@open-wc/testing';
import { parseDate } from '../../src/date/parseDate.js';
import { localizeTearDown } from '../../test-helpers.js';
import { localizeTearDown } from '../../test-helpers/index.js';
import { localize } from '../../src/localize.js';

@@ -5,0 +5,0 @@

@@ -5,3 +5,3 @@ import { expect, oneEvent, aTimeout } from '@open-wc/testing';

import { fetchMock } from '@bundled-es-modules/fetch-mock';
import { setupFakeImport, resetFakeImport, fakeImport } from '../test-helpers.js';
import { setupFakeImport, resetFakeImport, fakeImport } from '../test-helpers/index.js';

@@ -8,0 +8,0 @@ import { LocalizeManager } from '../src/LocalizeManager.js';

@@ -21,3 +21,3 @@ import { isDirective, LitElement } from '@lion/core';

setupFakeImport,
} from '../test-helpers.js';
} from '../test-helpers/index.js';

@@ -24,0 +24,0 @@ /**

import { expect } from '@open-wc/testing';
import { localize } from '../../src/localize.js';
import { formatNumber } from '../../src/number/formatNumber.js';
import { localizeTearDown } from '../../test-helpers.js';
import { localizeTearDown } from '../../test-helpers/index.js';

@@ -6,0 +6,0 @@ // TODO: This is broken only in Safari 13.1.2 Wait till ci is on 13.1.3 and remove

import { expect } from '@open-wc/testing';
import { localize } from '../../src/localize.js';
import { localizeTearDown } from '../../test-helpers.js';
import { localizeTearDown } from '../../test-helpers/index.js';
import { formatNumberToParts } from '../../src/number/formatNumberToParts.js';

@@ -5,0 +5,0 @@

import { expect } from '@open-wc/testing';
import { localizeTearDown } from '../../test-helpers.js';
import { localizeTearDown } from '../../test-helpers/localizeTearDown.js';
import { getCurrencyName } from '../../src/number/getCurrencyName.js';

@@ -4,0 +4,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc