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

GSoC branch lang controller addition #897

Merged

Conversation

sumitra19jha
Copy link
Contributor

What kind of change does this PR introduce?
Ability to update/change language through controller

Issue Number:

Fixes #798
Fixes #800 before auth
Fixes #801

Did you add tests for your changes?
No, Seprate issue exists for that

Snapshots/Videos:

WhatsApp.Video.2021-06-19.at.8.25.00.PM.mp4

If relevant, did you update the documentation?
Not needed here

Summary
Develop branch language update

Does this PR introduce a breaking change?
No

Other information

Have you read the contributing guide?

@DeltaHarbinger
Copy link
Contributor

Hey @sumitra19jha, some of the tests are failing on this PR. Is there something that needs to be changed with your code or with the pipelines?

@sumitra19jha
Copy link
Contributor Author

sumitra19jha commented Jun 22, 2021

Yeah, I am working on them. It is related to a notifier problem.@DeltaHarbinger

@DeltaHarbinger
Copy link
Contributor

Alright, thanks for the update

@CyberWake
Copy link
Member

@sumitra19jha can you please look in to the thing like in verify text in some languages goes to 2 line plus the greeting text in english and french come as intended but in Chinese and hindi it doesn't

@sumitra19jha sumitra19jha marked this pull request as draft June 22, 2021 16:06
@sumitra19jha
Copy link
Contributor Author

sumitra19jha commented Jun 22, 2021

@DeltaHarbinger @CyberWake During the language conversion the context is very important, which is given by the full sentence. In the case of Hindi and Chinese the meaning actually gets affected if we ended up breaking it like english. So full sentence is taken as a reference.

The problem here is also the Rich text widget used. While designing the UI, we focused on single language and then widgets are implemented accordingly (for the case of greeting the use of Rich Text). So the JSON are more focused on preserving the meaning aspect.

For English

Screenshot 2021-06-22 at 9 49 41 PM

For Hindi

Screenshot 2021-06-22 at 9 49 56 PM

For Spanish

Screenshot 2021-06-22 at 9 50 09 PM

For Chinese

Screenshot 2021-06-22 at 9 50 17 PM

Widget

Screenshot 2021-06-22 at 9 55 18 PM

@sumitra19jha
Copy link
Contributor Author

There is one issue in this PR which is causing error during signup so I have marked it as a draft. I will fix this as soon as possible.

@sumitra19jha
Copy link
Contributor Author

@DeltaHarbinger @CyberWake @dellyjm @Sagar2366 @rutvik11062000 @utkarshshendge Please Review the PR

WhatsApp.Video.2021-06-23.at.1.51.22.AM.mp4

@sumitra19jha sumitra19jha marked this pull request as ready for review June 22, 2021 20:35
@sumitra19jha
Copy link
Contributor Author

sumitra19jha commented Jun 23, 2021

The PR is ready for merge.

@CyberWake
Copy link
Member

@DeltaHarbinger @CyberWake @dellyjm @Sagar2366 @rutvik11062000 @utkarshshendge Please Review the PR

WhatsApp.Video.2021-06-23.at.1.51.22.AM.mp4

I feel like having the languages on the language page itself in the same locale would we much better, this is just the input what other social/management apps do.

@CyberWake
Copy link
Member

Please look into the test as well they are failing.

@sumitra19jha
Copy link
Contributor Author

sumitra19jha commented Jun 23, 2021

@CyberWake Travis CI is passing. Can you point out which test cases are failing?

@CyberWake
Copy link
Member

@CyberWake Travis CI is passing. Can you point out which test cases are failing?

Try running locally you'll get to know if it's not clear with the logs over here.

@sumitra19jha
Copy link
Contributor Author

sumitra19jha commented Jun 23, 2021

@CyberWake Can you attach the snapshot of which test failed locally on your system?

@sumitra19jha
Copy link
Contributor Author

