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

i18n-js

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18n-js - npm Package Compare versions

Comparing version 3.3.0 to 3.5.0

3

app/assets/javascripts/i18n.js

@@ -900,3 +900,3 @@ // I18n.js

// %H - Hour of the day, 24-hour clock (00..23)
// %-H - Hour of the day, 24-hour clock (0..23)
// %-H/%k - Hour of the day, 24-hour clock (0..23)
// %I - Hour of the day, 12-hour clock (01..12)

@@ -965,2 +965,3 @@ // %-I/%l - Hour of the day, 12-hour clock (1..12)

format = format.replace("%-H", hour);
format = format.replace("%k", hour);
format = format.replace("%I", padding(hour12));

@@ -967,0 +968,0 @@ format = format.replace("%-I", hour12);

@@ -21,2 +21,34 @@ # Change Log

## [3.5.0] - 2019-11-12
### Added
- [JS] Support for `%k` strftime format to match Ruby strftime
(PR: https://github.com/fnando/i18n-js/pull/554)
## [3.4.2] - 2019-11-11
### Fixed
- [Ruby] Fix regression introduced in PR #551
(PR: https://github.com/fnando/i18n-js/pull/555)
## [3.4.1] - 2019-11-01
### Fixed
- [Ruby] Fix merging of plural keys to work with fallbacks that aren't overridden
(PR: https://github.com/fnando/i18n-js/pull/551)
## [3.4.0] - 2019-10-15
### Added
- [Ruby] Allow `prefix` to be added to generated translations files
(PR: https://github.com/fnando/i18n-js/pull/549)
## [3.3.0] - 2019-06-06

@@ -26,3 +58,4 @@

- Support for `%P`, `%Z`, and `%l` strftime formats to match Ruby strftime
- [JS] Support for `%P`, `%Z`, and `%l` strftime formats to match Ruby strftime
(PR: https://github.com/fnando/i18n-js/pull/537)

@@ -34,3 +67,3 @@

- Allow rails 6 to be used with this gem
- [Ruby] Allow rails 6 to be used with this gem
(PR: https://github.com/fnando/i18n-js/pull/536)

@@ -406,3 +439,7 @@

[Unreleased]: https://github.com/fnando/i18n-js/compare/v3.3.0...HEAD
[Unreleased]: https://github.com/fnando/i18n-js/compare/v3.5.0...HEAD
[3.5.0]: https://github.com/fnando/i18n-js/compare/v3.4.2...v3.5.0
[3.4.2]: https://github.com/fnando/i18n-js/compare/v3.4.1...v3.4.2
[3.4.1]: https://github.com/fnando/i18n-js/compare/v3.4.0...v3.4.1
[3.4.0]: https://github.com/fnando/i18n-js/compare/v3.3.0...v3.4.0
[3.3.0]: https://github.com/fnando/i18n-js/compare/v3.2.3...v3.3.0

@@ -409,0 +446,0 @@ [3.2.3]: https://github.com/fnando/i18n-js/compare/v3.2.2...v3.2.3

{
"name": "i18n-js",
"version": "3.3.0",
"version": "3.5.0",
"description": "A javascript library similar to Ruby on Rails i18n gem",

@@ -5,0 +5,0 @@ "author": "Nando Vieira",

# I18n.js
[![Gem Version](http://img.shields.io/gem/v/i18n-js.svg?style=flat-square)](http://badge.fury.io/rb/i18n-js)
[![npm](https://img.shields.io/npm/v/i18n-js.svg?style=flat-square)](https://www.npmjs.com/package/i18n-js)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)

@@ -11,2 +12,4 @@

> The above badges are generated by https://shields.io/
It's a small library to provide the Rails I18n translations on the JavaScript.

@@ -249,2 +252,23 @@

### Adding a line at the beginning of the translations file (useful for imports)
Setting the `prefix: "import I18n from 'i18n-js';\n"` option will add the line at the beggining of the resultant translation file.
This can be useful to use this gem with the [i18n-js](https://www.npmjs.com/package/i18n-js) npm package, which is quite useful to use it with webpack.
The user should provide the semi-colon and the newline character if needed.
For example:
```yaml
translations:
- file: "public/javascripts/i18n/translations.js"
prefix: "import I18n from 'i18n-js';\n"
```
will create:
```
import I18n from 'i18n-js';
I18n.translations || (I18n.translations = {});
#### Pretty Print

@@ -604,3 +628,3 @@

%H - Hour of the day, 24-hour clock (00..23)
%-H - Hour of the day, 24-hour clock (0..23)
%-H/%k - Hour of the day, 24-hour clock (0..23)
%I - Hour of the day, 12-hour clock (01..12)

@@ -607,0 +631,0 @@ %-I/%l - Hour of the day, 12-hour clock (1..12)

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