Skip to content

Commit

Permalink
fix translation
Browse files Browse the repository at this point in the history
  • Loading branch information
DiverVM authored and ilmartyrk committed Feb 17, 2025
1 parent b25deaa commit 5e66a5a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -999,9 +999,6 @@
</div>
<div class="mobile_show" translate="VIEWS.IDEATION_CREATE.SETTINGS_HEADING_IDEATION_DEADLINE_DESC">
</div>
<<<<<<< HEAD
<div class="radio_wrap ideation">
=======
<div class="radio_wrap ideation" [ngClass]="{'disabled': (!isnew && topic.status !== this.TopicService.STATUSES.draft)}">
<div class="radio_text_wrap">
<div class="radio_lable_wrap setting_toggle">
Expand All @@ -1014,7 +1011,6 @@
</div>
</div>
<div class="radio_wrap ideation" [ngClass]="{'disabled': ideation.allowAnonymous}">
>>>>>>> master
<div class="radio_text_wrap">
<div class="radio_lable_wrap setting_toggle">
<span class="bold" translate="VIEWS.IDEATION_CREATE.LBL_DISABLE_REPLIES" [translateParams]="{value: (ideation.disableReplies ? 'TOGGLE_OFF' : 'TOGGLE_ON') | translate}"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ export class IdeationCreateComponent extends TopicFormComponent implements Block
question: '',
deadline: null,
disableReplies: false,
<<<<<<< HEAD
=======
allowAnonymous: false,
>>>>>>> master
createdAt: '',
updatedAt: ''
};
Expand Down
4 changes: 0 additions & 4 deletions src/app/interfaces/ideation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ export interface Ideation {
ideas: {
count: number
},
<<<<<<< HEAD
disableReplies: boolean
=======
disableReplies: boolean,
allowAnonymous: boolean
>>>>>>> master
}

53 changes: 53 additions & 0 deletions src/app/topic/topic.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ export class TopicComponent {
selectedTab = 'discussion';
showTutorial = false;
topicTitle: string = '';
navigation: { title: string; link: string[] } = {
title: '',
link: [],
};
//new end
topic$: Observable<Topic>; // decorate the property with @Input()
groups$: Observable<Group[]>;
Expand Down Expand Up @@ -349,6 +353,55 @@ export class TopicComponent {
}
}

getNavigationItem(): void {
this.groups$
.pipe(
map((groups) => {
const isTopicPrivate =
this.topicVisibility === this.TopicService.VISIBILITY.private;

if (groups.length > 1) {
return {
title: isTopicPrivate
? 'VIEWS.GROUP.HEADING_BACK_TO_MY_GROUPS'
: 'VIEWS.GROUP.HEADING_BACK_TO_PUBLIC_GROUPS',
link: [
'/',
this.translate.currentLang,
isTopicPrivate ? 'my' : 'public',
'groups',
],
};
} else if (groups.length === 1) {
return {
title: this.translate.instant(
'VIEWS.GROUP.HEADING_BACK_TO_GROUP',
{
title: groups[0].name,
}
),
link: ['/', this.translate.currentLang, 'groups', groups[0].id],
};
} else {
return {
title: isTopicPrivate
? 'VIEWS.TOPICS_TOPICID.HEADING_BACK_TO_MY_TOPICS'
: 'VIEWS.TOPICS_TOPICID.HEADING_BACK_TO_PUBLIC_TOPICS',
link: [
'/',
this.translate.currentLang,
isTopicPrivate ? 'my' : 'public',
'topics',
],
};
}
})
)
.subscribe((navigation) => {
this.navigation = navigation;
});
}

reportReasonDialog(topic: Topic) {
this.DialogService.open(TopicReportReasonComponent, {
data: {
Expand Down
4 changes: 1 addition & 3 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,7 @@
"GROUP": {
"HEADING_BACK_TO_MY_GROUPS": "To my groups",
"HEADING_BACK_TO_PUBLIC_GROUPS": "To public groups",
"HEADING_BACK_TO_GROUP": "To {{title}}",
"LBL_JOINED": "Joined group",
"BTN_JOIN": "Join group",
"BTN_ACTIVITIES": "Group activity",
Expand Down Expand Up @@ -2312,11 +2313,8 @@
"SETTINGS_HEADING_ADVANCED_SETTINGS_DESC": "Further options to customise the idea gathering phase.",
"LBL_DISABLE_REPLIES": "Replies are turned: {{value}}",
"LBL_DISABLE_REPLIES_DESC": "Disable replies to ideas",
<<<<<<< HEAD
=======
"LBL_ALLOW_ANONYMOUS": "Anonymous ideas are turned: {{value}}",
"LBL_ALLOW_ANONYMOUS_DESC": "Ideas are posted without showing the poster’s name",
>>>>>>> master
"PREVIEW_INFO": "<b>This is a preview of your topic!</b> You can still edit your topic at any point prior to starting a vote.",
"BTN_IDEATION_ACTIONS": "Manage idea gathering",
"NO_IDEAS_HEADING": "There are no ideas yet",
Expand Down

0 comments on commit 5e66a5a

Please sign in to comment.