Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-01

compiler message files

17 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bee

Hi,

I'm experimenting with FPC's message (.msg) files. I wonder, who did create those files? Where are the text taken from? Is there any tool to generate those files?

I also found some inconsistencies in the file structure. There are some sections that are not following the "standard" structure. Most sections are marked by '\section' - '\end' pair string, which I think using Tex syntax. But there are some sections that doesn't have that mark, though its comment part is clearly indicates that it's a section. Those sections that don't have the '\section' mark still have pattern of a section, like section title and max number info on the header comment.

For example in the errore.msg file. Compare the "assembler reader" section, starting from line 2167 with the "general section", starting from line 47.

Which one is the correct structure? If I want to list the sections of a message file, which mark should I follow? Or is that a bug? Should I report it to bugtracker? Or did I understand it wrong?

Oh, I'm using FPC 2.6.4 on OS X Yosemite.

Thank you.

Regards,

-Bee-

Reply by email

Michael Van Canneyt
to Bee
Bee wrote
Hi, I'm experimenting with FPC's message (.msg) files. I wonder, who did create those files? Where are the text taken from? Is there any tool to generate those files?

They are created manually.

I also found some inconsistencies in the file structure. There are some sections that are not following the "standard" structure. Most sections are marked by '\section' - '\end' pair string, which I think using Tex syntax. But there are some sections that doesn't have that mark, though its comment part is clearly indicates that it's a section. Those sections that don't have the '\section' mark still have pattern of a section, like section title and max number info on the header comment.

Only
# BeginOfTex
# EndOfTex
mark the beginning or end of TeX code. The \section is simply transferred to the TeX file, you should not pay attention to it. That said, in LaTeX there is no need for \section to be ended explicitly. It is ended automatically.

Michael.

Reply by email

Tomas Hajny
to Michael Van Canneyt
Michael Van Canneyt wrote
On Tue, 6 Jan 2015, Bee wrote:

Hi,

Show quoted text 5 lines
> I'm experimenting with FPC's message (.msg) files. I wonder, who did > create those files? Where are the text taken from? Is there any tool to > generate those files? They are created manually.

.
.

I'll extend Michael's answer a bit: The English message file is then converted to an include file and compiled into the compiler as the default messages (i.e. "errore.msg" doesn't need to be read at run time, although it's possible to enforce that using the respective command line option). Furthermore, some parts and their associated comments are also included in the documentation.

Tomas

Reply by email

Bee
to Michael Van Canneyt: They are created manually. Only # BeginOfTex # EndOfTex mark the beginning or end of TeX…
Michael Van Canneyt wrote 7 lines
I'm experimenting with FPC's message (.msg) files. I wonder, who did > create those files? Where are the text taken from? Is there any tool to > generate those files? > They are created manually.

Do you mean including the content?

Show quoted text 14 lines
I also found some inconsistencies in the file structure. There are some > sections that are not following the "standard" structure. Most sections are > marked by '\section' - '\end' pair string, > which I think using Tex syntax. But there are some sections that doesn't > have that mark, though its comment part is clearly indicates that it's a > section. Those sections that don't have the > '\section' mark still have pattern of a section, like section title and > max number info on the header comment. > Only # BeginOfTex # EndOfTex mark the beginning or end of TeX code. The \section is simply transferred to the TeX file, you should not pay attention to it.

I notice that the '# BeginOfTex' and '# EndOfTex' pair mark is also inconsistent. I need to look for the sections or groups of the messages. I found 3 patterns:

1. The '\section' - '\end' pair. With this, I found 12 sections.
2. The '# BeginOfTex' - '# EndOfTex' pair. With this, I found 7 sections.
3. The '##### is the last used one' string. With this, I found 12 sections.

But the sum of messages of the section found using these patterns isn't equal to the real number of messages. There are 901 messages, but the sum of messages of each section is less than that. What did I miss?

That said, in LaTeX there is no need for \section to be ended explicitly. It is ended automatically.

So, which one is indicating the real sections?

-Bee-

Reply by email

Bee
to Michael Van Canneyt: They are created manually. Only # BeginOfTex # EndOfTex mark the beginning or end of TeX…
Michael Van Canneyt wrote
That said, in LaTeX there is no need for \section to be ended explicitly. It is ended automatically.

For example these lines:

#
# Codegenerator
#
# 06049 is the last used one
#
% \section{Code generator messages}
% This section lists all messages that can be displayed if the code % generator encounters an error condition.
% \begin{description}
cg_e_parasize_too_big=06009_E_Parameter list size exceeds 65535 bytes % The I386 processor limits the parameter list to 65535 bytes. (The \var{RET}
% instruction causes this.)

If I want to translate the above lines into another language, do I need to translate the content of the \section line (between the {} bracket)? If I do, how about some sections that don't have the \section line? There's no description for such section.

-Bee-

Reply by email

Sven Barth
to Bee: On Tue, Jan 6, 2015 at 2:00 PM, Michael Van Canneyt For example these lines: # #…
"Bee" wrote 6 lines
On Tue, Jan 6, 2015 at 2:00 PM, Michael Van Canneyt < wrote: > > > That said, in LaTeX there is no need for \section to be ended

explicitly. It is ended automatically.

