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

Default locale for all plugins #1443

Merged
merged 46 commits into from Apr 17, 2019

Conversation

Projects
None yet
2 participants
@arturi
Copy link
Collaborator

commented Apr 12, 2019

Remaining Todo for locale Packs

  • one glob for plugin instantiation
  • one glob for all of their source files, matching i18n(key) + Array, seeing if there are unused ones
  • write the pack in a pretty way
  • write e.g. @uppy/locales/en_US
  • fix Url locale not working — don’t set locale: this.defaultLocale in plugin options
  • add package.json and figure out build
  • upload-to-cdn, to also upload their libs along with e.g. Robodog's
  • how to keep all different packs in sync with the canonical en_US?

Co-authored-by: Kevin van Zonneveld kevin@transloadit.com

arturi and others added some commits Apr 12, 2019

start adding a script that checks for unused locale strings
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
Support dependencies when digging up sources
because e.g. 'emptyFolderAdded' is used in provider-views but set in Dashboard's defaultLocale
More complex matching
So can can support cases like: `uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError')`
Update en_US.js
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
remove unused strings
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
@arturi

This comment has been minimized.

Copy link
Collaborator

commented on 6876fab Apr 15, 2019

I’m not sure how well this works when an i18n is an object:

xMoreFilesAdded.0,%{smart_count} more file added
xMoreFilesAdded.1,%{smart_count} more files added

arturi and others added some commits Apr 16, 2019

don’t set locale: this.defaultLocale — it overrides the lang pack
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
Add 'russian plural' for english, for consistency
Allows us to signal that this is possible in new target languages, and also run better linting
Create package.json
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

arturi and others added some commits Apr 16, 2019

move locales to /src
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
ignore locales themselves
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
build minified locale packs
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
expose Uppy.locale = {} placeholder object
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
Update ru_RU.js
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
add locale bundles to example
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
Bring ru_RU in sync with English
now that we've added 3 plural types across the board
Add the locales we had to remove to the legacy folder
and explain why they cannot make it back

@kvz kvz marked this pull request as ready for review Apr 17, 2019

@kvz

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

Still todo:

  • Update ru_RU so everything has a good translation
  • Push out a release

@kvz kvz merged commit 28fce1a into master Apr 17, 2019

0 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
deploy/netlify Deploy preview processing.
Details

@kvz kvz deleted the feature/locale-packs branch Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.