This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 832
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Move translation status to its own heading
* Read languages from the available ones rather than the config * Make the search work (add searchEnabled=true) * Move variables to the class since they were populated there
Add a label. Make css selector match style. Also fix import.
We no longer need the custom counterpart. The things that were changed in it and reasosn we no lomger need them are: 1. set separator - this can be done with standard counterpart 2. ES6 port: this was done to allow importing as _t, but is unnecessary with the _t wrapper function in react-sdk (although also seems to work fine with `import _t from 'counterpart';`) 3. Fallback to key name: unnecessary with `setMissingEntryGenerator` in 0.18, but we've changed to just using a fallback locale anyway since No code missing en translations should ever make it to the devbelop branch. 4. Logging on missing translations. Unnecessary with `onTranslationNotFound`, but now not used anyway because we let missing translations show up in the UI as 'missing translation' Bulk changes to imports coming in separate commit for easy reading.
to use languageHandler wrapper func
As I've now added code to this file
We already do it in the place this function gets called
* Replace callbacks with promises * Move plain functions to top level * De-duplicate bits that fetched languages.json * Take full language preference list from the browser if we can get it, rather than just the first.
Actually translate the language dropdown label & add the string. Remove some unused ones.
But make them work by calling _t in render rather than getDefaultProps(). Also sort out some 'Warning!' strings
Make it reflect reality if it's been taken from the browser langs by just getting what was saet in counterpart rather than the saved setting. Also fix style.
The translations strings are not HTML and it gets escaped.
* Serve translation files from the karma server * Port UserSettingsStore to ES6 exports because the test runner gets confused by ES6 importing a commonjs module * Remove extra spaces in translations strings for MELS * Fix 'his/her' back to be 'their' * Change test to expect singular 'invitation' for a single person (there may be multiple invitations, but IMO this should be 'rejected n invitations' and we can play with the wording later, I don't think the singular is any worse than the plural). * set language in the MELS tests (and wait for it to complete) * Don't bother setting lang in other tests for now
Avoids having to load translations in riot-web tests
haven't gone through every line but have read through languageHandler which seems fine. and i trust that the rest is okay, given it's been reviewed one way or another about 3 times now. lgtm! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Manual merge of https://github.com/matrix-org/matrix-react-sdk/pull/801/files