oneall / social-login-phpbb

Social Login for phpBB allows your users to login and register with 40+ social networks. It increases your phpBB user registration rate by simplifying the registration process.
https://docs.oneall.com/plugins/guide/social-login-phpbb/
52 stars 33 forks source link

Language Strings are displaying incorrectly #8

Closed ghost closed 9 years ago

ghost commented 9 years ago

I've update to the master version from here and I'm experiencing the same problem as the current stable release version. All the strings aren't being translated properly, instead showing the placeholder.

OA_SOCIAL_LOGIN_TITLE_HELP

OA_SOCIAL_LOGIN_FOLLOW_US_TWITTER
OA_SOCIAL_LOGIN_READ_DOCS
OA_SOCIAL_LOGIN_DISCOVER_PLUGINS
OA_SOCIAL_LOGIN_GET_HELP

I've installed it at the following path: ext/oneall/sociallogin

SchlesserClaude commented 9 years ago

The extension includes two languages files, located here: https://github.com/oneall/social-login-phpbb/tree/master/%5B%20%3E%3D%203.1.%20%5D%20EXTENSION/oneall/sociallogin/language

Are you using a different language? Please try renaming "en" to the code of the language that you are using.

ghost commented 9 years ago

I'm using the language British English inside the administration panel in phpbb

fade2gray commented 9 years ago

I got around this by making the following change to oneall/sociallogin/acp/sociallogin_acp_module.php.

Find...

    public function admin_main ()
    {
        global $db, $user, $auth, $template, $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;

On a new line after - add...

        // Add the language file.
        $user->add_lang_ext ('oneall/sociallogin', 'backend');

What it doesn't fix for me is...

ghost commented 9 years ago

I've managed to get the language using a slightly different approach.

Edit oneall/sociallogin/event/listener.php

Find...
        /**
         * Add Social Login language file.
         */
        public function add_language ($event)
        {
                $lang_set_ext = $event['lang_set_ext'];
                $lang_set_ext[] = array(
                        'ext_name' => 'oneall/sociallogin',
                        'lang_set' => 'frontend',
                );
                $event['lang_set_ext'] = $lang_set_ext;
        }
Replace with...
        /**
         * Add Social Login language file.
         */
        public function add_language ($event)
        {
                $lang_set_ext = $event['lang_set_ext'];
                $lang_set_ext[] = array(
                        'ext_name' => 'oneall/sociallogin',
                        'lang_set' => 'frontend',
                );
                $lang_set_ext[] = array(
                        'ext_name' => 'oneall/sociallogin',
                        'lang_set' => 'backend',
                );
                $event['lang_set_ext'] = $lang_set_ext;
        }
SchlesserClaude commented 9 years ago

Thank you very much for the solutions! I have now added them to the repository.