Skip to content

Commit

Permalink
Mark v1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbruxelles committed Jan 11, 2024
1 parent 1a21467 commit 70568c4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
> breaking changes and/or new features that you need to implement in your
> project.
## 1.4.2 (January 11, 2024)

- Fix fallback language selection logic. Before, when the `lang` option wasn't provided to the constructor, and there was no URL parameter, and the user hadn't yet selected/clicked (saved) a language, everything crashed. Now, the fallback language will be used in this case.
- Fix language selection logic about saved language.
- Slight performance improvement.
- Improve documentation and demo site.

## 1.4.1 (October, 2023)

- Ignore `data-si18n` attributes with no value.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "si18n.js",
"version": "1.4.1",
"version": "1.4.2",
"description": "A simple and lightweight way to integrate internationalization on a small web site project.",
"main": "./si18n.js",
"directories": {
Expand Down
4 changes: 2 additions & 2 deletions src/si18n.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @license si18n.js - v1.4.1
* @license si18n.js - v1.4.2
* Copyright (c) José dBruxelles <jd.bruxelles.dev/c>.
*
* This source code is licensed under the MIT license found in the
Expand All @@ -9,7 +9,7 @@
* Make translation management easier and more efficient.
*/
export default class Si18n {
static version = "1.4.1";
static version = "1.4.2";
#noop() {} // Empty function to avoid undefined paramaters.
#isInitialized = false;
#options = {
Expand Down
2 changes: 1 addition & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h1 data-si18n="good_morning"></h1>
&lt;!-- (?target=es2015|es2022|esnext) --&gt;
&lt;script type="module" src="https://esm.sh/si18n.js@latest"&gt;&lt;/script&gt;

&lt;script type="module" src="https://cdn.jsdelivr.net/npm/si18n.js@1.4.1/+esm"&gt;&lt;/script&gt;
&lt;script type="module" src="https://cdn.jsdelivr.net/npm/si18n.js@latest/+esm"&gt;&lt;/script&gt;

&lt;!-- UNPKG --&gt;
&lt;script type="module"&gt;
Expand Down

0 comments on commit 70568c4

Please sign in to comment.