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

Translations update from Hosted Weblate #9169

Open
wants to merge 35 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f04f570
Translated using Weblate (Swedish) (#9141)
weblate Aug 18, 2023
a341a19
Feature-9082: Enhance language dropdown button (#9131)
nnhathung Aug 18, 2023
498add5
fix-7016: Link redirect of current day results in user forward to wro…
Aug 21, 2023
47a50e8
feature-9082: Enhance language dropdown button (#9142)
Aug 21, 2023
b4307ec
fix-9080: There was no result for searching with Ticket price "0.0" (…
Aug 21, 2023
2ba0fe3
fix-9139: The Expired tab of Access Codes Page has navigated wrong th…
khangon Aug 21, 2023
8ef23c3
fix-9076: Cannot show all entries when selecting "Show All" in View A…
Aug 21, 2023
3447f60
fix-9154: [Badge Wizard] Showing <a> tag in custom field when organiz…
khangon Aug 24, 2023
46741b8
feature-9020: Filter options for orders and attendees not working (#9…
Aug 24, 2023
25ab4c1
feature 9125: Fix top menu for mobile screens (#9143)
khangon Aug 24, 2023
92dafd6
fix-9127:Top align table content on manage event dashboard (#9159)
khangon Aug 25, 2023
40db04f
feature-8684: Add option to tag attendees (#9155)
Aug 26, 2023
e811c76
fix 9140: The value of the status dropdown list cannot be displayed i…
khangon Aug 26, 2023
5f989cc
feature-9082: Enhance language dropdown button (#9162)
Aug 31, 2023
0cbe4fd
feature-9082: Enhance language dropdown button (#9164)
Sep 8, 2023
d2861b9
feature-9065: Track when attendees login and join an event virtually …
nnhathung Sep 12, 2023
ef639f6
Translated using Weblate (Swedish) (#9163)
weblate Sep 12, 2023
fa36945
Translations update from Hosted Weblate (#9167)
weblate Oct 12, 2023
a147d7e
Revert "feature-9082: Enhance language dropdown button (#9164)"
norbusan Mar 21, 2024
6dfb5ab
Revert "feature-9082: Enhance language dropdown button (#9162)"
norbusan Mar 21, 2024
940cb42
Revert "feature-9082: Enhance language dropdown button (#9142)"
norbusan Mar 21, 2024
0d76e7a
Revert "Feature-9082: Enhance language dropdown button (#9131)"
norbusan Mar 21, 2024
12b957b
Revert "Feature-9082 Enhance language dropdown button (#9105)"
norbusan Mar 21, 2024
b14a7a9
Translated using Weblate (Swedish)
Umeaboy Sep 18, 2023
e6338bd
Translated using Weblate (Korean)
sukso96100 Oct 22, 2023
fca0545
Translated using Weblate (German)
Oct 30, 2023
460f7c3
Translated using Weblate (Arabic)
Feb 6, 2024
67a44f6
Translated using Weblate (Japanese)
Feb 28, 2024
f5104a1
Translated using Weblate (Japanese)
Feb 29, 2024
449e424
Translated using Weblate (Vietnamese)
NKMuoi Mar 7, 2024
9a6a13e
Translated using Weblate (Vietnamese)
hpdang Mar 7, 2024
2b87d99
Translated using Weblate (Vietnamese)
Mar 8, 2024
74a2ab9
Translated using Weblate (Vietnamese)
Mar 9, 2024
593955f
Translated using Weblate (Vietnamese)
Mar 23, 2024
116ed2e
Translated using Weblate (Vietnamese)
Mar 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions app/components/forms/add-tag-form.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<div class="d-flex align-center mb-4">
<h2 class="header m-0">
{{t 'Tags'}}
</h2>
</div>
<div class="ui form">
<div class="field">
{{#each this.tagList as |tag index|}}
<div class="{{if this.device.isMobile 'grouped'}} fields">
<div class="{{unless this.device.isMobile 'three wide'}} field">
<Input
@type="text"
@name="tag"
@value={{tag.name}}
placeholder={{t "Name" }}
@readonly={{tag.isReadOnly}}
required
/>
</div>
<div class="{{unless this.device.isMobile 'four wide'}} field tag-form">
<Widgets::Forms::ColorPicker @value={{tag.color}} @fontColor={{tag.fontColor}} required>
{{#unless tag.isReadOnly}}
<button class="ui icon red button remove-tag" type="button" {{action 'removeItem' tag}}>
<i class="minus icon"></i>
</button>
{{/unless}}
{{#if (eq index ( sub this.tagList.length 1 ) ) }}
<button class="ui icon primary button add-tag" type="button" {{action 'addItem' 'tag' }}>
<i class="plus icon"></i>
</button>
{{/if}}
</Widgets::Forms::ColorPicker>
</div>
<div class="{{unless this.device.isMobile 'two wide'}} field">
<input title="Preview" class="preview" value="{{if tag.name tag.name (t 'Preview Text')}}" readonly
style={{css background-color=tag.color color=(text-color tag.color)}}>
</div>
</div>
{{/each}}
</div>
<button type="submit" class="ui teal submit button update-changes mt-4" {{action 'submit'}}>
{{t 'Submit'}}
</button>
<br>
<p>{{t 'You need to hit "Submit" to save your changes.'}}</p>
</div>
69 changes: 69 additions & 0 deletions app/components/forms/add-tag-form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import classic from 'ember-classic-decorator';
import Component from '@ember/component';
import { action, computed } from '@ember/object';
import FormMixin from 'open-event-frontend/mixins/form';
import { inject as service } from '@ember/service';
import { tracked } from '@glimmer/tracking';

@classic
export default class AddTagForm extends Component.extend(FormMixin) {
@service errorHandler;
@tracked tagsDeleted = [];

@computed('data.tags.@each.isDeleted', 'tagsDeleted.@each')
get tagList() {
return this.data.tags.filter(tag => !this.tagsDeleted.includes(tag));
}

willDestroyElement() {
const tagsNeedRemove = [];
this.data.tags.forEach(tag => {
if (!tag.id) {
tagsNeedRemove.pushObject(tag);
} else {
if (tag?.changedAttributes()) {
tag.rollbackAttributes();
}
}
});
if (tagsNeedRemove.length > 0) {
this.data.tags.removeObjects(tagsNeedRemove);
}
this._super(...arguments);
}

@action
addItem() {
this.data.tags.pushObject(this.store.createRecord('tag'));
}

@action
removeItem(tag) {
if (tag.id) {
this.tagsDeleted.pushObject(tag);
} else {
this.data.tags.removeObject(tag);
}
}

@action
async submit() {
try {
this.data.tags.forEach(tag => {
if (this.tagsDeleted.includes(tag)) {
tag.deleteRecord();
}
tag.save();
});
this.notify.success(
this.l10n.t('Your tag has been saved.'),
{ id: 'tag_save' }
);
} catch (error) {
this.notify.error(
this.l10n.t('Tag failed.'),
{ id: 'tag_save' }
);
}
}
}
18 changes: 18 additions & 0 deletions app/components/nav-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,23 @@ export default class NavBar extends Component {
return !(String(this.session.currentRouteName).includes('events.view'));
}

@computed('isNotPublicPageRoute')
get checkShowClassCssPublic() {
if (this.session.isAuthenticated) {
if (this.isNotPublicPageRoute) {
return 'au-home-page';
} else {
return 'au-public-page';
}
} else {
if (this.isNotPublicPageRoute) {
return 'un-home-page';
} else {
return 'un-public-page';
}
}
}

@action
handleKeyPress() {
if (event.keyCode === 13 || event.which === 13) {
Expand Down Expand Up @@ -120,6 +137,7 @@ export default class NavBar extends Component {
});
}


@action
handleClick() {
this.router.replaceWith('public.index', this.globalData.idEvent);
Expand Down
13 changes: 13 additions & 0 deletions app/components/public/stream/join-video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default class JoinVideo extends Component<Args> {
openPanel(): void {
if (this.args.canAccess) {
this.args.showSidePanel?.();
this.eventCheckIn(this.args.event.identifier)
this.router.transitionTo({ queryParams: { side_panel: true } });
} else {
if (this.session.isAuthenticated) {
Expand All @@ -35,4 +36,16 @@ export default class JoinVideo extends Component<Args> {
}
}
}

async eventCheckIn(event_identifier: string) {
try {
const data:any = {
'check_in_type' : 'event',
'is_check_in' : true
};
await this.loader.post(`events/${event_identifier}/virtual/check-in`, data);
} catch (e) {
// Ignore error to prevent stackoverflow
}
}
}
46 changes: 22 additions & 24 deletions app/components/public/stream/side-panel.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -60,40 +60,38 @@
<div>
<div class="ui inverted vertical fluid menu borderless stream-side-menu">
{{#each this.streams as |stream|}}
<a href={{href-to 'public.stream.view' @event stream.slugName stream.id }} class="{{if (eq @currentRoom.microlocationId stream.microlocationId) 'video-active'}} item stream-item d-flex items-center" {{on "click" (fn @setupRoomChat stream) }} >
<a href={{href-to 'public.stream.view' @event stream.slugName stream.id }} class="{{if (eq @currentRoom.microlocationId stream.microlocationId) 'video-active'}} item stream-item d-flex items-center" {{on "click" (fn @setupRoomChat stream) }}>

<span class="stream-preview-letter" style={{css background-color=(object-at (abs (mod stream.hash this.colors.length)) this.colors)}}>{{truncate (uppercase stream.name) 1 false}}</span>
<span class="ml-2">{{stream.name}}</span>
{{#if (gt stream.translations.length 1)}}
<div class="block-side-panel">
<div class="translation-dropdown-button translation-dropdown-container">
<div style="display:inline-block;margin-left:auto">
<div class="translation-dropdown-button translation-dropdown-container ">
<UiDropdown class="btn btn-secondary dropdown-toggle"
@selected={{this.selectingLanguage.getName}}
@onChange={{ action "switchLanguage"}} as |execute mapper|
{{action 'switchRoom' stream}} >
<div class="{{if (and this.selectingLanguage.getName (eq @currentRoom.id stream.id)) 'translate-hidden'}} translation-dropdown-wrapper">
<div class="translation-dropdown-component">
<i class="language icon"></i>
</div>
<div class="translation-dropdown-component translation-length">
{{stream.translations.length}} {{t}}
</div>
<div class="translation-dropdown-component">
<i class="dropdown icon translation-dropdown-icon"> </i>
</div>
</div>
{{#if (and (eq @currentRoom.id stream.id) this.selectingLanguage.getName)}}
<div class="text">{{this.selectingLanguage.getName}}</div>
{{/if}}
<div class="ui translation menu custom-menu">
{{#each stream.translations as |channel|}}
<div class="item custom-item" data-value="{{map-value mapper channel}}">{{channel.name}}</div>
{{/each}}
@onChange={{ action "switchLanguage"}}>
<div class="translation-dropdown-wrapper">
<div class="translation-dropdown-component">
<i style="font-size:1.1em" class="language icon"></i>
</div>
<div class="translation-dropdown-component">
{{stream.translations.length}} {{t 'languages'}}
</div>
<div class="translation-dropdown-component">
<i style="margin-left: 0 !important;text-align: right;"
class="dropdown icon"> </i>
</div>
</div>
<div class="ui translation menu">
{{#each-in stream.translations as |key channel|}}
<div class="item" data-value="{{channel.url}}">{{channel.name}}</div>
{{/each-in}}
</div>
</UiDropdown>
</div>
</div>
{{/if}}
</a>

{{/each}}
</div>
</div>
Expand Down
13 changes: 2 additions & 11 deletions app/components/public/stream/side-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,9 @@ export default class PublicStreamSidePanel extends Component<Args> {
}

@action
switchLanguage(channel: any): void {
this.selectingLanguage.setLanguage(channel.url);
switchLanguage(url: string): void {
this.selectingLanguage.setLanguage(url);
this.selectingLanguage.updateTranslationYTId();
this.selectingLanguage.setName(channel.name);
}

@action
switchRoom(stream: any) {
if (this.selectingLanguage.getTranslationRoomId() !== stream.id) {
this.selectingLanguage.setName(null);
}
this.selectingLanguage.setTranslationRoomId(stream.id)
}

@action
Expand Down
27 changes: 20 additions & 7 deletions app/components/public/stream/video-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ export default class PublicStreamVideoStream extends Component<Args> {
@service
l10n: any;

@service
selectingLanguage: any;

@service
confirm: any;

Expand Down Expand Up @@ -60,6 +57,9 @@ export default class PublicStreamVideoStream extends Component<Args> {
@tracked
provider = '';

@service
selectingLanguage: any;

@tracked
languageUrl = '';

Expand Down Expand Up @@ -166,15 +166,28 @@ export default class PublicStreamVideoStream extends Component<Args> {
async setupRoomChat(stream:any) {
this.currentRoom = stream;
this.shown = false;
if (this.selectingLanguage.getTranslationRoomId() !== stream.id) {
this.selectingLanguage.setName(null);
}
this.selectingLanguage.setTranslationRoomId(stream.id)
this.eventCheckIn(this.args.event.identifier, stream.microlocationId)
}

@action
hideStreamYard() {
this.selectingLanguage.setStreamYardVisibility(false);
}

async eventCheckIn(event_identifier: string, microlocation_id: number) {
try {
const data:any = {
'check_in_type' : 'room',
microlocation_id,
'is_check_in' : true
};
if (microlocation_id === undefined) {
data.check_in_type = 'virtual-room'
}
await this.loader.post(`events/${event_identifier}/virtual/check-in`, data);
} catch (e) {
// Ignore error to prevent stackoverflow
}
}

}
12 changes: 12 additions & 0 deletions app/components/tables/headers/select-all.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import classic from 'ember-classic-decorator';
import Component from '@ember/component';
import { action } from '@ember/object';

@classic
export default class SelectAll extends Component {

@action
toggleSelectAll(value) {
this.column.actions.toggleSelectAll(value);
}
}
14 changes: 14 additions & 0 deletions app/components/tables/utilities/add-tag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import classic from 'ember-classic-decorator';
import Component from '@ember/component';
import { action } from '@ember/object';
import $ from 'jquery';

@classic
export default class AddTag extends Component {

@action
onSelectTag(tag_id) {
$(this.element).find('input').trigger('blur');
this.selectTag(tag_id);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import classic from 'ember-classic-decorator';
import Component from '@ember/component';

@classic
export default class CellSelect extends Component {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import classic from 'ember-classic-decorator';
import Component from '@ember/component';
import { computed, action } from '@ember/object';
import { htmlSafe } from '@ember/string';

@classic
export default class CellTag extends Component {
didInsertElement() {
this._super(...arguments);
}

@action
removeTag() {
const attendee = this.props.row;
if (attendee) {
attendee.set('tagId', '');
attendee.save();
}
}

@computed('record')
get attendeeTagName() {
const tag = this.props?.options?.tags?.find(tag => parseInt(tag.id) === this.record);
if (tag) {
return tag.name;
}
return '';
}

@computed('record')
get attendeeTagColor() {
const tag = this.props?.options?.tags?.find(tag => parseInt(tag.id) === this.record);
if (tag) {
return htmlSafe('background-color:' + tag.color + '; display: inline-flex');
}
return '';
}
}
6 changes: 6 additions & 0 deletions app/controllers/events/view/tags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';

export default class extends Controller {
@service errorHandler;
}
Loading
Loading