Comments (8)
Oh, that’s weird… there are tests for it and it worked..🤔 https://github.com/sveltekit-i18n/base/blob/master/tests/specs/index.spec.ts#L138
i’ll look at it again soon..!
from lib.
@jarda-svoboda Thank you so much, I can confirm it works. :)
Hopefully we can expect #55 soon to disable the many warnings.
from lib.
Hi @dewrano!
Currently there is no way how to disable the sanitizer, but you have probably found a bug. This lib should work even without standard locales - in that case should only warn and use lower-cased form of the input locale.
I'll try to fix this in the next couple of days, thanks.)
from lib.
Ok, this does not yield any error https://github.com/sveltekit-i18n/base/blob/a5df0f1c63b23504e7dbcbe7a62461f573a78149/src/utils.ts#L32 for ku
locale, so sanitized locale is undefined
...
Definitely needs to be fixed.
from lib.
Will be included in [email protected]
and @sveltekit-i18n/[email protected]
from lib.
@jarda-svoboda Thank you for the quick response. I've updated to 2.1.3 and now I see new warnings, but I still can't seem to get it to work. When I print out locales
, it returns undefined
for ku
. See attached screenshot.
from lib.
It seems it already works on server side, but still does not work on client for some reason...
server:
client:
from lib.
It seems there is a difference between Node's and JS's Intl
so that's probably the reason why all tests were passing for ku
locale.
Anyway now it's fixed and it works on client as well in [email protected]
and @sveltekit-i18n/[email protected]
from lib.
Related Issues (20)
- Setting the page direction to "rtl"
- Does this library support cultures. Like en-uk and en-us? HOT 3
- Reasonable way to avoid locale resetting on preload? HOT 1
- Disabling localization for some routes
- error pages not translated when accessed in browser for the first time HOT 2
- Naming routes depending on selected locale HOT 8
- ICU format is not recognized HOT 2
- preprocess: preserveArrays do not work with string[] HOT 2
- Default locale flashes when reloading page HOT 3
- Adding log when no translation is found in provided local/fallback HOT 5
- Manage locals with same key HOT 3
- zu locale is non-standard HOT 2
- 'cy' locale is non-standard. HOT 1
- Dynamic translations inside each HOT 3
- Translations are not rendered during SSR HOT 3
- Error with Svelte 5.0.0, can't install package. HOT 2
- TS2353: Object literal may only specify known properties, and '<field>' does not exist in type 'PayloadDefault'. HOT 1
- Attribute `lang` not change HOT 4
- Advanced router (default locale no prefix) with static adapter? HOT 2
- Can't load translations correctly from .ts file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lib.