Language vars for button text

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
sajaki
Registered User
Posts: 86
Joined: Mon Jun 21, 2010 8:28 pm

Language vars for button text

Post by sajaki »

Hi,

Currently the text for posting buttons is fixed, as the text is determined by the button image :
  • New topic
  • PostReply
  • Locked
  • NewPM
  • Send Reply
  • Forward
  • Edit
  • Quote
  • PM
I'm making a new style, and i'm having to translate my fireworks source files into languages i have no clue of.
So i'd propose to put these in language variables.

Advantages :
  • Translators won't no longer have to edit the prosilver psd file and hardcode the translated text
  • Style editors just have to come up with the button png.
disadvantages :
None that i can come up with.

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

Re: [RFC] Language vars for button text

Post by MichaelC »

The problem is the text can be shorter/longer in different languages?
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.

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: [RFC] Language vars for button text

Post by Senky »

Well, but if this would use CSS3 properties, it could be done whole in CSS only, so that there would not be problem in shorter/longer texts in buttons. And looking at prosilver buttons, it would be pretty easy to do it in CSS only.

User avatar
Meis2M
Registered User
Posts: 448
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC] Language vars for button text

Post by Meis2M »

+1

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

Re: [RFC] Language vars for button text

Post by imkingdavid »

This has already been implemented. You can see it by viewing the page souce:

Code: Select all

<div class="reply-icon"><a href="./posting.php?mode=reply&f=84&t=41543" title="Post a reply"><span></span>Post a reply</a></div>
No <img> tag in sight.
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
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC] Language vars for button text

Post by oddfish »

sajaki wrote:... Currently the text for posting buttons is fixed ...
Is this what you had in mind? It does work and I'm sure you could change sprites and the font you want.
EDIT: Do note the code in those files are a little outdated so do merge with the latest carefully.

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: [RFC] Language vars for button text

Post by Dragosvr92 »

+1 Even if my opinion wont count much. :mrgreen:
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
canonknipser
Registered User
Posts: 71
Joined: Mon Sep 19, 2011 4:42 am
Location: Germany

Re: [RFC] Language vars for button text

Post by canonknipser »

imkingdavid wrote:This has already been implemented. You can see it by viewing the page souce:

Code: Select all

<div class="reply-icon"><a href="./posting.php?mode=reply&f=84&t=41543" title="Post a reply"><span></span>Post a reply</a></div>
No <img> tag in sight.
Not in html source, but in css as backgrund-image (stylesheet.css around line 17):

Code: Select all

/* Big button images */
.reply-icon span	{ background-image: url("./button_topic_reply.gif"); }
.post-icon span		{ background-image: url("./button_topic_new.gif"); }
.locked-icon span	{ background-image: url("./button_topic_locked.gif"); }
.pmreply-icon span	{ background-image: url("./button_pm_reply.gif") ;}
.newpm-icon span 	{ background-image: url("./button_pm_new.gif") ;}
.forwardpm-icon span	{ background-image: url("./button_pm_forward.gif") ;}
Greetings
Frank
phpbb.de support team member - no support via PM or mail
English is not my native language
Extensions and scripts for phpBB

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Language vars for button text

Post by brunoais »

Sorry, no dice.
We need to support IE8 and that browser has no (or almost no) support of CSS3.
I don't see a way to do that with CSS2

sajaki
Registered User
Posts: 86
Joined: Mon Jun 21, 2010 8:28 pm

Re: [RFC] Language vars for button text

Post by sajaki »

the ie8 argument is moot. just give us the necessary template variables so the style designer can make that choice.

Post Reply