@CyberWake Locally everything is working fine on my system!!!

@CyberWake
Copy link
Member

@CyberWake Locally everything is working fine on my system!!!

did you check it? like from logs itself I see the test are failing in select_language_page_test.dart file. And error would also be thrown irrespective of machine its running on please cross check again.

@sumitra19jha
Copy link
Contributor Author

@CyberWake Please share your error log screenshot. I am not able to see any on my local system.

This is the screenshot of select_language_page_test.dart test on my local system.
Screenshot 2021-06-24 at 9 00 01 AM

@CyberWake
Copy link
Member

@CyberWake Please share your error log screenshot. I am not able to see any on my local system.

This is the screenshot of select_language_page_test.dart test on my local system.
Screenshot 2021-06-24 at 9 00 01 AM

please look into the line 5 widgets with key and for more please run the test in android studio if possible.

@sumitra19jha
Copy link
Contributor Author

@CyberWake There is no issue with line 5. This is appearing because of print statement, as we have added same key to more than 1 items. If you are facing any issue, Please message me on slack with screenshot and we will work on that.

screen-recording-2021-06-24-at-125726-pm_iUMuOMvi.mov

.

@CyberWake
Copy link
Member

CyberWake commented Jun 24, 2021

@CyberWake There is no issue with line 5. This is appearing because of print statement, as we have added same key to more than 1 items. If you are facing any issue, Please message me on slack with screenshot and we will work on that.

screen-recording-2021-06-24-at-125726-pm_iUMuOMvi.mov
.

please run the test in android studio the full statement is not shown here i would recommend you to use android studio to run test there you get better logs. and the exact log could itself be seen from the workflow adding for convenience

  Expected: BoxDecoration:<BoxDecoration(color: Color(0x00000000))>
  Actual: BoxDecoration:<BoxDecoration(color: Color(0x26c4c4c4))>

When the exception was thrown, this was the stack:
#4      main.<anonymous closure>.<anonymous closure> (file:///home/runner/work/talawa/talawa/test/widget_tests/select_language_page_test.dart:235:7)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)
...

This was caught by the test expectation on the following line:
  file:///home/runner/work/talawa/talawa/test/widget_tests/select_language_page_test.dart line 235
The test description was:
  Testing to change language items

also check your branch as well

@sumitra19jha
Copy link
Contributor Author

sumitra19jha commented Jun 24, 2021

@CyberWake This is happening because the async request on your system is running slow. I will fix this in next commit.

I work on both frontend and backend so I am more comfortable with VS Code then Android Studio. For both development and testing purposes it works very fine.

@CyberWake
Copy link
Member

CyberWake commented Jun 24, 2021

@CyberWake This is happening because the async request on your system is running slow. I will fix this in next commit.

I work on both frontend and backend so I am more comfortable with VS Code then Android Studio. For both development and testing purposes it works very fine.

can you please run the test in android studio it is not something dependent on machine.
and there is no async request involved in that s screenlease have a look

@sumitra19jha sumitra19jha marked this pull request as draft June 24, 2021 22:59
@sumitra19jha sumitra19jha marked this pull request as ready for review June 25, 2021 20:35
@sumitra19jha
Copy link
Contributor Author

@DeltaHarbinger @CyberWake @dellyjm @rutvik11062000 @utkarshshendge @Sagar2366
Please review the PR its ready

@CyberWake
Copy link
Member

@DeltaHarbinger @CyberWake @dellyjm @rutvik11062000 @utkarshshendge @Sagar2366
Please review the PR its ready

please look up on the review comments

@sumitra19jha
Copy link
Contributor Author

What review comments? @CyberWake

@sumitra19jha
Copy link
Contributor Author

Is there any issue in these changes? @CyberWake

lib/main.dart Outdated Show resolved Hide resolved
lib/router.dart Show resolved Hide resolved
lib/utils/lang_controller.dart Outdated Show resolved Hide resolved
@CyberWake
Copy link
Member