Show quoted text 15 lines
For example these lines: # # Codegenerator # # 06049 is the last used one # % \section{Code generator messages} % This section lists all messages that can be displayed if the code % generator encounters an error condition. % \begin{description} cg_e_parasize_too_big=06009_E_Parameter list size exceeds 65535 bytes % The I386 processor limits the parameter list to 65535 bytes. (The

\var{RET}

% instruction causes this.) If I want to translate the above lines into another language, do I need

to translate the content of the \section line (between the {} bracket)? If I do, how about some sections that don't have the \section line? There's no description for such section.

You only need to translate the part after the "=" in those lines that don't have a LaTeX comment. Because only these texts are used by the compiler. The part in the comments is only used for the documentation which we generate in English only. Take a look at the other msg files to see what I mean.

Regards,
Sven

Reply by email

Bee
to Sven Barth: explicitly. It is ended automatically. \var{RET} to translate the content of the \section…
Sven Barth wrote 6 lines
You only need to translate the part after the "=" in those lines that don't have a LaTeX comment. Because only these texts are used by the compiler. The part in the comments is only used for the documentation which we generate in English only. Take a look at the other msg files to see what I mean.

I'm looking at Indonesian translation, errorid.msg. There I see almost everything is translated, even the comment lines (with # prefix). I thought a complete and thorough translation must be useful somewhere in the documentation. Am I wrong?

-Bee-

Reply by email

Tomas Hajny
to Bee: On Tue, Jan 6, 2015 at 3:30 PM, Sven Barth Ah, I see. Perhaps that's the cause for the…
Bee wrote 9 lines
On Tue, Jan 6, 2015 at 3:30 PM, Sven Barth wrote: > The errore.msg is completely created by hand (it's the master file) > while > the others are copies of that from various ages with additions of new > messages. > Ah, I see. Perhaps that's the cause for the inconsistency. :)

Btw, in this context note compiler/utils/msgdiff.pp which allows comparison of contents between two msg files.

Tomas

Reply by email

Marco van de Voort
to Bee: On Tue, Jan 6, 2015 at 3:35 PM, Sven Barth I'm looking at Indonesian translation,…

In our previous episode, Bee said:

I'm looking at Indonesian translation, errorid.msg. There I see almost everything is translated, even the comment lines (with # prefix). I thought a complete and thorough translation must be useful somewhere in the documentation. Am I wrong?

There are current no translations of the FPC documentation (at least not in-tree)

There is btw some interest in this on lazarusforum.de. I assume for fpdoc a translation tool (load one set of XMLs compare with the other) could be done fairly easily.

The Latex documentation (which includes error*) is wholly manual though.

Reply by email

Tomas Hajny
to Bee: On Tue, Jan 6, 2015 at 3:35 PM, Sven Barth I'm looking at Indonesian translation,…
Bee wrote 16 lines
On Tue, Jan 6, 2015 at 3:35 PM, Sven Barth wrote: > You only need to translate the part after the "=" in those lines that > don't have a LaTeX comment. Because only these texts are used by the > compiler. The part in the comments is only used for the documentation > which > we generate in English only. Take a look at the other msg files to see > what > I mean. > I'm looking at Indonesian translation, errorid.msg. There I see almost everything is translated, even the comment lines (with # prefix). I thought a complete and thorough translation must be useful somewhere in the documentation. Am I wrong?

The comments are not used in the compiler and documentation in other languages is not created / supported by the FPC team. Obviously, someone may decide to create a special version of documentation with messages and their description in another language, but I don't see much sense of doing so unless he or she intends to translate the whole documentation (which would be a pretty big task) or at least some specific part of it like one of the guide (still pretty big task with probably rather limited audience).

Tomas

Reply by email

Bee
to Tomas Hajny: Btw, in this context note compiler/utils/msgdiff.pp which allows comparison of contents…
Tomas Hajny wrote
Btw, in this context note compiler/utils/msgdiff.pp which allows comparison of contents between two msg files.

Yes, I see that too. I need to group the messages according to the sections. So, a translator can work step by step a message per section at a time, instead of staring at a wall of grouping messages into sections is also easier to build a progress matrix and statistic.

-Bee-

Reply by email

Bee
to Marco van de Voort: In our previous episode, Bee said: There are current no translations of the FPC…
Marco van de Voort wrote
There are current no translations of the FPC documentation (at least not in-tree)

Yes. But maybe in the future if there's a demand for that, at least some part of it has been done already.

Show quoted text 6 lines
There is btw some interest in this on lazarusforum.de. I assume for fpdoc a translation tool (load one set of XMLs compare with the other) could be done fairly easily.

Too bad I don't understand Dutch, so I have no idea what they're talking about. I intend to write a simple translation tool for those message files, as a web app, so everyone can contribute and work together. It's just for a personal project in my spare time. :)

-Bee-

Reply by email

Sven Barth
to Bee
Bee wrote 11 lines
There is btw some interest in this on lazarusforum.de <http://lazarusforum.de>. I assume for fpdoc a translation tool (load one set of XMLs compare with the other) could be done fairly easily. Too bad I don't understand Dutch, so I have no idea what they're talking about. I intend to write a simple translation tool for those message files, as a web app, so everyone can contribute and work together. It's just for a personal project in my spare time. :)

Just a small sidenote: it's German, not Dutch ;)

Regards,
Sven

Reply by email