<commit_before>#!/usr/bin/env perl
use warnings;
use strict;
#####
use locale ':not_characters';
#####
use Carp qw(confess);
use Data::Dumper;
use Getopt::Long;
use Hash::Util qw(lock_hash);
use Mojolicious::Lite 'Ravada::I18N';
#####
#my $self->plugin('I18N');
plugin I18N => {namespace => 'Ravada::I18N', default => 'en'};
#package Ravada::I18N:en;
#####

use YAML qw(LoadFile);

use lib 'lib';

use Ravada::Front;
use Ravada::Auth;
use POSIX qw(locale_h);

my $help;
my $FILE_CONFIG = "/etc/ravada.conf";

plugin Config => { file => 'rvd_front.conf' };
#####
#####
#####
# Import locale-handling tool set from POSIX module.
# This example uses: setlocale -- the function call
#                    LC_CTYPE -- explained below

# query and save the old locale
my $old_locale = setlocale(LC_CTYPE);

setlocale(LC_CTYPE, "en_US.ISO8859-1");
# LC_CTYPE now in locale "English, US, codeset ISO 8859-1"

setlocale(LC_CTYPE, "");
# LC_CTYPE now reset to default defined by LC_ALL/LC_CTYPE/LANG
# environment variables.  See below for documentation.

# restore the old locale
setlocale(LC_CTYPE, $old_locale);
#####
#####
#####


GetOptions(
     'config=s' => \$FILE_CONFIG
         ,help  => \$help
     ) or exit;

if ($help) {
    print "$0 [--help] [--config=$FILE_CONFIG]\n";
    exit;
}

our $RAVADA = Ravada::Front->new(config => $FILE_CONFIG);
our $TIMEOUT = 10;
our $USER;

our $DOCUMENT_ROOT = "/var/www";

init();
############################################################################3

any '/' => sub {
    my $c = shift;<commit_msg>disabled I18N untill properly verified<commit_after>#!/usr/bin/env perl
use warnings;
use strict;
#####
use locale ':not_characters';
#####
use Carp qw(confess);
use Data::Dumper;
use Getopt::Long;
use Hash::Util qw(lock_hash);
use Mojolicious::Lite 'Ravada::I18N';
#####
#my $self->plugin('I18N');
#package Ravada::I18N:en;
#####

use YAML qw(LoadFile);

use lib 'lib';

use Ravada::Front;
use Ravada::Auth;
use POSIX qw(locale_h);

my $help;
my $FILE_CONFIG = "/etc/ravada.conf";

plugin Config => { file => 'rvd_front.conf' };
#####
#####
#####
# Import locale-handling tool set from POSIX module.
# This example uses: setlocale -- the function call
#                    LC_CTYPE -- explained below

# query and save the old locale
my $old_locale = setlocale(LC_CTYPE);

setlocale(LC_CTYPE, "en_US.ISO8859-1");
# LC_CTYPE now in locale "English, US, codeset ISO 8859-1"

setlocale(LC_CTYPE, "");
# LC_CTYPE now reset to default defined by LC_ALL/LC_CTYPE/LANG
# environment variables.  See below for documentation.

# restore the old locale
setlocale(LC_CTYPE, $old_locale);
#####
#####
#####
#plugin I18N => {namespace => 'Ravada::I18N', default => 'en'};


GetOptions(
     'config=s' => \$FILE_CONFIG
         ,help  => \$help
     ) or exit;

if ($help) {
    print "$0 [--help] [--config=$FILE_CONFIG]\n";
    exit;
}

our $RAVADA = Ravada::Front->new(config => $FILE_CONFIG);
our $TIMEOUT = 10;
our $USER;

our $DOCUMENT_ROOT = "/var/www";

init();
############################################################################3

any '/' => sub {
    my $c = shift;
{'fraction_non_alphanumeric': 0.2222578576010263, 'fraction_numerical': 0.01603592046183451, 'mean_word_length': 4.386873920552677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '707663', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1075, 'n_words': 293}