phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] Colons in language variables

These requests for comments 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.

[RFC] Colons in language variables

Postby Maël Soucaze » Tue Apr 17, 2012 3:34 pm

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
MAËL SOUCAZE • STYLES TEAM MEMBER • TRANSLATIONS & INTERNATIONAL SUPPORT TEAMS MANAGER
STOP ACTA! HTTP://WWW.STOPACTA.INFO/
Maël Soucaze
Registered User
 
Posts: 17
Joined: Thu Jul 07, 2005 7:45 am
Location: France

Re: [RFC|Accepted] Coding Guideline Modifications

Postby imkingdavid » Tue Apr 17, 2012 5:34 pm

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
imkingdavid
Development Team
Development Team
 
Posts: 902
Joined: Thu Jul 30, 2009 12:06 pm

[RFC] Colons in language variables

Postby nickvergessen » Sun Apr 22, 2012 9:44 pm

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?
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: [RFC|Accepted] Coding Guideline Modifications

Postby MichaelC » Sun Apr 22, 2012 9:56 pm

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?
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
MichaelC
Website Team
Website Team
 
Posts: 797
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Postby nickvergessen » Mon Apr 23, 2012 7:40 am

cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: [RFC] Colons in language variables

Postby Erik Frèrejean » Fri Apr 27, 2012 2:47 pm

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
Erik Frèrejean
Registered User
 
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet

Re: [RFC] Colons in language variables

Postby Maël Soucaze » Fri Apr 27, 2012 4:08 pm

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. :)
MAËL SOUCAZE • STYLES TEAM MEMBER • TRANSLATIONS & INTERNATIONAL SUPPORT TEAMS MANAGER
STOP ACTA! HTTP://WWW.STOPACTA.INFO/
Maël Soucaze
Registered User
 
Posts: 17
Joined: Thu Jul 07, 2005 7:45 am
Location: France

Re: [RFC] Colons in language variables

Postby Erik Frèrejean » Fri Apr 27, 2012 9:20 pm

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
Erik Frèrejean
Registered User
 
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet

Re: [RFC] Colons in language variables

Postby nickvergessen » Sat Apr 28, 2012 7:18 am

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)
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: [RFC] Colons in language variables

Postby bantu » Wed Jun 13, 2012 9:47 pm

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.
User avatar
bantu
3.0 Release Manager
3.0 Release Manager
 
Posts: 438
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany

Next

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: No registered users and 7 guests