<commit_before>import { Injectable } from '@angular/core';
// Services
import { LogService, i18nService,
         ConfigService, SessionService,
         UploadService } from 'app/services';
import { ActionStatus } from 'app/enums';

@Injectable()
export class ToastService {
    
    constructor(/*private translate: i18nService*/) { }

    public show(message: string, caption: string, status: ActionStatus, 
                     progress: boolean = false, timeout: number = 2000,
                     position: string = 'toast-top-center') {
        toastr.options.timeOut = timeout;
        toastr.options.progressBar = progress;
        toastr.options.positionClass = position;
        switch (status) {
            case ActionStatus.Success:
                {
                    toastr.info(message, caption);
                }
                break;
            case ActionStatus.Failure:
            case ActionStatus.Canceled:
                {
                    // toastr.warning(message, this.translate.instant('Warning'));<commit_msg>activate i18nService<commit_after>import { Injectable } from '@angular/core';
// Services
import { LogService, i18nService,
         ConfigService, SessionService,
         UploadService } from 'app/services';
import { ActionStatus } from 'app/enums';

@Injectable()
export class ToastService {
    
    constructor(private translate: i18nService) { }

    public show(message: string, caption: string, status: ActionStatus, 
                     progress: boolean = false, timeout: number = 2000,
                     position: string = 'toast-top-center') {
        toastr.options.timeOut = timeout;
        toastr.options.progressBar = progress;
        toastr.options.positionClass = position;
        switch (status) {
            case ActionStatus.Success:
                {
                    toastr.info(message, caption);
                }
                break;
            case ActionStatus.Failure:
            case ActionStatus.Canceled:
                {
                    toastr.warning(message, this.translate.instant('Warning'));
{'fraction_non_alphanumeric': 0.09723546234509056, 'fraction_numerical': 0.008579599618684462, 'mean_word_length': 1.994293865905849, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3091986', 'n_tokens_mistral': 551, 'n_tokens_neox': 520, 'n_words': 118}