<commit_before>/***************************************************************************
**
** Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (<EMAIL>)
**
** This file is part of libmeegotouch.
**
** If you have questions regarding the use of this file, please contact
** Nokia at <EMAIL>.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation
** and appearing in the file LICENSE.LGPL included in the packaging
** of this file.
**
****************************************************************************/

#include "mlocale.h"

#include <QStringList>
#include <QMutex>

#include "mlocale/mlocale.h"
#include "mcalendar.h"
#include "mlocale/mcalendar.h"
#include "mcollator.h"
#include "mlocale/mcollator.h"
#include "mlocale_proxy_p.h"
#include "mcalendar_proxy_p.h"
#include "mcollator_proxy_p.h"
#include "mlocalegconfconfigitemfactory.h"


static bool g_configItemFactorySet = false;

MLocalePrivate::MLocalePrivate() : pLocale( 0 )
{
    if ( ! g_configItemFactorySet )
    {
        ML10N::MLocale::setConfigItemFactory( new MLocaleGConfConfigItemFactory );
        g_configItemFactorySet = true;
    }
}

MLocalePrivate::~MLocalePrivate()
{
    delete pLocale;
}


void MLocale::initMLocale()
{
    // now we set the gconf config item factory.
    ML10N::MLocale::setConfigItemFactory( new MLocaleGConfConfigItemFactory );
    g_configItemFactorySet = true;
}

void MLocale::clearSystemDefault()
{
    ML10N::MLocale::clearSystemDefault();
}

MLocale * MLocale::createSystemMLocale()<commit_msg>Fixes: NB#288879 - feeds title is displaying with logical name<commit_after>/***************************************************************************
**
** Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (<EMAIL>)
**
** This file is part of libmeegotouch.
**
** If you have questions regarding the use of this file, please contact
** Nokia at <EMAIL>.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation
** and appearing in the file LICENSE.LGPL included in the packaging
** of this file.
**
****************************************************************************/

#include "mlocale.h"

#include <QStringList>
#include <QMutex>

#include "mlocale/mlocale.h"
#include "mcalendar.h"
#include "mlocale/mcalendar.h"
#include "mcollator.h"
#include "mlocale/mcollator.h"
#include "mlocale_proxy_p.h"
#include "mcalendar_proxy_p.h"
#include "mcollator_proxy_p.h"
#include "mlocalegconfconfigitemfactory.h"


static bool g_configItemFactorySet = false;

static bool g_translationPathsInitialized = false;

MLocalePrivate::MLocalePrivate() : pLocale( 0 )
{
    // make sure we set the right translation paths by default when
    // creating the first MLocalePrivate
    if ( ! g_translationPathsInitialized )
    {
        if ( ML10N::MLocale::translationPaths().isEmpty() )
        {
            ML10N::MLocale::setTranslationPaths(
                (QStringList() << QString(TRANSLATION_DIR)) );
        }

        g_translationPathsInitialized = true;
    }

    if ( ! g_configItemFactorySet )
    {
        ML10N::MLocale::setConfigItemFactory( new MLocaleGConfConfigItemFactory );
        g_configItemFactorySet = true;
    }
}

MLocalePrivate::~MLocalePrivate()
{
    delete pLocale;
}


void MLocale::initMLocale()
{
    // now we set the gconf config item factory.
    ML10N::MLocale::setConfigItemFactory( new MLocaleGConfConfigItemFactory );
    g_configItemFactorySet = true;
}

void MLocale::clearSystemDefault()
{
    ML10N::MLocale::clearSystemDefault();
}

MLocale * MLocale::createSystemMLocale()
{'fraction_non_alphanumeric': 0.17737465356512974, 'fraction_numerical': 0.011085915847820609, 'mean_word_length': 4.855457227138643, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '1989816', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1182, 'n_words': 321}