From: David F. <da...@sj...> - 2004-01-30 21:30:09
|
Bruno Haible wrote: >David Fraser wrote: > > >>Since the >>OpenOffice.org localizations are done separate to the original source >>code, without using gettext, we don't have the actual source code >>location. We have instead used it as an "ID" for the string being >>translated, so we can map it back into the OOo localization format. >> >> >OK, but what other hints are available to the translators so that they >know what a certain message means? Are programmer comments (such as >"This message appears in the 'Import' panel when the import filter does >not yet exist.") converted into #. comments in the PO file? > > There are no comments like that in the OpenOffice translators format... so they have no such hints anyway. Also, the line number changes in the src file since they have a mad practice of storing all localizations in one file, so if you import a new language everything else shifts around. So logically the ID corresponds to the line number, since it is a way of finding a unique location in the source that the localization comes from. Basically for both OpenOffice translation and Mozilla translation, we convert their format into the .po format. In the Mozilla case, we do have comments that we put into the PO file as comments so the translators can see them. In both cases, we need a unique identifier that we can associate with each string. In OpenOffice it is the resource identifier from their resource system. In Mozilla, it is the entity name from the dtd that is used to define the string. Our aim in doing this is that we want translators to be able to use the gettext format even if they are translating programs that do not natively use that for localization. In this way we hope to also encourage some of these programs to move over to the gettext library. But while they don't, they have slightly different requirements to translations of gettext-based programs. Do you think there is a better place to put this unique identifier? I know it is not how the po format is generally used, but it is in some ways a special case and I would like to know if there is a better place in the format to use it... As far as I can see (from the info page), the following comment types are available: # TRANSLATOR-COMMENTS #. AUTOMATIC-COMMENTS #: REFERENCE... #, FLAG... It seems to me that REFERENCE is the best place to put these identifiers... but we may replace the : with # as you suggested: #: basctl/source\basicide\basidesh.src#RID_STR_NOMODULE.text >>>That's the best it can do when it recognizes that the line is not in the >>>expected format. >>> >>> >>Why? Surely it could leave it as is. I don't see what the problems would >>be with this. >> >> >The problem with your proposal would be that not only the gettext tools, >but also the various translator tools would have to deal with line numbers >that are not composed of digits. > > Sure, that may be a problem. But as far as msguniq is concerned, it is just meant to merge them. So any problems with the originals would be carried through to the msguniq output. But msguniq (at least according to the man page) isn't a general po validator, it's just a duplicate merger. Anyway that may just be a difference of opinion :-) David |