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

chore: Full support i18n (i18next) excluding localization services #977

Closed
wants to merge 19 commits into from

Conversation

Xambey
Copy link

@Xambey Xambey commented Oct 8, 2019

I implemented full localization support based on the i18next plugin. Two languages are currently supported:

  • English
  • Russian

P.S For verification, don't forget to clear localstorage

Andrey Panasenko added 14 commits September 25, 2019 15:04
- Updated react version (for support react-i18next)
- Updated build.sh script
-Has unfixed problems with editor styles
Release i18n localization

See merge request platform/GUI/graphiql!1
Revert "Merge branch 'i18n-http-backend' into 'master'"

See merge request platform/GUI/graphiql!2
# Conflicts:
#	packages/graphiql-examples/index.html
#	packages/graphiql-examples/package.json
#	packages/graphiql/locales/en/Toolbar.json
#	packages/graphiql/locales/en/translation.json
#	packages/graphiql/locales/ru/Toolbar.json
#	packages/graphiql/locales/ru/translation.json
#	packages/graphiql/package.json
#	packages/graphiql/resources/build.sh
#	packages/graphiql/src/components/DocExplorer.js
#	packages/graphiql/src/components/ExecuteButton.js
#	packages/graphiql/src/components/GraphiQL.js
#	packages/graphiql/src/components/HistoryQuery.js
#	packages/graphiql/src/components/QueryHistory.js
#	packages/graphiql/src/components/ToolbarButton.js
#	packages/graphiql/src/i18n.js
#	yarn.lock
Revert "Merge branch 'i18n-codemirror-graphql'"

See merge request platform/GUI/graphiql!4
@Xambey
Copy link
Author

Xambey commented Oct 8, 2019

image

@acao
Copy link
Member

acao commented Oct 8, 2019

@Xambey this PR is awesome and super welcome! l18n was on our ad-hoc roadmap for GraphiQL 0.x.y and so this is a big chunk you just bit out of it!

Sorry for all the code changes in the last two weeks, looking at the diff briefly it looks like you got almost everything. If you need to do a git pull origin master its ok to have merge commits in the tree. One thing i see now is babel-plugin-inline-json-import is not found, so try re-running yarn with --force to ensure it resolves everything in all the package.json files in the workspace to a new write of the lockfile. And the latest upstream diff is probably just about appending all commas rather than es5.

Once you're ready to squash these commits, I'll make them into a feat: message that will kick out new minor versions of all the effected packages.

- babel-plugin-inline-json-import returned
@acao
Copy link
Member

acao commented Oct 19, 2019

@Xambey do you have time to finish this? If not, I can re-create the PR and pull in the upstream changes, and then if i @ you in the commit messages you'll get contribution credit, is that O.K?

@acao
Copy link
Member

acao commented Oct 19, 2019

@IvanGoncharov check this out! maybe you can help us with a Ukrainian translation as well when you get a chance?

@Xambey
Copy link
Author

Xambey commented Oct 19, 2019

@acao I remember about this PR and i hope to have time to fix all conflicts today / tomorrow. If I don’t have time to do everything today/tomorrow, then I dont mind if you correct them. I have a lot of work right now (10-12 hours 6/7) and there is no time to solve all the problems on weekdays, this PR was also done as part of the work assignment

@acao
Copy link
Member

acao commented Oct 19, 2019

@Xambey ok thanks! yeah if you can't get to it no big worries, i know what that's like. My job doesn't even sponsor my OSS work yet, haha! If in 48 hours you haven't been able to get to it I'll get it merged, because this is a huge win for us! Again, thanks for doing this!