sorry i forgot to submit my review 😥

@sumitra19jha
Copy link
Contributor Author

@palisadoes palisadoes merged commit c92af14 into PalisadoesFoundation:GSoC Jun 28, 2021
palisadoes added a commit that referenced this pull request Jun 29, 2021
* Added mdoel to the locator and debugging

* Flutter Format

* Fixing travis tests

* Add FutureBuilder Logic To Main.dart

* logic correction

* setted MVVM structure

* Attached viewModel

* reduced lines

* refactored and completed local device test.

* updated tests

* Add news_article+page_view_model.dart

* Implements the ViewModel

* ptch: Updated the Test

* ptch: flutter linting

* logic correction

* minor error fixing after merge conflict

* minor error fixing after merge conflict

* minor error fixing after merge conflict

* Flutter format

* Fixing errors

* Updated Tests

* ptch: Adding Comment Bug Fix

* ptch: flutter linitng

* ptch: test update

* Fixed code formatting

* bfix: fixes comment count not updating on newsfeed

* ptch: Change in Loader

* ptch: Change in Loader

* ptch: added default parameter in Loader

* logic correction

* upstream fetch

* Flutter format .

* conflict

* Url controller

* url page controller addn

* controller registration

* Unused files removal

* Adding test

* conflict resoved

* fixing tests

* Fixed errors

* Flutter format .

* Flutter Format

* Merge remote-tracking branch 'upstream/master' into newPagination

* flutter format .

* flutter format

* flutter format .

* Fixes #793

* flutter format .

* fixed changes

* flutter format

* Merge remote-tracking branch 'upstream/master' into provider-add

* flutter format .

* fixed formatting

* Fixed formatting

* Merge remote-tracking branch 'upstream/master' into provider-add

* Merge remote-tracking branch 'upstream/master' into provider-add

* Fixed travis build fail

* chore: fixes linting issue

* events update

* ptch: Flutter lint

* ptch: Replace the Column with Listview in Loader.dart

* controlller add

* flutter format .

* Image Handler

* Image Ui and Controller Connection

* Test Updates

* uniformisation

* Code style prttification

* app localization and language controller addition

* language

* logic correction with generalised approach rather than specific case-wise approach

* change of a minor error in pull-request.yml

* addition of justified docstrings and methodogy

* correction of a specific case in group_controller.dart's formatting

* increasing the legibility of the code

* removed usused import from post_cotroller.dart for resubmitting for the build

* Fix : Not able to close pop up in Join Organization Screen #815

Bug was caused due to Page context was used in close button instated new context of builder.

Fix:
Refactor : ctx -> dialogContext
Change : context -> dialogContext (line 142)

* undoing the change in pubspec.yaml for travis CI build

* Splash Screen Added

* travis ci fix

* fix

* http ^0.12.0+4

* fix

* dependency overide

* dependency overide

* dependency change

* compatible packages

* adding crypto 2.1.3

* crypto: 3.0.1

* To rerun travis ci

* Done : code formatting

