Enabling to translate "Re:" on others languages

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
hrx

Enabling to translate "Re:" on others languages

Post by hrx »

Hello,

I've a question to developers of phpBB 3.1, why you didn't enable translating the text "Re:" on other language? Why it isn't in language/en/posting.php :?: At present it is in phpBB3/posting.php

Code: Select all

if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)
{
	$post_data['post_subject'] = ((strpos($post_data['post_subject'], 'Re: ') !== 0) ? 'Re: ' : '') . censor_text($post_data['post_subject']);
}
If translating this text into other language is possible I would ask for implementing such a possibility.

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: Enabling to translate "Re:" on others languages

Post by Nicofuma »

IIRC it's because it's not possible to translate in the reader language because it's a part of the title (which can be removed/altered).
Member of the phpBB Development-Team
No Support via PM

hrx

Re: Enabling to translate "Re:" on others languages

Post by hrx »

And so what that this can be deleted or altered? I'm not really understand what you mean in what you wrote, what it has common of enabling to the possibility translating it into any language?

User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: Enabling to translate "Re:" on others languages

Post by A_Jelly_Doughnut »

This was implemented long ago by shs, and then reverted. I couldn't find the commit right away, I'm 95% sure it was before we used github.

The problem isn't deleting it, it is what happens on a multi-language board.

For example:
Re: Enabling to translate "Re:" on others languages [English user replies]
От: Enabling to translate "Re:" on others languages [Russian user replies]
Ré: Enabling to translate "Re:" on others languages [French user replies]
От: Enabling to translate "Re:" on others languages [Russian user replies]
回复:Enabling to translate "Re:" on others languages [Chinese (simplified) user replies]
Re: Enabling to translate "Re:" on others languages [English user replies]

Etc.

This would be OK if you, presumably like most boards, only had one language pack installed. It was simply decided way back in history that leaving it in "Latin" was preferable to showing potentially dozens of prefixes.

EDIT: Actually, it's worse than this, as it was implemented long ago. Taking the same example I used earlier, what that implementation did was:
Re: Enabling to translate "Re:" on others languages [English user replies]
От: Re: Enabling to translate "Re:" on others languages [Russian user replies]
Ré: От: Re: Enabling to translate "Re:" on others languages [French user replies]
От: Ré: От: Re: Enabling to translate "Re:" on others languages [Russian user replies]
回复: От: Ré: От: Re: Enabling to translate "Re:" on others languages [Chinese (simplified) user replies]
Re: 回复: От: Ré: От: Re: Enabling to translate "Re:" on others languages [English user replies]

And pretty quickly you'd hit the 60 character post subject limit.
Relevant commits: https://github.com/phpbb/phpbb/commit/5 ... f12fa83049
https://github.com/phpbb/phpbb/commit/a ... 557ff36e2f
A_Jelly_Doughnut

User avatar
pierredu
Registered User
Posts: 44
Joined: Sat Dec 05, 2015 7:21 am

Re: Enabling to translate "Re:" on others languages

Post by pierredu »

The real best thing xould be to select in the ACP the prefix (or no prefix) and use it in the code to add something before if it not yet there.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Enabling to translate "Re:" on others languages

Post by DavidIQ »

^ a setting for something as trivial as this??? No thanks. Plus specifying what the prefix would be doesn't really make a whole lot of sense since it's really a language string. If anything we should just go with not displaying the reply title if it matches the original title, which is the other topic referenced above.
Image

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: Enabling to translate "Re:" on others languages

Post by MattF »

As I mentioned in the other topic, you can't just turn this on or off at will. This is stored in the database with each and every title. The mst anyone could hope for is if they were just remove from phpBB all together by an update. However, IMO they are totally appropriate.
Has an irascible disposition.

hrx

Re: Enabling to translate "Re:" on others languages

Post by hrx »

A_Jelly_Doughnut wrote: Wed Dec 16, 2015 7:57 pm This would be OK if you, presumably like most boards, only had one language pack installed. It was simply decided way back in history that leaving it in "Latin" was preferable to showing potentially dozens of prefixes.
My board has only one language and therefore it surprised me why "Re:" can't translate on my language.

User avatar
DarkBeing
Registered User
Posts: 83
Joined: Sun Jul 19, 2009 2:32 pm
Location: Currently Estonia
Contact:

Re: Enabling to translate "Re:" on others languages

Post by DarkBeing »

Well, if in the current implemented form "Re:" can not be translated than maybe it should be solved in a different way. Maybe by splitting it from the title or enabling translation at least for boards who have only one other language installed.

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: Enabling to translate "Re:" on others languages

Post by Nicofuma »

It can't be split from the title because it is a part a the title (you can edit it)
Member of the phpBB Development-Team
No Support via PM

Post Reply