Re: [poedit-users] php string variables in gettext

"Samy Rabih" <[email protected]> Fri, 28 Aug 2009 17:32:01 +0200
Newsgroups gmane.editors.poedit.user
Message-ID <[email protected]>
If you use dynamic text, is it « already known » text or is the text
provided by users ?

 

De : - Simon - [mailto:[email protected]] 
Envoyé : vendredi 28 août 2009 17:29
À : [email protected]
Objet : Re: [poedit-users] php string variables in gettext

 

I really hope I'm using the mailing list properly. It is dynamic text.
Thanks

On Fri, Aug 28, 2009 at 11:24 AM,
<poedit-users-request-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> wrote:

Send Poedit-users mailing list submissions to
       [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
       https://lists.sourceforge.net/lists/listinfo/poedit-users
or, via email, send a message with subject or body 'help' to
       poedit-users-request-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

You can reach the person managing the list at
       poedit-users-owner-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Poedit-users digest..."


Today's Topics:

  1. Re: I can't translate strings containing variables (Samy RABIH)
  2. Re: I can't translate strings containing variables (Vaclav Slavik)
  3. Re: I can't translate strings containing variables
     (Martin Granger)
  4. Re: I can't translate strings containing variables (Samy Rabih)
  5. Re: I can't translate strings containing variables
     (Martin Granger)
  6. Re: I can't translate strings containing variables
     (Martin Granger)
  7. Re: I can't translate strings containing variables (Samy Rabih)
  8. Re: POT creation date (Vaclav Slavik)
  9. php string variables in gettext (- Simon -)
 10. Re: php string variables in gettext (Samy Rabih)


----------------------------------------------------------------------

Message: 1
Date: Fri, 12 Jun 2009 07:58:44 +0200
From: "Samy RABIH" <[email protected]>
Subject: Re: [poedit-users] I can't translate strings containing
       variables
To: <[email protected]>
Message-ID: <006a01c9eb22$d859f7c0$890de740$@[email protected]>
Content-Type: text/plain;       charset="iso-8859-1"

Can you update to the last available version (1.4.2) and retry ?

-----Message d'origine-----
De?: Martin Granger [mailto:[email protected]]
Envoy??: vendredi 12 juin 2009 00:25
??: [email protected]
Objet?: [poedit-users] I can't translate strings containing variables

Hi everybody,
this is my 1st message to this list
i'm trying to translate the wp-email plugin for Wordpress into french.
I select a string, and then I enter the translation in the bottom-left
window, and it appears next to the original string. But if the original
string contains a '%s', nothing happens.
What puzzles me is that it did work at the beginning, although I can't
remember changing anything in the settings.
Did I miss something ?

Ubuntu 8.04
Poedit 1.3.9

--
Martin from lille (France)
french speaker,
new to this list,
new to poedit

----------------------------------------------------------------------------
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users




------------------------------

Message: 2
Date: Fri, 12 Jun 2009 09:01:22 +0200
From: Vaclav Slavik <[email protected]>
Subject: Re: [poedit-users] I can't translate strings containing
       variables
To: [email protected]
Message-ID: <1244790082.2351.4.camel@localhost>
Content-Type: text/plain

Hi,

On Fri, 2009-06-12 at 00:24 +0200, Martin Granger wrote:
> i'm trying to translate the wp-email plugin for Wordpress into french.
> I select a string, and then I enter the translation in the bottom-left
> window, and it appears next to the original string. But if the
> original string contains a '%s', nothing happens.

This is too vague to be reproducible, I'm afraid. You need to include
much more details, in particular provide a file (creating a ticket at
http://www.poedit.net/trac is by far the best way) where you can see the
problem, specify which entry in the catalog misbehaves and describe what
exactly you enter as the translation.

Oh, and the suggestion to always try the latest version before reporting
a problem is a good one, 1.3.9 is ancient.

Vaclav




------------------------------

Message: 3
Date: Fri, 12 Jun 2009 10:19:12 +0200
From: Martin Granger <[email protected]>
Subject: Re: [poedit-users] I can't translate strings containing
       variables
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Samy RABIH a ?crit :
> Can you update to the last available version (1.4.2) and retry ?

Unfortunately I can't, there doesn't seem to be any package more recent
than 1.3.9 for Ubuntu/AMD64.
I suppose I could compile it myself, but I've never successfully
compiled any program, so I prefer not to do it.

Thanks anyway.



------------------------------

Message: 4
Date: Fri, 12 Jun 2009 10:22:45 +0200
From: "Samy Rabih" <[email protected]>
Subject: Re: [poedit-users] I can't translate strings containing
       variables
To: <[email protected]>
Message-ID: <003301c9eb36$f6a5eb80$e3f1c280$@[email protected]>
Content-Type: text/plain;       charset="iso-8859-1"

Have you any medium to test the .po file on other platforms like Windows ?
Can you send me the .po file ?

-----Message d'origine-----
De?: Martin Granger [mailto:[email protected]]
Envoy??: vendredi 12 juin 2009 10:19
??: [email protected]
Objet?: Re: [poedit-users] I can't translate strings containing variables

Samy RABIH a ?crit :
> Can you update to the last available version (1.4.2) and retry ?

Unfortunately I can't, there doesn't seem to be any package more recent
than 1.3.9 for Ubuntu/AMD64.
I suppose I could compile it myself, but I've never successfully
compiled any program, so I prefer not to do it.

Thanks anyway.

----------------------------------------------------------------------------
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users




------------------------------

Message: 5
Date: Fri, 12 Jun 2009 10:46:08 +0200
From: Martin Granger <[email protected]>
Subject: Re: [poedit-users] I can't translate strings containing
       variables
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Vaclav Slavik a ?crit :
> This is too vague to be reproducible, I'm afraid. You need to include
> much more details, in particular provide a file (creating a ticket at
> http://www.poedit.net/trac is by far the best way) where you can see the
> problem, specify which entry in the catalog misbehaves and describe what
> exactly you enter as the translation.

OK, that's what I did, although I'm not sure if I did it well :-)

--
martin
new to trac as well



------------------------------

Message: 6
Date: Fri, 12 Jun 2009 11:19:53 +0200
From: Martin Granger <[email protected]>
Subject: Re: [poedit-users] I can't translate strings containing
       variables
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Samy Rabih a ?crit :
> Have you any medium to test the .po file on other platforms like Windows ?
> Can you send me the .po file ?

I'll try this.
The .po file should be attached to the ticket I opened (actually twice,
because of a mistake I made)

thanks for your help



------------------------------

Message: 7
Date: Fri, 12 Jun 2009 12:02:19 +0200
From: "Samy Rabih" <[email protected]>
Subject: Re: [poedit-users] I can't translate strings containing
       variables
To: <[email protected]>
Message-ID: <008301c9eb44$df9e3240$9eda96c0$@[email protected]>
Content-Type: text/plain;       charset="iso-8859-1"

I've closed the ticket posted on trac since the .po file has no plural forms
defined (and it uses msgid_plural !) so the warn at saving is normal.

-----Message d'origine-----
De?: Vaclav Slavik [mailto:[email protected]]
Envoy??: vendredi 12 juin 2009 09:01
??: [email protected]
Objet?: Re: [poedit-users] I can't translate strings containing variables

Hi,

On Fri, 2009-06-12 at 00:24 +0200, Martin Granger wrote:
> i'm trying to translate the wp-email plugin for Wordpress into french.
> I select a string, and then I enter the translation in the bottom-left
> window, and it appears next to the original string. But if the
> original string contains a '%s', nothing happens.

This is too vague to be reproducible, I'm afraid. You need to include
much more details, in particular provide a file (creating a ticket at
http://www.poedit.net/trac is by far the best way) where you can see the
problem, specify which entry in the catalog misbehaves and describe what
exactly you enter as the translation.

Oh, and the suggestion to always try the latest version before reporting
a problem is a good one, 1.3.9 is ancient.

Vaclav


----------------------------------------------------------------------------
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users




------------------------------

Message: 8
Date: Fri, 12 Jun 2009 22:31:21 +0200
From: Vaclav Slavik <[email protected]>
Subject: Re: [poedit-users] POT creation date
To: [email protected]
Message-ID: <1244838681.27977.3.camel@localhost>
Content-Type: text/plain; charset="us-ascii"

On Sat, 2009-06-06 at 02:40 +0000, Jose Jorge Enriquez wrote:
> How can I check pot creation date and other po file information?

Open the file in a text editor. If you think it would be useful to show
this information in Poedit, could you please create an "enhancement"
ticket at http://www.poedit.net/trac for it?

thanks,
Vaclav
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part

------------------------------

Message: 9
Date: Fri, 28 Aug 2009 11:20:27 -0400
From: - Simon - <[email protected]>
Subject: [poedit-users] php string variables in gettext
To: [email protected]
Message-ID:
       <394938b40908280820s540c3c38p88cc2ae4a6f390b0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

How does gettext translate string variables? It doesn't seem to want to do
it.. lets say I have $sentence = "Hello World"; and then I want to echo
_($sentence); ... how can I do that so that I can translate what's inside
$sentence in Poedit?I can use -> echo sprintf(_("%s test"), $sentence) and
this will print "Hello World test" in the browser but it will appear as "%s
test" in Poedit and I won't get the translated version of Hello World inside
of Poedit. So how can I use string variables inside Poedit? Thanks!

Simon
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 10
Date: Fri, 28 Aug 2009 17:24:08 +0200
From: "Samy Rabih" <[email protected]>
Subject: Re: [poedit-users] php string variables in gettext
To: <[email protected]>
Message-ID: <006e01ca27f3$966d1d70$c3475850$@[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

The problem is the following : _($foo) means the value of $foo is not
predictible. Is it a value between a range of values ? is it dynamic text ?



De : - Simon - [mailto:[email protected]]
Envoy? : vendredi 28 ao?t 2009 17:20
? : [email protected]
Objet : [poedit-users] php string variables in gettext



Hello,

How does gettext translate string variables? It doesn't seem to want to do
it.. lets say I have $sentence = "Hello World"; and then I want to echo
_($sentence); ... how can I do that so that I can translate what's inside
$sentence in Poedit?I can use -> echo sprintf(_("%s test"), $sentence) and
this will print "Hello World test" in the browser but it will appear as "%s
test" in Poedit and I won't get the translated version of Hello World inside
of Poedit. So how can I use string variables inside Poedit? Thanks!

Simon

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

------------------------------

_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users


End of Poedit-users Digest, Vol 31, Issue 1
*******************************************

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users