-
Notifications
You must be signed in to change notification settings - Fork 99
Adding a language switch to mobile #1093
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
Conversation
| @@ -0,0 +1,11 @@ | |||
| import { NgModule } from '@angular/core'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The select-language- files are new logic to review.
| justify-content: center; | ||
| } | ||
| } | ||
| .search-list { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some refactoring to make the list-type usable in more places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the interface to the sdk
| @@ -1,82 +1,7 @@ | |||
| .deployment-item { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved styles to list.scss
| icon: 'language', | ||
| route: '/profile/select-language', | ||
| }, | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added language to the profile-menu
|
|
||
| export function HttpLoaderFactory(http: HttpClient): any { | ||
| return new CustomTranslateHttpLoader(http, './assets/locales/', '.json'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ngx-translate to load the translation-files
| @@ -0,0 +1,66 @@ | |||
| import { Injectable } from '@angular/core'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are more or less copied from the web-client. I think we should be able to move it to the sdk once we have optimised the translation-files and removed duplicates etc so we can use the same files for mobile and web.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filename has a typo 😜
ushahidlee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well and the code looks fine. Massive PR!
* Moving language-interface to sdk * Adding basic translation-setup for mobile * Adding language-switch-ui to mobile * Adding keys to strings * Adjusting language-select view according to designs * Refactoring deployment-list to use app-wide styles * Adjustments when selecting language * Adding more strings and spanish translations * Importing from correct place * Adjusting translation-file * Using correct backend url * Correct spelling-mistake on filename
This PR adds a translation-UI to the mobile-app, maps strings to translation-files and some translations to Spanish.
Note: The UI is a bit different than the designs in the ticket, this was done in conversation with Reuben.
To test:
Go out of Language and click on "Log in or Sign up"
Note 1: Not all strings are translated yet.
Note 2: A lot of files are changed in this PR! I have noted in the code which ones to focus on, the rest is "just" the language-strings.