New profiles on WordPress.org

View: New views
10 Messages — Rating Filter:   Alert me  

New profiles on WordPress.org

by scribu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just saw an sneak preview of the new profiles while whatching Matt on The
State Of The Word
2009<http://wordpress.tv/2009/06/21/matt-mullenwegs-state-of-the-word-wordcamp-san-francisco-2009/>,
and I discovered that you can actually see them online. Mine is here:

http://wordpress.org/profile/scribu/

Hope I'm not causing any trouble by posting this...

--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Question about translation extensions during WP 2.8

by Heiko Rabe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

i would be happy if somebody can explain the advantage of the new one
similar translation capabilities:

    _x('Published', 'page')

in opposite to

    _c('Published|page')

Normally a GNU gettext processor would not allow to have the same phrase
twice in file.
So if the new _x method writes the phrase to *.mo file the same way as
__ or _e would do, this may lead on some systems to bad behavoir because
of double occurance and damaged hash map table inside *.mo file.

btw: same asked on polyglot but the mails seems not arrive there.

thanks and in advance

Heiko Rabe
(www.code-styling.de)  
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Question about translation extensions during WP 2.8

by Peter Westwood :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 21 Jun 2009, at 18:45, Heiko Rabe wrote:

> i would be happy if somebody can explain the advantage of the new  
> one similar translation capabilities:
>
>   _x('Published', 'page')
>
> in opposite to
>
>   _c('Published|page')
>
> Normally a GNU gettext processor would not allow to have the same  
> phrase twice in file.
> So if the new _x method writes the phrase to *.mo file the same way  
> as __ or _e would do, this may lead on some systems to bad behavoir  
> because of double occurance and damaged hash map table inside *.mo  
> file.

It allows for the context to be properly specified in the po file,  
makes the string easier to translate (and also makes it safer to use  
"|" in a string again)

Previously in the pof file:
#: wp-admin/edit-pages.php:78
msgid "Published|page"
msgstr ""

Now in the pot file:
#: wp-admin/edit-pages.php:78
msgctxt "page"
msgid "Published"
msgstr ""

So it is explicitly marked as context (http://www.gnu.org/software/gettext/manual/gettext.html#Contexts 
)

westi
--
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5

_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Question about translation extensions during WP 2.8

by Heiko Rabe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Peter,

thanks for the answer. If understand it right, than the result of *.mo
file creation process will transform

_x('Published', 'page')

internally into

  "Published|page"

at the binary machine object file. If i now try to reverse a *.mo file,
i can't figure out, if

  "Car|House|Boat|Context"

is a contextual separation string or just a menu item collection used at
__(), because such information about context are not stored inside the
binary format.
So how would the mo/po classes figure out this, because | becomes
unreliable during load of *.mo file ?

regards

Heiko Rabe
(www.code-styling.de)

