Skip to content

Conversation

@Angamanga
Copy link
Contributor

@Angamanga Angamanga commented Jun 4, 2024

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:

  1. Go to mobile app
  2. Go to profile
  3. Tap "Language"
  4. Select Spanish
  • The radio-button is filled and the text "Current" moves to Spanish
    Go out of Language and click on "Log in or Sign up"
  • Note that some of the UI is translated

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.

@linear
Copy link

linear bot commented Jun 4, 2024

@@ -0,0 +1,11 @@
import { NgModule } from '@angular/core';
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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

Copy link
Contributor Author

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 {
Copy link
Contributor Author

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',
},
{
Copy link
Contributor Author

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');
}
Copy link
Contributor Author

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';
Copy link
Contributor Author

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.

@Angamanga Angamanga marked this pull request as ready for review June 4, 2024 20:55
@Angamanga Angamanga requested review from Ifycode and ushahidlee June 4, 2024 20:56
Copy link
Contributor

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 😜

Copy link
Contributor

@ushahidlee ushahidlee left a 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!

@Angamanga Angamanga merged commit d1925d3 into development Jun 7, 2024
tuxpiper pushed a commit that referenced this pull request Jun 17, 2024
* 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
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.

3 participants