[RFC] Colons in language variables

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
User avatar
Qiaeru
Registered User
Posts: 32
Joined: Thu Jul 07, 2005 7:45 am
Location: Paris, France
Contact:

[RFC] Colons in language variables

Post by Qiaeru »

What do you think about including colons in language files instead of template files? In some languages, a space is needed before it. For example, in French, a space is required both before and after all two- (or more) part punctuation marks and symbols, including : ; « » ! ? % $ #. Making this change assures us of being compatible with all languages ​​of the world. Any feedback is welcome. ;)

Ticket: http://tracker.phpbb.com/browse/PHPBB3-10780
Patch: https://github.com/phpbb/phpbb3/pull/730

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by imkingdavid »

Maël Soucaze wrote:What do you think about including colons in language files instead of template files? In some languages, a space is needed before it. For example, in French, a space is required both before and after all two- (or more) part punctuation marks and symbols, including : ; « » ! ? % $ #. Making this change assures us of being compatible with all languages ​​of the world. Any feedback is welcome. ;)

Ticket: http://tracker.phpbb.com/browse/PHPBB3-10780
Patch: https://github.com/phpbb/phpbb3/pull/730
I'm okay with it. We'll need to make sure the MOD/Ext team is aware of this as well for MOD translations. But yeah, if it's something that is done differently across languages, it should be in the language files.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

[RFC] Colons in language variables

Post by nickvergessen »

Maël Soucaze wrote:What do you think about including colons in language files instead of template files? In some languages, a space is needed before it. For example, in French, a space is required both before and after all two- (or more) part punctuation marks and symbols, including : ; « » ! ? % $ #. Making this change assures us of being compatible with all languages ​​of the world. Any feedback is welcome. ;)

Ticket: http://tracker.phpbb.com/browse/PHPBB3-10780
Patch: https://github.com/phpbb/phpbb3/pull/730
I disagree.

But can we discuss that in a different topic?
Member of the Development-TeamNo Support via PM

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by MichaelC »

nickvergessen wrote:I disagree.

But can we discuss that in a different topic?
Its a coding guidelines change?

Why do you disagree? I can't see any disadvantages and you haven't offered any? However there is the advantage of some languages having a space before a colon, some don't? And we include other characters in languages, why not colons?
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by nickvergessen »

Member of the Development-TeamNo Support via PM

User avatar
Erik Frèrejean
Registered User
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet
Contact:

Re: [RFC] Colons in language variables

Post by Erik Frèrejean »

I must have missed this topic, so per Nils I'll post here as well.
I'm with Nick, a big -1 one a change that introduces this much duplication for a very limited use case.

If the space is an issue why not simply add a space on the end of the original language entry for those languages that need it?
Or else change the : to {L_COLON} and have it customized through a single entry.
Available on .com
Support Toolkit developer

User avatar
Qiaeru
Registered User
Posts: 32
Joined: Thu Jul 07, 2005 7:45 am
Location: Paris, France
Contact:

Re: [RFC] Colons in language variables

Post by Qiaeru »

Concerning changing : to {L_COLON}, we really don't know if it works every time in all the languages. Understand that I would have been very happy that this solution is the best, it would have saved me hours of work, but it's simply not the cleanest solution.

Concerning double language keys, at first I did not plan to do that. Personally, I do not agree with that. By default, those language keys will be unused by the software. I was asked to do this for style authors, to allow to include a version without colons. That's a good idea, but I think we should not include both versions just on the assumption that only certain style authors will use those versions without colons. Personally, I am skeptical and I do not think this version without a colon will be a popular one. But I have to admit that this is also a solution that will satisfy everyone, language pack authors and style authors.

The patch is not complete yet, many language keys in the ACP using a different system to the colons in the template files have to be changed. Many changes, but that's why I waited to propose them for 3.1. Colons should have been in the language files from the beginning. :)

User avatar
Erik Frèrejean
Registered User
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet
Contact:

Re: [RFC] Colons in language variables

Post by Erik Frèrejean »

Maël Soucaze wrote:Colons should have been in the language files from the beginning. :)
Yes they should, but IMO the current patch isn't the solution.
If it is okay to create a diff this size for such an (IMHO) trivial problem why not simply remove all the colons from the templates and assign them properly from the language files (as indeed should have been done from the beginning). With the current patch all those lines are touched anyways so might as well fix it properly.
Maël Soucaze wrote:I was asked to do this for style authors, to allow to include a version without colons
Well that might be nice to have as an style author but I don't believe that, that justifies the amount of duplication that is going on at the moment.
Available on .com
Support Toolkit developer

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] Colons in language variables

Post by nickvergessen »

Maël Soucaze wrote:Concerning changing : to {L_COLON}, we really don't know if it works every time in all the languages. Understand that I would have been very happy that this solution is the best, it would have saved me hours of work, but it's simply not the cleanest solution.
Well, I'd go with it, until someone complains about that it is not working with their language package.

phpBB 3.0 is now 4+ years old, and no one did ever complain. If for someone the {L_COLON} version is not working, the current version should not work either, because the only change we will do is replace the hardcoded : with a lang-var.

So I'd really prefer that one. (Although that means that you Mael made a lot of extra/useless work)
Member of the Development-TeamNo Support via PM

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Colons in language variables

Post by bantu »

Duplicating so many language entries seems suboptimal to me.

I think first it should be researched how colons are handled by other software projects. We are probably not the first software project with this problem.

Looking at http://en.wikipedia.org/wiki/Colon_%28p ... 29#Spacing it looks like french is the only affected language. In that case I'd prefer the L_COLON version.

Post Reply