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

Translate "'s Room" in default room #5313

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

Mariam05
Copy link
Contributor

@Mariam05 Mariam05 commented Jul 6, 2023

Closes #5255

@@ -63,7 +63,8 @@ def create_default_room(user)
return unless user.rooms.count <= 0
return unless PermissionsChecker.new(permission_names: 'CreateRoom', user_id: user.id, current_user: user, current_provider:).call

Room.create(name: "#{user.name}'s Room", user_id: user.id)
locale = I18n.default_locale unless valid_locale?(user.language.to_sym)
Room.create(name: t('room.new_room_name', username: user.name, locale:), user_id: user.id)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that we can assume the user's language is always valid - why the extra check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the check because the tests were failing due to the user's language being set to "language". I don't know whether or not it's possible for a user's language to exist without a corresponding locale file, but if not I can also change the tests to pass a valid language

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would update the tests instead

@sonarcloud
Copy link

sonarcloud bot commented Jul 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.9% 1.9% Duplication

@farhatahmad farhatahmad merged commit 07473ab into bigbluebutton:master Jul 10, 2023
3 checks passed
pachidj87 pushed a commit to ZumbTech/Auditorium that referenced this pull request Jul 19, 2023
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.

V3: Translate default room
2 participants