@lovalingo/lovalingo 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -590,7 +590,10 @@ navigateRef, // For path mode routing
|
|
|
590
590
|
return null;
|
|
591
591
|
if (supportedLocales.includes(parts[0]))
|
|
592
592
|
return null; // already locale-prefixed
|
|
593
|
-
const
|
|
593
|
+
const pathWithoutLeadingSlashes = url.pathname.replace(/^\/+/, '');
|
|
594
|
+
const nextPathname = pathWithoutLeadingSlashes
|
|
595
|
+
? `/${locale}/${pathWithoutLeadingSlashes}`
|
|
596
|
+
: `/${locale}`;
|
|
594
597
|
return `${nextPathname}${url.search}${url.hash}`;
|
|
595
598
|
};
|
|
596
599
|
const ORIGINAL_HREF_KEY = 'data-Lovalingo-href-original';
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.18";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.0.
|
|
1
|
+
export const VERSION = "0.0.18";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovalingo/lovalingo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "React translation library with automatic routing, real-time AI translation, and zero-flash rendering. One-line language routing setup.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|