# Conflicts:
#	.eslintignore
#	jest.config.js
#	package.json
#	packages/codemirror-graphql/package.json
#	packages/examples/graphiql-cdn/graphiql.css
#	packages/examples/graphiql-cdn/graphiql.js
#	packages/graphiql/package.json
#	packages/graphiql/src/components/DocExplorer/SearchBox.js
#	packages/graphiql/src/components/DocExplorer/TypeLink.js
#	packages/graphiql/src/components/GraphiQL.js
#	packages/graphiql/src/components/__tests__/GraphiQL.spec.js
#	packages/graphiql/src/utility/mergeAst.js
#	packages/graphql-language-service-interface/package.json
#	packages/graphql-language-service-interface/src/GraphQLLanguageService.ts
#	packages/graphql-language-service-interface/src/getAutocompleteSuggestions.ts
#	packages/graphql-language-service-interface/src/getDiagnostics.ts
#	packages/graphql-language-service-interface/src/getHoverInformation.ts
#	packages/graphql-language-service-interface/src/getOutline.ts
#	packages/graphql-language-service-parser/package.json
#	packages/graphql-language-service-server/package.json
#	packages/graphql-language-service-server/src/GraphQLCache.js
#	packages/graphql-language-service-server/src/__tests__/GraphQLCache-test.js
#	packages/graphql-language-service-utils/package.json
#	packages/graphql-language-service-utils/src/Range.ts
#	packages/graphql-language-service-utils/src/validateWithCustomRules.ts
#	packages/graphql-language-service/package.json
#	resources/runTests.js
#	resources/util.js
#	yarn.lock
Merge remote-tracking branch 'origin/master'

# Conflicts:
#	.eslintignore
#	jest.config.js
#	package.json
#	packages/codemirror-graphql/package.json
#	packages/examples/graphiql-cdn/graphiql.css
#	packages/examples/graphiql-cdn/graphiql.js
#	packages/graphiql/package.json
#	packages/graphiql/src/components/DocExplorer/SearchBox.js
#	packages/graphiql/src/components/DocExplorer/TypeLink.js
#	packages/graphiql/src/components/GraphiQL.js
#	packages/graphiql/src/components/__tests__/GraphiQL.spec.js
#	packages/graphiql/src/utility/mergeAst.js
#	packages/graphql-language-service-interface/package.json
#	packages/graphql-language-service-interface/src/GraphQLLanguageService.ts
#	packages/graphql-language-service-interface/src/getAutocompleteSuggestions.ts
#	packages/graphql-language-service-interface/src/getDiagnostics.ts
#	packages/graphql-language-service-interface/src/getHoverInformation.ts
#	packages/graphql-language-service-interface/src/getOutline.ts
#	packages/graphql-language-service-parser/package.json
#	packages/graphql-language-service-server/package.json
#	packages/graphql-language-service-server/src/GraphQLCache.js
#	packages/graphql-language-service-server/src/__tests__/GraphQLCache-test.js
#	packages/graphql-language-service-utils/package.json
#	packages/graphql-language-service-utils/src/Range.ts
#	packages/graphql-language-service-utils/src/validateWithCustomRules.ts
#	packages/graphql-language-service/package.json
#	resources/runTests.js
#	resources/util.js
#	yarn.lock
@Xambey
Copy link
Author

Xambey commented Oct 20, 2019

@acao everything seems to work, but there may be a problem with not working prompts when entering the editor. This was sometimes observed when building with a locally assembled codemirror-graphql package, please fix it, i don't understand why

@acao
Copy link
Member

acao commented Oct 20, 2019 via email

@acao
Copy link
Member

acao commented Oct 21, 2019

@Xambey when you refer to non-working prompts, which prompts are you referring to?

@acao
Copy link
Member

acao commented Oct 21, 2019

thanks so much for all your work on this @Xambey! this is quite a huge diff it looks like, with a lot of unrelated changes, so I will turn this into a PR that's just the excellent translation/react-i18n work you've done here soon, possibly after we officially drop React 15 support and can adopt hooks? just a few PRs down the line I was planning for that.

would love to have your help on some of the other issues this PR addresses soon as well, however with such a widely used project, our changelog needs to be very punctuated and iterative. as @leebyron has instructed, and @IvanGoncharov would agree, and part of what has made the official graphql ecosystem so successful, is, "One step at a time, ship often and prosper"

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

Successfully merging this pull request may close these issues.

2 participants