Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split formatting i18n and i18n from main package #150

Open
pke opened this issue Mar 10, 2016 · 19 comments
Open

split formatting i18n and i18n from main package #150

pke opened this issue Mar 10, 2016 · 19 comments
Labels
impact: l10n Localization is adaptation [...] to meet the language, cultural, [...]. type: feature Introduction of new functionality.

Comments

@pke
Copy link

pke commented Mar 10, 2016

The lib comes in (minimized) at 115kb at the moment. Most of that is i18n text. Would it be possible to separate that from the core lib so we can require it on demand in projects?

@ypid ypid added type: feature Introduction of new functionality. impact: l10n Localization is adaptation [...] to meet the language, cultural, [...]. labels Mar 10, 2016
@ypid ypid added this to the All problems solved. milestone Mar 10, 2016
@ypid
Copy link
Member

ypid commented Mar 10, 2016

Sounds good. Should be possible and I am open for PRs.

@pke
Copy link
Author

pke commented Jul 27, 2016

Also as a first improvement we could make the "moment" package a peerDepencency and not a dependency. This would reduce this packages size when its compiled in a bundle like with webpack or browserify

@ypid
Copy link
Member

ypid commented Jul 27, 2016

@pke Sounds good. Thanks for the hint. I did not know peerDepencency before.

Does 1c29099 look good to you?

@pke
Copy link
Author

pke commented Jul 27, 2016

It should do the trick. I will try the branch later this week.

@pke
Copy link
Author

pke commented Aug 29, 2016

Did you update and publish a new version to npm? Current 3.4.0 does not contain the peerDependencies

@ypid
Copy link
Member

ypid commented Aug 29, 2016

I did not. If you want to help with that, check the v3.5.0 milestone 😉

@pke
Copy link
Author

pke commented Aug 29, 2016

Ah I see. Well that is way too much unsolved in there and I need a small bundle now. So I will go with my own for for now.
Good luck translating the lib to haxe, though :)

@ypid
Copy link
Member

ypid commented Aug 29, 2016

Thanks 😉

@ypid
Copy link
Member

ypid commented Feb 22, 2017

The i18n text has been moved to separate files in #198.

@ypid
Copy link
Member

ypid commented Mar 10, 2017

@pke Can you check if #198 solves this issue for you? All i18n are still included by default and you would need to come up with some way to make them optional or so.

@pke
Copy link
Author

pke commented Mar 10, 2017

I can try to strip out the locales with webpack. Whats the current folder structure? Where are the locales saved?

@pke
Copy link
Author

pke commented Mar 10, 2017

No, seems like the main opening_hours.js still contains all the locales. There is no way to strip them out that way.
Also its still using a different momentjs lib than my main program despite the fact that my package,json requires a newer momentjs version. Hmm

@ypid
Copy link
Member

ypid commented Mar 11, 2017

No, seems like the main opening_hours.js still contains all the locales. There is no way to strip them out that way.

You will need to build your own opening_hours.js. The repo does not ship with opening_hours.js anymore. (But NPM packages will).

@pke
Copy link
Author

pke commented Mar 11, 2017

I'm using the npm version. Can't build it myself

@ypid
Copy link
Member

ypid commented Mar 11, 2017

The idea is that the NPM package ships with both the universal opening_hours.js and ES6 files/modules which can be included directly.

@pke
Copy link
Author

pke commented Mar 11, 2017

But it doesn't. or at least I don't see it.

@ypid
Copy link
Member

ypid commented Mar 11, 2017

True, it has not been released yet and it is not yet clear to me if there is anything to watch out for when including ES6 files alongside and how to include them then.

@pke
Copy link
Author

pke commented Dec 7, 2019

I am no longer using this lib, so I am cleaning up my open issues.

@pke pke closed this as completed Dec 7, 2019
@ypid
Copy link
Member

ypid commented Dec 8, 2019

@pke Just because you don’t use this lib anymore does not mean that you have to close valid issues you reported ;-) Reopening.

For reference, you probably switched to https://github.com/pke/simple-opening-hours. I guess such info is always interested for others reading this.

@ypid ypid reopened this Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: l10n Localization is adaptation [...] to meet the language, cultural, [...]. type: feature Introduction of new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants