[3.2][RC] Translate Topic Titles

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: 248
Joined: Wed Nov 16, 2005 12:48 pm
Location: Arad, România
Name: Florin Bodin
Contact:

[3.2][RC] Translate Topic Titles

Post by orynider » Wed May 01, 2019 5:47 am

Extension Name: Translate Topic Titles
Author: Author Username

Extension Request Topic: viewtopic.php?f=496&t=2508416

Extension Description: This extension adds the possibility of being able to translate topic titles. Based on permissions per forum and rmcgirr83/topicdescription. Topic Titles are translated in viewtopic, viewforum, search results (only display results as topic) and MCP forum..

Extension Version: 1.0.0

Requirements: "php": ">=5.3.3",
"phpbb/phpbb": ">=3.1.0,<3.3.0@dev"

Screen Shout: The language key here "FAQ_EXPLAIN" is expanded to his value.
Image

Demo:
http://mxp.bluepink.ro/phpBB/index.php

Download:
https://github.com/orynider/translatetitle/releases

Features:
  • able to translate topic titles in viewtopic.
  • able to translate topic titles in viewforum.
  • able to translate topic titles lastpost in forum index .
  • able to translate topic titles in modcp.
  • Languages: :flag_gb: - :flag_ro:
Installation:

Extract the zip orynider to the ext directory of your forum
Navigate in the ACP to Customise -> Extension Management -> Extensions.
Click Enable on "Translate Topic Titles"

Frequently Asked Questions:

How to use core tags?
How to use core phpBB language key tags as multilingual topic titles?

You can reuse any core tags such as ALL_FORUMS, FAQ_EXPLAIN, etc. as subject or topic title. The tags will be automatically translated in last message on forum index, in viewforum, viewtopic, and in main modcp index.


How to use custom tags?
How to use custom phpBB language key tags as multilingual topic titles?

You can edit with Your source code editor such as Notepad++ or TexPad the language file included with the extension for each language, i.e. for English: ext\orynider\translatetitle\language\en\common.php, to add a multilingual subject for topic title. The tags will be automatically translated in last message on forum index, in viewforum, viewtopic, and in main modcp index.

For example TOPIC_TITLE will be expanded as 'Topic Title' for English and as 'Titlul topicului' for Romanian.
Last edited by orynider on Thu May 02, 2019 10:39 am, edited 8 times in total.

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

Re: [3.2][BETA] Translate Topic Titles

Post by orynider » Wed May 01, 2019 11:20 am

Reversed for extension author.

Holger
Registered User
Posts: 1739
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [3.2][RC] Translate Topic Titles

Post by Holger » Thu May 02, 2019 7:11 am

I am not really sure what this ext does? Can you please explain more?

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

Re: [3.2][RC] Translate Topic Titles

Post by orynider » Thu May 02, 2019 10:41 am

Holger wrote:
Thu May 02, 2019 7:11 am
I am not really sure what this ext does? Can you please explain more?
Edited first message.

Frequently Asked Questions:

How to use core tags?
How to use core phpBB language key tags as multilingual topic titles?

You can reuse any core tags such as ALL_FORUMS, FAQ_EXPLAIN, etc. as subject or topic title. The tags will be automatically translated in last message on forum index, in viewforum, viewtopic, and in main modcp index.


How to use custom tags?
How to use custom phpBB language key tags as multilingual topic titles?

You can edit with Your source code editor such as Notepad++ or TexPad the language file included with the extension for each language, i.e. for English: ext\orynider\translatetitle\language\en\common.php, to add a multilingual subject for topic title. The tags will be automatically translated in last message on forum index, in viewforum, viewtopic, and in main modcp index.

User avatar
david63
Registered User
Posts: 16197
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][RC] Translate Topic Titles

Post by david63 » Thu May 02, 2019 11:52 am

orynider wrote:
Thu May 02, 2019 10:41 am
You can edit with Your source code editor such as Notepad++ or TexPad the language file included with the extension for each language, i.e. for English: ext\orynider\translatetitle\language\en\common.php, to add a multilingual subject for topic title.
The editing of extension files to achieve some functionality is not the correct way that extensions work. An extension should be self contained and any additional files should be created via the extension (usually in the ACP) and then saved into the store folder. Manually editing of any file, be it part of the extension or core file, is not permitted for an extension.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

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

Re: [3.2][RC] Translate Topic Titles

Post by eunaumtenhoid » Thu May 02, 2019 7:14 pm

when creating a topic you add a language string in the title of the topic is this?
My translations of the extensions for Brazilian Portuguese
https://github.com/phpBBTraducoes

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

Re: [3.2][RC] Translate Topic Titles

Post by orynider » Fri May 03, 2019 7:11 pm

eunaumtenhoid wrote:
Thu May 02, 2019 7:14 pm
when creating a topic you add a language string in the title of the topic is this?
You can reuse any language key from any language file loaded, and Yes, You can add a new language string with key for the topic and value for each language.

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

