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

En-GB language support #562

Closed
glintik opened this issue Sep 16, 2017 · 14 comments
Closed

En-GB language support #562

glintik opened this issue Sep 16, 2017 · 14 comments

Comments

@glintik
Copy link
Contributor

glintik commented Sep 16, 2017

Hi,

How about adding en-GB locale support?

@leshakoss
Copy link
Contributor

@glintik It would be welcome 😊

I had made a guide how to add a locale with the same language as another locale: https://github.com/date-fns/date-fns/blob/master/docs/i18nContributionGuide.md#creating-a-locale-with-the-same-language-as-another-locale

@glintik
Copy link
Contributor Author

glintik commented Sep 16, 2017

Hi @leshakoss,

Thank you for guide. I see an example with locale en-GB in this article, is it not in master yet?

@leshakoss
Copy link
Contributor

@glintik no, there is no such locale in date-fns at the time. The example code is made up for the guide

@glintik
Copy link
Contributor Author

glintik commented Sep 16, 2017

Ok, I'll prepare one soon.

@glintik
Copy link
Contributor Author

glintik commented Sep 16, 2017

package.json looks as not ready to run module, any advise please on running build/tests?

@leshakoss
Copy link
Contributor

For tests, yarn test/npm test should work.

For building a package to test it in your project:

env PACKAGE_OUTPUT_PATH="$(pwd)/../PATH-TO-YOUR-MODULE/node_modules/date-fns" ./scripts/build/package.sh

@glintik
Copy link
Contributor Author

glintik commented Sep 16, 2017

I have run

env PACKAGE_OUTPUT_PATH="$(pwd)/../PATH-TO-YOUR-MODULE/node_modules/date-fns" ./scripts/build/package.sh

Got:

./scripts/build/package.sh: line 26: babel: command not found

Ok, install globally babel-cli:

sudo npm install -g babel-cli

Run again:

env PACKAGE_OUTPUT_PATH="$(pwd)/../PATH-TO-YOUR-MODULE/node_modules/date-fns" ./scripts/build/package.sh

Got an error:

ReferenceError: Unknown plugin "add-module-exports" specified in "/Users/glintik/Data/work/date-fns/.babelrc" at 0, attempted to resolve relative to "/Users/glintik/Data/work/date-fns"
    at /usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
    at Array.map (<anonymous>)

What I'm doing wrong?
OS X Sierra 10.12.6 (16G29)

@leshakoss
Copy link
Contributor

leshakoss commented Sep 16, 2017

@glintik did you install date-fns dev dependencies? I mean npm install in date-fns directory

@glintik
Copy link
Contributor Author

glintik commented Sep 16, 2017

That's I did at the first with no luck:

>npm i
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN Invalid version: "DON'T CHANGE; IT'S SET AUTOMATICALLY DURING DEPLOYMENT"
npm WARN date-fns No description
npm WARN date-fns No repository field.
npm WARN date-fns No README data
npm WARN date-fns No license field.

up to date in 0.077s

@leshakoss
Copy link
Contributor

@glintik oh. Please change "DON'T CHANGE; IT'S SET AUTOMATICALLY DURING DEPLOYMENT" in package.json to something version-like (e.g. "2.0.0") for now and run "npm install" again. It is indeed a bug. We'll fix it later

@glintik
Copy link
Contributor Author

glintik commented Sep 16, 2017

Now it works, tests are ok, thanks!

However, some outdated modules are found:

>npm i
npm WARN deprecated babel@6.23.0: In 6.x, the babel package has been deprecated in favor of babel-cli. Check https://opencollective.com/babel to support the Babel maintainers
npm WARN deprecated fs-promise@1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

@glintik
Copy link
Contributor Author

glintik commented Sep 16, 2017

Locale en-GB is prepared and sent in PR #563.

@leshakoss
Copy link
Contributor

Resolved by #563

@kossnocorp
Copy link
Member

@glintik oh. Please change "DON'T CHANGE; IT'S SET AUTOMATICALLY DURING DEPLOYMENT" in package.json to something version-like (e.g. "2.0.0") for now and run "npm install" again. It is indeed a bug. We'll fix it later

We use Yarn for development. I've adjusted the version so now it mentions it: 78bb0a7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants