links to source files in the localization files

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

links to source files in the localization files

Federico Bruni-2
Hi,

I wonder why in all the links to source files the path is missing.  As a
result the locale editor can't find the file and I have to search it
manually.

Sometimes it can be useful having a quick look at the code, even if a
translator is not supposed to understand the programming language.
Because the context can help...

There's a particular reason why this is missing?

I know that translations are handled by the Translation Project.
But we could just copy the file to translate in the po/ directory and
move it away when it's finished (in order not to "break" git).

So the links should be rewritten as relative to the po/ directory and
then it would work.

Am I missing something? (mmmmh, probably)

Thanks,
Federico



Reply | Threaded
Open this post in threaded view
|

Re: links to source files in the localization files

Francisco Vila
2011/4/4 Federico Bruni <[hidden email]>:
> Hi,
>
> I wonder why in all the links to source files the path is missing.

I am not sure waht you men.  A path is missing in source files? Give
an example.  It all depends where do you have the source repository
stored in your disk.

> As a
> result the locale editor can't find the file and I have to search it
> manually.

Search for what? Sorry.

> Sometimes it can be useful having a quick look at the code, even if a
> translator is not supposed to understand the programming language.
> Because the context can help...

You can look at the code, where do you have it? Sorry again.

> There's a particular reason why this is missing?
>
> I know that translations are handled by the Translation Project.

Translations of the program.  Yes, they are.

> But we could just copy the file to translate in the po/ directory and
> move it away when it's finished (in order not to "break" git).

Again, I'm afraid I don't understand. Why could you want to copy a
file into the po directory?

> So the links should be rewritten as relative to the po/ directory and
> then it would work.
>
> Am I missing something? (mmmmh, probably)

The problem for me is, which links are you talking about?

--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: links to source files in the localization files

Federico Bruni-2
2011/4/5 Francisco Vila <paconet.org@gmail.com>
2011/4/4 Federico Bruni <[hidden email]>:
> Hi,
>
> I wonder why in all the links to source files the path is missing.

I am not sure waht you men.  A path is missing in source files? Give
an example.  It all depends where do you have the source repository
stored in your disk.

> As a
> result the locale editor can't find the file and I have to search it
> manually.

Search for what? Sorry.


Sorry, I explain it better.

In Gtranslator I can see (on the right) the source file where each message is located.
If I click on it, an editor (viewer?) pops up and shows the exact line in the file where
the message is located.
Quick and easy.

This is not working in lilypond because the files are in different directories (python/,
scripts/, scm/, ....) while the .pot file doesn't specify the path for each file.
So no matter where I put the .po file, it will never be able to find all the source files.

This means that I have to browse the source directories and find the file.
It's not a big deal, but why not using full paths?

This is at least my understanding...
Reply | Threaded
Open this post in threaded view
|

Re: links to source files in the localization files

Francisco Vila
2011/4/5 Federico Bruni <[hidden email]>:
> Sorry, I explain it better.

My fault, I should have read more carefully your _subject_ line which
explains all.

> In Gtranslator I can see (on the right) the source file where each message
> is located.
> If I click on it, an editor (viewer?) pops up and shows the exact line in
> the file where
> the message is located.
> Quick and easy.
>
> This is not working in lilypond because the files are in different
> directories (python/,
> scripts/, scm/, ....) while the .pot file doesn't specify the path for each
> file.
> So no matter where I put the .po file, it will never be able to find all the
> source files.
>
> This means that I have to browse the source directories and find the file.
> It's not a big deal, but why not using full paths?
>
> This is at least my understanding...

You are right. I use kbabel and emacs.  In kbabel I see file names of
source files in a panel at top right after a '#' sign; in emacs I just
see those '#' lines (they are comments) interleaved with strings.
They are bare filenames, not full paths or relative paths.  I don't
know why they do not contain the full path for every file but I am
pretty sure that we could make po-update or gettext tools to force to
do this.

For sure that would multiply the size of the po file by a factor of
two or three, I guess.  Maybe that was the reason why it was made that
way in first place.


--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: links to source files in the localization files

John Mandereau
Il giorno mer, 06/04/2011 alle 09.21 +0200, Francisco Vila ha scritto:

> You are right. I use kbabel and emacs.  In kbabel I see file names of
> source files in a panel at top right after a '#' sign; in emacs I just
> see those '#' lines (they are comments) interleaved with strings.
> They are bare filenames, not full paths or relative paths.  I don't
> know why they do not contain the full path for every file but I am
> pretty sure that we could make po-update or gettext tools to force to
> do this.
>
> For sure that would multiply the size of the po file by a factor of
> two or three, I guess.  Maybe that was the reason why it was made that
> way in first place.
IIRC the reason is that xgettext is invoked by make recursing in
subdirectories of the source tree, then all the POT files are merged
together.  The solution is to build with recursive make (or it could
already be done independently with a new build system) the list of files
to be scanned, then invoke xgettext once from top source dir with that
list of files (we might have the problem of a too long command line,
though).

My two cents,
John



signature.asc (205 bytes) Download Attachment