Re: [3.2][RC] Translate Topic Titles

Post by orynider » Fri May 03, 2019 7:14 pm

david63 wrote:
Thu May 02, 2019 11:52 am
The editing of extension files to achieve some functionality is not the correct way that extensions work. An extension should be self contained and any additional files should be created via the extension (usually in the ACP) and then saved into the store folder. Manually editing of any file, be it part of the extension or core file, is not permitted for an extension.
You can reuse any language key from phpBB Core after You install the extension, it's NOT required that You edit any file before nor after install.

User avatar
david63
Registered User
Posts: 16197
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][RC] Translate Topic Titles

Post by david63 » Fri May 03, 2019 7:50 pm

orynider wrote:
Fri May 03, 2019 7:14 pm
You can reuse any language key from phpBB Core after You install the extension, it's NOT required that You edit any file before nor after install.
Then you need to make clear what is supposed to happen because you say
orynider wrote:
Thu May 02, 2019 10:41 am
You can edit with Your source code editor such as Notepad++ or TexPad the language file included with the extension for each language, i.e. for English: ext\orynider\translatetitle\language\en\common.php, to add a multilingual subject for topic title. The tags will be automatically translated in last message on forum index, in viewforum, viewtopic, and in main modcp index.
which clearly says that you "can edit"

As this is at the moment I have absolutely no idea how this is expected to work.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

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

Re: [3.2][RC] Translate Topic Titles

Post by eunaumtenhoid » Sat May 04, 2019 1:51 am

fantastic, BUT it would be even better if I could add language string via ACP

nice work ty
My translations of the extensions for Brazilian Portuguese
https://github.com/phpBBTraducoes

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

Re: [3.2][RC] Translate Topic Titles

Post by orynider » Sat May 04, 2019 11:44 pm

david63 wrote:
Fri May 03, 2019 7:50 pm
which clearly says that you "can edit"

As this is at the moment I have absolutely no idea how this is expected to work.
"You can" but is not "required", just install the extension take a look in language/common.php, search for a string let's say:

Code: Select all

	'SORT_TOPIC_TITLE'			=> 'Topic title',
Then open a new topic with the subject from the string key that You found, in this example: SORT_TOPIC_TITLE, then submit the message.

P.S. Before You try this You could select another language in the UCP if '?lang=es' etc is not working.
Last edited by orynider on Sun May 05, 2019 12:11 am, edited 1 time in total.

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

Re: [3.2][RC] Translate Topic Titles

Post by orynider » Sat May 04, 2019 11:51 pm

eunaumtenhoid wrote:
Sat May 04, 2019 1:51 am
fantastic, BUT it would be even better if I could add language string via ACP

nice work ty
I have such admin file at MXP-CMS but is using print_r(var-or-array, true) in many places and will be never accepted even as a new extension in the CDB. I did taken in consideration how to convert array to string with the porpose to show and edit in ACP the source for some values that are arrays inside the language files and avoiding print_r() but I have less time atm to rewrite this code that is working for me.

User avatar
david63
Registered User
Posts: 16197
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][RC] Translate Topic Titles

Post by david63 » Sun May 05, 2019 7:23 am

orynider wrote:
Sat May 04, 2019 11:44 pm
Then open a new topic with the subject from the string key that You found, in this example: SORT_TOPIC_TITLE, then submit the message.
OK that I can understand but how would a normal user know about them? Also is this not a bit restrictive in that you can only use pre-defined language keys - how would I, for example, enter "Translate Topic Titles"?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

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

Re: [3.2][RC] Translate Topic Titles

Post by orynider » Sun May 05, 2019 10:04 am

david63 wrote:
Sun May 05, 2019 7:23 am
OK that I can understand but how would a normal user know about them? Also is this not a bit restrictive in that you can only use pre-defined language keys - how would I, for example, enter "Translate Topic Titles"?
For "Translate Topic Titles" You need to add a new language string, that will not extendend this extension's functionality, and since you can overwrite any core files in phpBB/language/ folder with an upgrade from 3.2.x to 3.3.x etc, I included this demo language file within the extension were an webmaster can add new lines with keys and values and so that in future when we have an extension that is compatible with the phpBB Guid Lines that adds and edits language strings via ACP we can merge it with this extension.

Another ideea would be that we make a backup of the language strings in the database as the FAQ Editor Extension does and we can restore them from the database after a full upgrade of core and extensions.

Probably we should add a FAQ for webmasters that 'Before Upgrade make sure you have backups of the orynider/translatetitle/language/ subfolders' specialy for language subfolders included in the extension so that Your topics will not look like 'TRANSLATE_TOPIC_TITLE'.

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

Re: [3.2][RC] Translate Topic Titles

Post by NastyBoy » Tue Jun 04, 2019 6:52 pm

I will test it and give you Feedback

Post Reply

Return to “Extensions in Development”