>
> On 21 Jun 2009, at 18:45, Heiko Rabe wrote:
>> i would be happy if somebody can explain the advantage of the new one
>> similar translation capabilities:
>>
>>   _x('Published', 'page')
>>
>> in opposite to
>>
>>   _c('Published|page')
>>
>> Normally a GNU gettext processor would not allow to have the same
>> phrase twice in file.
>> So if the new _x method writes the phrase to *.mo file the same way
>> as __ or _e would do, this may lead on some systems to bad behavoir
>> because of double occurance and damaged hash map table inside *.mo file.
>
> It allows for the context to be properly specified in the po file,
> makes the string easier to translate (and also makes it safer to use
> "|" in a string again)
>
> Previously in the pof file:
> #: wp-admin/edit-pages.php:78
> msgid "Published|page"
> msgstr ""
>
> Now in the pot file:
> #: wp-admin/edit-pages.php:78
> msgctxt "page"
> msgid "Published"
> msgstr ""
>
> So it is explicitly marked as context
> (http://www.gnu.org/software/gettext/manual/gettext.html#Contexts)
>
> westi

_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Question about translation extensions during WP 2.8

by Nikolay Bachiyski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jun 21, 2009 at 22:07, Heiko Rabe<heiko.rabe@...> wrote:
>
> Normally a GNU gettext processor would not allow to have the same phrase twice in file.
> So if the new _x method writes the phrase to *.mo file the same way as __ or _e would do, this may
> lead on some systems to bad behavoir because of double occurance and damaged hash map table inside *.mo file.

The context is part of the key, by which the strings are mapped in the
MO file. That's why it won't lead to ambiguities inside the hash map.
Actually, this is the proper gettext way of managing contexts. We
hadn't been using it before, because it wasn't well supported in the
various gettext tools, most notably poEdit.

> _x('Published', 'page')
>
> internally into
>
>  "Published|page"
>
> at the binary machine object file. If i now try to reverse a *.mo file, i
> can't figure out, if
>
>  "Car|House|Boat|Context"
>
> is a contextual separation string or just a menu item collection used at
> __(), because such information about context are not stored inside the
> binary format.
> So how would the mo/po classes figure out this, because | becomes unreliable
> during load of *.mo file ?
>

In the MO file, the context is stored in a different way, not like
"String|context".

>From the MO file specification:

    Contexts are stored by storing the concatenation of the context, a
<EOT> byte, and the original string, instead of the original string.

The full specification:
http://www.gnu.org/software/hello/manual/gettext/MO-Files.html

Happy hacking,
Nikolay.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Question about translation extensions during WP 2.8

by Peter Westwood :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 21 Jun 2009, at 20:07, Heiko Rabe wrote:

> thanks for the answer. If understand it right, than the result of  
> *.mo file creation process will transform
>
> _x('Published', 'page')
>
> internally into
>
> "Published|page"
>
> at the binary machine object file. If i now try to reverse a *.mo  
> file, i can't figure out, if
>
> "Car|House|Boat|Context"
>
> is a contextual separation string or just a menu item collection  
> used at __(), because such information about context are not stored  
> inside the binary format.
> So how would the mo/po classes figure out this, because | becomes  
> unreliable during load of *.mo file ?

That doesn't sound right to me.

Looking at the code in pomo which parses the file in [1], and the code  
for the C gettext library, I believe the following is true

In the binary mo file the context is stored at the start of the  
translation followed by ascii character EOT (character code 4) this is  
then followed by the translated string.

In the plain text pot or po file it is stored in the context field,  
for example from [2]

#: wp-admin/menu.php:62
msgctxt "page"
msgid "Add New"
msgstr "Нова"

[1] - http://svn.automattic.com/wordpress/trunk/wp-includes/pomo/mo.php
[2] - http://svn.automattic.com/wordpress-i18n/bg_BG/tags/2.8/messages/bg_BG.po

westi
--
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5

_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: New profiles on WordPress.org

by Rich Pedley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/6/21 scribu <scribu@...>:
> I just saw an sneak preview of the new profiles while whatching Matt on The
> State Of The Word
> 2009<http://wordpress.tv/2009/06/21/matt-mullenwegs-state-of-the-word-wordcamp-san-francisco-2009/>,
> and I discovered that you can actually see them online. Mine is here:
>
> http://wordpress.org/profile/scribu/
>
> Hope I'm not causing any trouble by posting this...

doubt it - I could access mine from that page. Though the download
plugin count is off.
Compare:
http://wordpress.org/profile/elfin/
and
http://wordpress.org/extend/plugins/profile/elfin

(and some of those plugins are out of date anyway).

Rich
--
my mind is on a permanent tangent
http://cms.elfden.co.uk/
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Question about translation extensions during WP 2.8

by Heiko Rabe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks to Nikolay and Peter,

final question(s): This leads (or have to lead) to multiple occurances
at translation systems with the same phrase ?
The only difference is the context so the same term occuring in 50
different contexts but maybe translated the same way now consumes 50
times more space in mo file and PHP memory as would be required, right ?

regards

Heiko Rabe
(www.code-styling.de)

>
> On 21 Jun 2009, at 20:07, Heiko Rabe wrote:
>
>> thanks for the answer. If understand it right, than the result of
>> *.mo file creation process will transform
>>
>> _x('Published', 'page')
>>
>> internally into
>>
>> "Published|page"
>>
>> at the binary machine object file. If i now try to reverse a *.mo
>> file, i can't figure out, if
>>
>> "Car|House|Boat|Context"
>>
>> is a contextual separation string or just a menu item collection used
>> at __(), because such information about context are not stored inside
>> the binary format.
>> So how would the mo/po classes figure out this, because | becomes
>> unreliable during load of *.mo file ?
>
> That doesn't sound right to me.
>
> Looking at the code in pomo which parses the file in [1], and the code
> for the C gettext library, I believe the following is true
>
> In the binary mo file the context is stored at the start of the
> translation followed by ascii character EOT (character code 4) this is
> then followed by the translated string.
>
> In the plain text pot or po file it is stored in the context field,
> for example from [2]
>
> #: wp-admin/menu.php:62
> msgctxt "page"
> msgid "Add New"
> msgstr "Нова"
>
> [1] - http://svn.automattic.com/wordpress/trunk/wp-includes/pomo/mo.php
> [2] -
> http://svn.automattic.com/wordpress-i18n/bg_BG/tags/2.8/messages/bg_BG.po
>
> westi

_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: New profiles on WordPress.org

by Shane A. Froebel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That's tight. I found two of my profiles.
http://wordpress.org/profile/ShaneFroebel/ and
http://wordpress.org/profile/ShaneF/. To bad I can have the stuff from
the ShaneFroebel profile merged into the ShaneF.

Otherwise it's very cool! :D

Your Friend,
Shane

Rich Pedley wrote:

> 2009/6/21 scribu <scribu@...>:
>> I just saw an sneak preview of the new profiles while whatching Matt on The
>> State Of The Word
>> 2009<http://wordpress.tv/2009/06/21/matt-mullenwegs-state-of-the-word-wordcamp-san-francisco-2009/>,
>> and I discovered that you can actually see them online. Mine is here:
>>
>> http://wordpress.org/profile/scribu/
>>
>> Hope I'm not causing any trouble by posting this...
>
> doubt it - I could access mine from that page. Though the download
> plugin count is off.
> Compare:
> http://wordpress.org/profile/elfin/
> and
> http://wordpress.org/extend/plugins/profile/elfin
>
> (and some of those plugins are out of date anyway).
>
> Rich
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKPrXkAAoJEChMcQvNqPqmoh0QAJ0DbgE9GV6/vr7Ml7RVv+mP
cZJPQ7a+IA9tdNfrDMX7/4dZvilRvdgk7U9HUd2bwgE5xsJdVgRIpRtn+nUMc5Ij
2q0s4JORuqG9FvCcpo1aHogKx6UUxg5QyY9/E1w1WNRl7295yzoQAHs6pbNIx+T9
+0BKcPpMXC4H4sw/bN5cGWfcXKzriOVycmzELCe27QQBa2FAB4a6rYky5+7UawcR
rwJlkm2/EcMPg3OTvpNYqxa8KcScU7y7h15w1QYllr6N+vuRc8ELlQPbJbDp9LfL
dkkPPO6NeK28+5JkDAxKOxmGH8+AY4YsQaw3Lli6g+bA0uFN+/kLmUaPvv2VrKUx
UxzA2NjHGXxBhGMBsUx6MJ4gO637EqLHKR67/t39mJfD33uX1FttR9DlOWgpyOTF
czvW1gghz7Wx4sKj8IM3JeypOhVmDf6ntvByzMSBJ2KY3O+rptw7VyU3Bkd4BeVh
bAvD2jS9iWrdTcAwKTvTHg1Xac4SkqwlPMrjbrO5VOnzj3XlceiOlJLYECqgOw8d
7Iej+2LKTZJmzaFvoCovFLAWOiNMN4duZ0ZqU4ut/aIpMKo5yBcIAKpCQKHtRGBf
hga+5ue3fBm6O9amuZzC4Xrf8Nizv8GUVUvZ4oQBUdZFW/Bf66sy1RMr+qMDymQb
mKuTUqyCBqeaqnAztGzI
=trTI
-----END PGP SIGNATURE-----
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Question about translation extensions during WP 2.8

by Nikolay Bachiyski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jun 22, 2009 at 01:34, Heiko Rabe<heiko.rabe@...> wrote:
> Thanks to Nikolay and Peter,
>
> final question(s): This leads (or have to lead) to multiple occurances at
> translation systems with the same phrase ?
> The only difference is the context so the same term occuring in 50 different
> contexts but maybe translated the same way now consumes 50 times more space
> in mo file and PHP memory as would be required, right ?
>

Yes.

The same points were valid for the |-way of doing this.

Happy hacking,
Nikolay.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers