Quantcast

needed comments as references in pofiles

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

needed comments as references in pofiles

Mohsen Moeeni
Hi;

Aren't references supposed to point to the files where an
entry comes from? Seems so and poedit also have a
show reference option which tries to open a path.

That said, there are some entries with references which
are not actually pointers to source files:

(second and third lines are references)
#. Default: "Creator"
#: index id with index friendly name
#: metadata id with metadata friendly name
msgid "Creator"
msgstr ""

(second line is a reference)
#. Default: "Date"
#: index id with index friendly name Modification Date (duplicate)
msgid "Date"
msgstr ""

Some points:
- Firstly those do not seem to be references to source files.

- Secondly, a translation software (like poedit) might not have
 any option to show references and those comments are
 necessary to make a good translation. For example, I am
 not going to translate index id's. But how I am supposed
 to know that entry is for an index id when the comment
 (reference) is not showing? I would like to see such comments
 viewable when translating.

Mohsen,


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Plone-i18n mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-i18n
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: needed comments as references in pofiles

Hanno Schlichting
Hi Mohsen.

You are absolutly right with both of your observations. All lines
prepended with #: should be references to source files and we currently
have a lot of these which aren't.

Now while I'm absolutly aware of this unfortunately there's not much we
can do about it just now. The problem is in the way we are extracting
these texts from the source code. We have a tool and a standarized way
to extract all texts from page templates, but right now there's no way
to extract any message which is definied in python code. And that's
where these index names as well as action or type names, workflow states
and some more come from.

Before Plone 2.1 these were therefore being manually maintained in the
plone-manual.pot file. With the increasing number of messages in there
and the massive changes due to switching to ATContentTypes this approach
didn't work out anymore, so I wrote a little tool which catches these
kind of strings from a running instance by looking at places like
portal_actions, portal_types and some more of these tools. Unfortunately
these doesn't tell me were these messages come. To give translators a
hint about the context these messages came from I tried to give some
short explanation like 'index id with index friendly name'.

So while I hope to have explained why we are having these kind of
non-references, I might give you some practical advice for the
index/metadata stuff. The best place to look for these is in a running
Plone instance in the control panel - smart folder configuration or the
criteria tab of a smart folder. These are the main places were these are
used.

As a future note I may add, that I'm working hard on getting a new
feature from Zope3 into the next Plone release (2.5) called MessageID's
which will make it possible to mark any kind of text in Python code as
'needing translation'. You may have already seen some of the outcome of
this as I merged some messages found this way back to the current files.
In the first step these were mainly portal status messages (text shown
to the user after he did some action like 'Changes saved.'), though.

As this change has some technical implications we might not be able to
do this for every message for Plone 2.5 mainly because a lot of these
aren't definied in Plone itself but come from either Archetypes,
ATContentTypes or the whole CMF*-layer but will constantly increase this
number so in the end we should have references for all messages.

Sorry for the rather long mail and keep up the good work ;)

Hanno

Mohsen Moeeni wrote:

> Hi;
>
> Aren't references supposed to point to the files where an
> entry comes from? Seems so and poedit also have a
> show reference option which tries to open a path.
>
> That said, there are some entries with references which
> are not actually pointers to source files:
>
> (second and third lines are references)
> #. Default: "Creator"
> #: index id with index friendly name
> #: metadata id with metadata friendly name
> msgid "Creator"
> msgstr ""
>
> (second line is a reference)
> #. Default: "Date"
> #: index id with index friendly name Modification Date (duplicate)
> msgid "Date"
> msgstr ""
>
> Some points:
> - Firstly those do not seem to be references to source files.
>
> - Secondly, a translation software (like poedit) might not have
>  any option to show references and those comments are
>  necessary to make a good translation. For example, I am
>  not going to translate index id's. But how I am supposed
>  to know that entry is for an index id when the comment
>  (reference) is not showing? I would like to see such comments
>  viewable when translating.
>
> Mohsen



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Plone-i18n mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-i18n
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: needed comments as references in pofiles

Mohsen Moeeni
Hi Hanno;

Thank you for your thorough explanation.

On 12/7/05, Hanno Schlichting <[hidden email]> wrote:
[snip]

>
>
> Before Plone 2.1 these were therefore being manually maintained in the
> plone-manual.pot file. With the increasing number of messages in there
> and the massive changes due to switching to ATContentTypes this approach
> didn't work out anymore, so I wrote a little tool which catches these
> kind of strings from a running instance by looking at places like
> portal_actions, portal_types and some more of these tools. Unfortunately
> these doesn't tell me were these messages come. To give translators a
> hint about the context these messages came from I tried to give some
> short explanation like 'index id with index friendly name'.
>

Okay. You are right it's not possible to have real references
of such entries. But such 'fake-references' mostly look
like 'automatic comments' to me. Firstly by putting them
as references, a translation software, might consider it
as a path and would try to open it when user asks. Secondly
if we make them 'automatic comments' they are visible
when we are translating the strings and that can help
good translation. Lastly they are really just 'automatic
comments' :-)

As you said it's not possible to have references for
such entries. To me, that means the reference comment
should be empty.

Regards,
Mohsen,


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Plone-i18n mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-i18n
Loading...