[ALPHA] phpBB Translator

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Post Reply
User avatar
orynider
Registered User
Posts: 137
Joined: Wed Nov 16, 2005 12:48 pm
Location: Arad, România
Name: Florin Bodin
Contact:

[ALPHA] phpBB Translator

Post by orynider » Fri Mar 30, 2018 7:44 am

Extension Name: phpBB Translator
Author: Author Username

Extension Description: Translator extension for phpBB based on module by culprit_cz for AdminCP. Adds Google Translate to the Forum Header.
Extension Version: 1.0.0-alpha

Requirements: "php": ">=5.3.3",
"phpbb/phpbb": ">=3.1.0"

Features: Feature List. Use the
    Adds Google Translate to the ACP and Translate to the Forum Header.

    Screenshots: Image

    Extension Download: https://github.com/orynider/mx_translator/releases

    Extension To Do:
    • Make use of UTF-8 Tools for encoding files - if is required.
    • Add single google translate api code to extension configuration page and db migration for phpbb_config table.
    • The extension is feature open and users can request features.
    Last edited by orynider on Sat Mar 31, 2018 9:13 pm, edited 1 time in total.

    User avatar
    eunaumtenhoid
    Registered User
    Posts: 740
    Joined: Wed Jun 03, 2009 12:46 am
    Location: ????

    Re: [ALPHA] phpBB Translator

    Post by eunaumtenhoid » Sat Mar 31, 2018 1:39 am

    tranlator languague files of other extension??
    My translations of the extensions for Brazilian Portuguese
    https://github.com/phpBBTraducoes

    User avatar
    orynider
    Registered User
    Posts: 137
    Joined: Wed Nov 16, 2005 12:48 pm
    Location: Arad, România
    Name: Florin Bodin
    Contact:

    Re: [ALPHA] phpBB Translator

    Post by orynider » Sat Mar 31, 2018 8:03 pm

    eunaumtenhoid wrote:
    Sat Mar 31, 2018 1:39 am
    tranlator languague files of other extension??
    Now that You say the query is only taking the first row, but this has worked before with same php 5.6.33, Zend Engine v2.6.0, mysqlnd 5.0.11-dev.

    We have in controller\mxp_translator.php @line 1097

    Code: Select all

    				// Now only pull the data of the requested topics
    				$sql_array = array(
    					'SELECT'    => 'e.*',
    					'FROM'      => array(EXT_TABLE => 'e'),
    				); 			
    				$sql = $this->db->sql_build_query('SELECT', $sql_array);
    				$rs = $this->db->sql_query_limit($sql, 10);
    				$file_list = array();
    				$row1 = $this->db->sql_fetchrow($rs); 
    				print_r($row1);
    				$row2 = $this->db->sql_fetchrow($rs);
    				print_r($row2);
    				
    				$row = array_merge($row1, $row2);
    				print_r($row);
    
    This outputs when You select in ACP -> TRANSLATOR (mx_translator) -> PHPBB EXT (php_ext)

    Code: Select all

    Array ( [ext_name] => orynider/mx_translator [ext_active] => 1 [ext_state] => b:0; ) 
    Array ( [ext_name] => threedi/dae [ext_active] => 1 [ext_state] => b:0; ) 
    
    Array ( [ext_name] => threedi/dae [ext_active] => 1 [ext_state] => b:0; ) 
    
    No problems with ACP -> TRANSLATOR (mx_translator) -> PHPBB Core (PHPBB)

    This is probably a server cache problem or someone tries to convince us is only translating one extension at a time :o

    Edit:
    Here is how to translate an extension php file atm:
    Image
    Image
    Image


    Edit: If Anyone testing this and having more then one extension installed can conform this. 10x ;)

    User avatar
    orynider
    Registered User
    Posts: 137
    Joined: Wed Nov 16, 2005 12:48 pm
    Location: Arad, România
    Name: Florin Bodin
    Contact:

    Re: [ALPHA] phpBB Translator

    Post by orynider » Mon Apr 02, 2018 6:14 pm

    As "Feature Request" I would have need this to be added to UserCP, for example, or to ModCP, for a Group of users let's say "Translators" or "T" like in AdminCP.
    Probably the Admin should use in Beta version a singular Google Translate code not to ban the Server IP for translating 250 words / language key since there are language files with many keys or few keys and many text as in help/faq.php.
    Another idea would be to add another option in the extension configuration settings so that Google Translate can be disabled and this can be added when the option for code is added.

    NastyBoy
    Registered User
    Posts: 74
    Joined: Wed May 31, 2017 7:03 pm
    Location: Germany
    Name: Tim
    Contact:

    Re: [ALPHA] phpBB Translator

    Post by NastyBoy » Wed Apr 11, 2018 2:04 pm

    is it also possible to display the language that the board has installed in each forum? I just want the forums translated

    User avatar
    orynider
    Registered User
    Posts: 137
    Joined: Wed Nov 16, 2005 12:48 pm
    Location: Arad, România
    Name: Florin Bodin
    Contact:

    Re: [ALPHA] phpBB Translator

    Post by orynider » Wed Apr 18, 2018 2:57 pm

    NastyBoy wrote:
    Wed Apr 11, 2018 2:04 pm
    is it also possible to display the language that the board has installed in each forum? I just want the forums translated
    What if one language file let's say es\common.php is only translated with Google Translate?
    How can we determine in PHP if it's translated or not?

    We could use colors as green for language files in translation with empty arrays, and blue for translated, and red for read-only files.

    Post Reply

    Return to “Extensions in Development”

    Who is online

    Users browsing this forum: Bing [Bot] and 6 guests