Skip to content

Commit

Permalink
Add missing translation keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ilmartyrk committed Oct 19, 2023
1 parent 5847c55 commit 83f51fa
Show file tree
Hide file tree
Showing 52 changed files with 1,396 additions and 2,725 deletions.
13 changes: 11 additions & 2 deletions src/app/TranslateHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ export class JSONPointerCompiler extends TranslateCompiler {
}
if (typeof currentTranslations[key] === 'string') {
if (currentTranslations[key].includes("@:")) {

let replacementProperty = this.getDescendantPropertyValue(masterLanguageFile, currentTranslations[key].substring(2));
let i = 0;

if (!replacementProperty) {
//Incase invalid referer or missing translation
console.error('Missing translation: ', currentTranslations[key])
}

while (replacementProperty.includes("@:")) {
i++;
const tryProp = replacementProperty;
Expand All @@ -52,7 +57,11 @@ export class JSONPointerCompiler extends TranslateCompiler {
break
};
}
currentTranslations[key] = replacementProperty;
if (replacementProperty) {
currentTranslations[key] = replacementProperty;
} else {
currentTranslations[key] = currentTranslations[key];
}
}
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="form_wrap">
<form name="passwordForgotForm" [formGroup]="passwordForgotForm" (ngSubmit)="doPasswordReset()" novalidate>
<input id="email" formControlName="email" [placeholder]="'COMPONENTS.PASSWORD_FORGOT.PLACEHOLDER_EMAIL' | translate"
[ngClass]="{'error_input': errors?.email}" required>
<cos-input placeholder="{{'COMPONENTS.PASSWORD_FORGOT.PLACEHOLDER_EMAIL' | translate}}">
<input id="email" formControlName="email"
[placeholder]="'COMPONENTS.PASSWORD_FORGOT.PLACEHOLDER_EMAIL' | translate"
[ngClass]="{'error_input': errors?.email}" required>
</cos-input>
<label for="email" class="error_label" *ngIf="errors?.email">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
Expand Down
1 change: 1 addition & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class AppComponent {
handleKeyDownEvent(event: KeyboardEvent) {
if (this.keysPressed.indexOf(event.key) === -1) this.keysPressed.push(event.key);
console.log(this.keysPressed.toString())
console.log(this.translateDebug)
if (this.keysPressed.toString() === 'Control,Alt,Shift,T') this.translateDebug.toggleDebug();
}
@HostListener('window:keyup', ['$event'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="dialog">
<div class="dialog_header">
<div class="header_text">
<h4 class="title" translate="MODALS.ACCESSIBILITY_MODAL_HEADING"></h4>
<h4 class="title" translate="COMPONENTS.ACCESSIBILITY.MODAL_HEADING"></h4>
</div>
<div class="dialog_close">
<button class="btn_dialog_close icon" mat-dialog-close>
Expand All @@ -16,7 +16,7 @@ <h4 class="title" translate="MODALS.ACCESSIBILITY_MODAL_HEADING"></h4>
</div>
<div class="dialog_content">
<div class="accessibility_options_wrap">
<h4 translate="MODALS.ACCESSIBILITY_HEADING_CONTRAST"></h4>
<h4 translate="COMPONENTS.ACCESSIBILITY.HEADING_CONTRAST"></h4>

<div class="radio_wrap" (click)="setContrast('default')">
<div class="radio_text_wrap">
Expand All @@ -25,11 +25,11 @@ <h4 translate="MODALS.ACCESSIBILITY_HEADING_CONTRAST"></h4>
<input type="radio" [checked]="app.accessibility.value.contrast === 'default'" name="contrast"
value="default">
<span class="radio"></span>
<div class="radio_lable" translate="MODALS.ACCESSIBILITY_OPT_CONTRAST_DEFAULT">
<div class="radio_lable" translate="COMPONENTS.ACCESSIBILITY.OPT_CONTRAST_DEFAULT">
</div>
</label>
</div>
<div class="radio_description" translate="MODALS.ACCESSIBILITY_OPT_CONTRAST_DEFAULT_DESC"></div>
<div class="radio_description" translate="COMPONENTS.ACCESSIBILITY.OPT_CONTRAST_DEFAULT_DESC"></div>
</div>
<div class="radio_icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
Expand All @@ -48,11 +48,11 @@ <h4 translate="MODALS.ACCESSIBILITY_HEADING_CONTRAST"></h4>
<input type="radio" [checked]="app.accessibility.value.contrast === 'high_contrast'" checked="checked"
name="contrast" value="high_contrast">
<span class="radio"></span>
<div class="radio_lable" translate="MODALS.ACCESSIBILITY_OPT_CONTRAST_HIGH">
<div class="radio_lable" translate="COMPONENTS.ACCESSIBILITY.OPT_CONTRAST_HIGH">
</div>
</label>
</div>
<div class="radio_description" translate="MODALS.ACCESSIBILITY_OPT_CONTRAST_HIGH_DESC"></div>
<div class="radio_description" translate="COMPONENTS.ACCESSIBILITY.OPT_CONTRAST_HIGH_DESC"></div>
</div>
<div class="radio_icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
Expand All @@ -62,15 +62,15 @@ <h4 translate="MODALS.ACCESSIBILITY_HEADING_CONTRAST"></h4>
</svg>
</div>
</div>
<h4 translate="MODALS.ACCESSIBILITY_HEADING_TEXT_SIZE"></h4>
<h4 translate="COMPONENTS.ACCESSIBILITY.HEADING_TEXT_SIZE"></h4>

<div class="radio_wrap" (click)="setTextSize('')">
<div class="radio_text_wrap">
<div class="radio_lable_wrap">
<label class="radio_box">
<input type="radio" [checked]="app.accessibility.value.text === ''" name="textSize" value="">
<span class="radio"></span>
<div class="radio_lable" translate="MODALS.ACCESSIBILITY_OPT_TEXT_SIZE_DEFAULT">
<div class="radio_lable" translate="COMPONENTS.ACCESSIBILITY.OPT_TEXT_SIZE_DEFAULT">
</div>
</label>
</div>
Expand All @@ -85,7 +85,7 @@ <h4 translate="MODALS.ACCESSIBILITY_HEADING_TEXT_SIZE"></h4>
<label class="radio_box">
<input type="radio" [checked]="app.accessibility.value.text === 'large'" name="textSize" value="large">
<span class="radio"></span>
<div class="radio_lable" translate="MODALS.ACCESSIBILITY_OPT_TEXT_SIZE_LARGE">
<div class="radio_lable" translate="COMPONENTS.ACCESSIBILITY.OPT_TEXT_SIZE_LARGE">
</div>
</label>
</div>
Expand All @@ -101,7 +101,7 @@ <h4 translate="MODALS.ACCESSIBILITY_HEADING_TEXT_SIZE"></h4>
<input type="radio" [checked]="app.accessibility.value.text === 'extra_large'" name="textSize"
value="extra_large">
<span class="radio"></span>
<div class="radio_lable" translate="MODALS.ACCESSIBILITY_OPT_TEXT_SIZE_EXTRA_LARGE">
<div class="radio_lable" translate="COMPONENTS.ACCESSIBILITY.OPT_TEXT_SIZE_EXTRA_LARGE">
</div>
</label>
</div>
Expand All @@ -114,18 +114,18 @@ <h4 translate="MODALS.ACCESSIBILITY_HEADING_TEXT_SIZE"></h4>
</div>
<div class="dialog_info_wrap">
<div class="dialog_info">
<div class="bold" translate="MODALS.ACCESSIBILITY_HEADING_HAVING_ISSUES"></div>
<div class="bold" translate="COMPONENTS.ACCESSIBILITY.HEADING_HAVING_ISSUES"></div>
<div class="row"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 12V14L19 11.5L15 9V11H6V12H15Z" fill="#2C3B47" />
</svg>
<a href="https://citizenos.com/contact/" target="_blank" translate="MODALS.ACCESSIBILITY_READ_STATEMENT">
<a href="https://citizenos.com/contact/" target="_blank" translate="COMPONENTS.ACCESSIBILITY.READ_STATEMENT">
</a>
</div>
<div class="row">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 12V14L19 11.5L15 9V11H6V12H15Z" fill="#2C3B47" />
</svg>
<a href="https://citizenos.com/contact/" target="_blank" translate="MODALS.ACCESSIBILITY_CONTACT_US">
<a href="https://citizenos.com/contact/" target="_blank" translate="COMPONENTS.ACCESSIBILITY.CONTACT_US">
</a>
</div>
</div>
Expand Down
77 changes: 0 additions & 77 deletions src/app/core/components/activity-feed/activity-feed.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,80 +30,3 @@ <h3 translate="COMPONENTS.ACTIVITY_FEED.HEADING"></h3>
<activity [activitygroup]="item" *ngFor="let item of activities$ | async"></activity>
</div>
</div>

<!--div class="line lightest_line"></!--div>
<div id="root_lightbox" class="full_screen left_menu_visible">
<div id="lightbox" class="aligned_left_top">
<div id="lightbox_wrap">
<div id="lightbox_header">
<div id="lightbox_header_text">
<div class="title" translate="MODALS.ACTIVITY_MODAL_HEADING"></div>
{{ActivityService.params$.value['filter']?.toUpperCase()}}
<div [cosDropdown] class="classic_dropdown">
<div class="dropdown_selection">
<div class="dropdown_text medium"
translate="ACTIVITY_FEED.FILTER_{{((ActivityService.params$ | async)?.include?.toUpperCase() || 'ALL')}}">
</div>
<div class="arrow_holder">
<div class="table_cell">
<div class="sprite sprite-icon-dropdown-arrowdown2x"></div>
<div class="v_line"></div>
</div>
</div>
</div>
<div class="dropdown">
<!-- NO CATEGORY >
<div class="dropdown_item" *ngFor="let filter of ActivityService.filters"
(click)="filterActivities(filter)">
<div class="item_name medium" translate="ACTIVITY_FEED.FILTER_{{filter.toUpperCase()}}">
</div>
</div>
</div>
</div>
</div>
<div id="lightbox_close" mat-dialog-close>
<div class="table_cell">
<div class="sprite sprite-btn-popup-close2x">
</div>
</div>
</div>
</div>
<div class="line lightest_line"></div>
<!-- CONFIRM CONTENT >
<div class="lightbox_content" (scroll)="loadMore($event)">
<div class="lightbox_section">
<div class="activity_wrap modal">
<div class="activity_area">
<activity [activitygroup]="item" *ngFor="let item of activities$ | async"></activity>
</div>
</div>
</div>
</div>
<div class=" lightbox_background">
</div>
</div>
</div>
<div id="close_lightbox" mat-dialog-close>
</div>
</div-->
16 changes: 8 additions & 8 deletions src/app/core/components/create/create.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</div>
</div>
<div class="item_text_wrap">
<div class="item_title" translate="MODALS.CREATE_TITLE_DISCUSSION"></div>
<div class="item_description" translate="MODALS.CREATE_DESC_DISCUSSION"></div>
<div class="item_title" translate="COMPONENTS.CREATE.TITLE_DISCUSSION"></div>
<div class="item_description" translate="COMPONENTS.CREATE.DESC_DISCUSSION"></div>
</div>
<div class="icon_item icon_arrow_right"></div>
</div>
Expand All @@ -17,8 +17,8 @@
</div>
</div>
<div class="item_text_wrap">
<div class="item_title" translate="MODALS.CREATE_TITLE_IDEATION"></div>
<div class="item_description" translate="MODALS.CREATE_DESC_IDEATION"></div>
<div class="item_title" translate="COMPONENTS.CREATE.TITLE_IDEATION"></div>
<div class="item_description" translate="COMPONENTS.CREATE.DESC_IDEATION"></div>
</div>
<div class="icon_item icon_arrow_right"></div>
</div-->
Expand All @@ -29,8 +29,8 @@
</div>
</div>
<div class="item_text_wrap">
<div class="item_title" translate="MODALS.CREATE_TITLE_VOTE"></div>
<div class="item_description" translate="MODALS.CREATE_DESC_VOTE"></div>
<div class="item_title" translate="COMPONENTS.CREATE.TITLE_VOTE"></div>
<div class="item_description" translate="COMPONENTS.CREATE.DESC_VOTE"></div>
</div>
<div class="icon_item icon_arrow_right"></div>
</div>
Expand All @@ -43,8 +43,8 @@
</div>
</div>
<div class="item_text_wrap">
<div class="item_title" translate="MODALS.CREATE_TITLE_GROUP"></div>
<div class="item_description" translate="MODALS.CREATE_DESC_GROUP"></div>
<div class="item_title" translate="COMPONENTS.CREATE.TITLE_GROUP"></div>
<div class="item_description" translate="COMPONENTS.CREATE.DESC_GROUP"></div>
</div>
<div class="icon_item icon_arrow_right"></div>
</div>
Expand Down
13 changes: 0 additions & 13 deletions src/app/core/components/help/imgs/icon_bubble_close.svg

This file was deleted.

14 changes: 0 additions & 14 deletions src/app/core/components/help/imgs/icon_bubble_help.svg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,43 +33,3 @@ <h3 translate="MODALS.LANGUAGES_MODAL_HELP_US_TRANSLATE"></h3>
</div>
</div>
</div>
<!-- LIGHTBOX SKELETON >
<div id="root_lightbox" class="full_screen left_menu_visible">
<div id="lightbox" class="wide_lightbox with_header_menu">
<div id="lightbox_wrap">
<div id="lightbox_header">
<div id="lightbox_header_text">
<div class="title" translate="MODALS.LANGUAGES_MODAL_HEADING"></div>
</div>
<div id="lightbox_close" mat-dialog-close>
<div class="table_cell">
<div class="sprite sprite-btn-popup-close2x">
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="line lightest_line"></div>
<!-- SETTINGS >
<div class="lightbox_content settings_section_wrap">
<div class="lightbox_section language_section">
<div class="settings_section full_width">
<div class="language_cell" *ngFor="let language of languages$ | keyvalue"
(click)='doSwitchLanguage(language.key)'>
<label>
<div class="table_cell">
<div class="item_text " (click)='doSwitchLanguage(language.key)'
[ngClass]="translate.currentLang !== language.key ? 'blue_link' : 'gray_link'">{{language.value}}
</div>
</div>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="close_lightbox" mat-dialog-close>
</div>
</div-->
Loading

0 comments on commit 83f51fa

Please sign in to comment.