* Red screen error resolved from the update profile page(Issue #824)

* [Fix] RenderFlex overflow in Member details Screen

* Merge branch 'functionality-to-crop-picture' of https://github.com/afaanshariff/talawa into functionality-to-crop-picture

* resolved merge conflicts

* resolved exceptions in image_service.dart

* resolved exceptions in image_service.dart

* Organisation setting bug fix

- Fixes bug #833
- Code reformatting of profile_page_viewModel.dart and profile_page.dart

* Updated CONTRIBUTING.md with new Branching Strategy

* Removed gitflow from CONTRIBUTING.md

* Fixed typo in CONTRIBUTING.md

* User will not able to delete others event

fix #832

* Simplification of LeaveOrg and OrgSetting Button

* Using snake case in file names

- Flutter SDK was showing Warning as the Camel case was used in the file names so the file was renamed as snake case.

* Organisations directory file size reduction

- dart file size reduction (under 300 lines) of files under  "lib/views/pages/organization" directory
- Code refactored and reformatted

* Users can't see an option to delete if they are not allowed

* Fixes #840

* Fixes #840

* Minor change : Ternary operators removed

* event_dialog file size reduction

- Widgets common between add_event_dialog.dart and edit_event_dialog.dart have been separated into file event_widgets.dart
- Data is passed as parameter
- Register form also reformatted

* Organization names are displayed in sorted order.

* File size reduction set_url_page.dart

* Reformatted

- Reformatted with flutter format
- URL Page Animation extracted and moved to other file

* Update register_form_test.dart

* Added linting,actions and other repo related files

* Preauth screens with applogo native,flutter splash screens

* Fonts added - refactor

* Add HomePage

* Add widget test for homepage

* update line limit to 400 in countline.py

* HomePage starter UI

* Updated the tests

* Updated GitHub workflow to exclude 'lib/custom_painters/talawa_logo.dart'. Fixes #856

* Updated GitHub workflow to exclude 'lib/custom_painters/talawa_logo.dart'. Fixes #856

* Updated GitHub workflow to exclude 'lib/custom_painters/talawa_logo.dart'. Fixes #856

* Add themeclass for light and dark theme

* Refractor textstyles

* Delete textstyles.dart

* Update pull_request_template.md

* [GSoC] - Code re-write and migration (#863)

* Validators,Plugins,File structuring,Test fail fix and joinorg,waiting pages

* Updated the workflow for minimum coverage, will we reverted back soon

* [Gsoc ] Added UI and implemented MVVM started on OrganizationFeedPage (#864)

* Added CustomCarousel

* Added models

* Removing linting problems

* Fixed errors except sort dependency

* Completed - demo data and models implemented MVVM

* Removed problems

* [GSoC] Deeplinking in application for invitation links, renaming according to lint (#866)

* Validators,Plugins,File structuring,Test fail fix and joinorg,waiting pages

* Updated the workflow for minimum coverage, will we reverted back soon

* Deeplinking for invitation links completed

* [Gsoc] Added Individual Post Page , Pinned post Page  (#867)

* Added CustomCarousel

* Added models

* Removing linting problems

* Fixed errors except sort dependency

* Completed - demo data and models implemented MVVM

* Removed problems

* Finished Pinned Post Page and Individual Post Page

* [GSoC] - Pre-auth view_models and model implementation, refactor needed (#868)

* Validators,Plugins,File structuring,Test fail fix and joinorg,waiting pages

* Updated the workflow for minimum coverage, will we reverted back soon

* Deeplinking for invitation links completed

* Pre-auth view_models and model implementation, refactor needed

* [GSoC] Added UI with basic implementation of MVVM started for Explore Events Screen (#870)

* add explore events page with mvvm

* modify tests

* add eventInfo Page and createEvent Page (#874)

* [GSoC] - Pre-auth new navigation flow completion with server linking (#878)

* Validators,Plugins,File structuring,Test fail fix and joinorg,waiting pages

* Updated the workflow for minimum coverage, will we reverted back soon

* Deeplinking for invitation links completed

* Pre-auth view_models and model implementation, refactor needed

* Minor route fixes

* [GSoC] - Test Fix, invite link deprecation fix (#880)

* Model refactoring and invite link fix

* # This is a combination of 2 commits.
# This is the 1st commit message:

fix test failure

# This is the commit message #2:

Added flutter analyser

* [GSoC] homeview UI refractoring and adding drawer UI (#881)

* fixed generated plugin error

* Refactored UI for dark mode

* Added drawer UI

* Added Drawer UI

* [GSoC] Created "Add post page" UI (#884)

* fixed generated plugin error

* Created Add Post Page UI

* Updated Home page test

* [GSoC] - Organisation Switching from drawer (#885)

* Added flutter analyzer

* Switiching org from drawer and minor bug fixes

* Added test for splash screen

* [GSoC] Add Profile and Edit Profile screens with MVVM (#886)

* add profile and edit profile screen

* delete home_page.dart and fix profile textfield

* [GSoC] - Update the UserConfig to get realtime updates (#887)

* fixed generated plugin error

* Used subscriptions to get realtime UI updates.

* Updated tests

* Refactored to work with stream data (#888)

* fixed generated plugin error

* Used subscriptions to get realtime UI updates.

* Updated tests

* refactored to work with the stream data

* Fixed travis build error

* Analyzer fixes

* [GSoC] - Refactoring, common alert popup & test (#889)

* Refactoring, common alert popup & test'

* talawa analysis point increment

* [GSoC] - Connected Post Service with backend and switch organization service (#890)

* fixed generated plugin error

* Used subscriptions to get realtime UI updates.

* Updated tests

* refactored to work with the stream data

* Fixed travis build error

* Analyzer fixes

* Inital code for post service

* Added Stream setup for posts

* Integrated post service and preserved page state

* Fixing the analyzer

* Tests updates

* Refactoring and join org page after auth (#891)

* [GSoC] - Mockito testing setup with the services || Service Stream Refactoring (#893)

* fixed generated plugin error

* Used subscriptions to get realtime UI updates.

* Updated tests

* refactored to work with the stream data

* Fixed travis build error

* Analyzer fixes

* Inital code for post service

* Added Stream setup for posts

* Integrated post service and preserved page state

* Fixing the analyzer

* Tests updates

* Refactored Services & added Local cache "LIKE" fun

* Finished mocking the services using Mockito

* Fixing the travis build failure

* [GSoC] Connect explore events and create events with the backend (#894)

* connect explore events with backend

* add create event functionality

* Fix failing tests

* [GSoC] - Refactoring in functions class, use of global model for post (#895)

* Refactoring in functions class, use of global model for post

* Merge conflicts fix

* [GSoC] Add validation for create_event_form.dart and refractor. (#896)

* fix events not displaying issue

* Remove unused imports

* Updated connectivity_plus plugin (#899)

* GSoC - Adding / Removing || Adding comment (#903)

* fixed generated plugin error

* Added like functionality

* Added Removing like feature

* Added comment feature without single source  truth

* Added comment features and Updated test.

Co-authored-by: rutvik11062000 <[email protected]>

* GSoC branch lang controller addition (#897)

* language controller and befor auth language addition

* Pubspec update

* test changes

* test updates

* Updates

* test updated

* language updates

* selection test case updated

* Final Updates

* viewmodel update

* Test file updates

* Flutter code analyze update

Co-authored-by: rutvik11062000 <[email protected]>
Co-authored-by: Shreyash Lata <[email protected]>
Co-authored-by: Astha Nayak <[email protected]>
Co-authored-by: StrangeNoob <[email protected]>
Co-authored-by: raunak_k02 <[email protected]>
Co-authored-by: Sagar Utekar <[email protected]>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: afaanshariff <[email protected]>
Co-authored-by: AFFAN SHARIFF <[email protected]>
Co-authored-by: ahluwaliatikant <[email protected]>
Co-authored-by: Aditya Birangal <[email protected]>
Co-authored-by: Muskan Modi <[email protected]>
Co-authored-by: Muskan Modi <[email protected]>
Co-authored-by: Troy Anderson <[email protected]>
Co-authored-by: Aman Anand <[email protected]>
Co-authored-by: DangaRanga <[email protected]>
Co-authored-by: Piyush Goel <[email protected]>
Co-authored-by: CyberWake <[email protected]>
Co-authored-by: Utkarsh S <[email protected]>
Co-authored-by: Rutvik Chandla <[email protected]>
Co-authored-by: CyberWake <[email protected]>
Co-authored-by: rutvik11062000 <[email protected]>
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.

4 participants