Opened 16 years ago

Closed 16 years ago

#2391 closed defect (fixed)

Convert russian,brazil docs to UTF-8

Reported by: cbalint Owned by: dron
Priority: normal Milestone:
Component: Docs Version: svn-trunk
Severity: normal Keywords:
Cc: dron, ilucena

Description (last modified by warmerdam)

Since doxygen and latex likes lot more UTF-8 and user will figure hardly out that actual *_ru.dox file are in KOI8-R and not ISO-8859-5 or ISO-8859-15 plus on any distro html/pdf generation fails and looks horibly ugly (random chars) I suggest as a fix to convert tham to UTF-8, and commit back to upstream. The same with brazil docs.

As remark i encountered this packaging for RHEL/Fedora wanted to enable all docs including ru, br.

This request goes only to .dox file, not anything else.

Running this in a shell should fix:

#!/bin/bash
# fix russian docs from tarball
for ru in `find doc/ru/ -type f -name "*.dox"`; do
iconv -f KOI8-R -t UTF-8 < $ru > $ru.tmp
mv -f $ru.tmp  $ru
done

#!/bin/bash
# fix brazil docs from tarball
for br in `find doc/br/ -type f -name "*.dox"`; do
iconv -f ISO-8859-1 -t UTF-8 < $br > $br.tmp
mv -f $br.tmp  $br
done

Attachments (2)

convert.sh (323 bytes ) - added by cbalint 16 years ago.
UTF-8 conversion quick script
Doxyfile (45.3 KB ) - added by cbalint 16 years ago.
The missing Doxyfile configuration file.from doc/ru

Download all attachments as: .zip

Change History (22)

by cbalint, 16 years ago

Attachment: convert.sh added

UTF-8 conversion quick script

comment:1 by mloskot, 16 years ago

The same ticket was submitted as #2390 - closed as duplicate

in reply to:  description comment:2 by cbalint, 16 years ago

Olso attaching a Doxyfile config file, is should go in doc/ru/. Its not possible to build properly russian documentation without. As remark brazil already have Doxyfile config.

by cbalint, 16 years ago

Attachment: Doxyfile added

The missing Doxyfile configuration file.from doc/ru

comment:3 by warmerdam, 16 years ago

Cc: dron ilucena added
Milestone: 1.6.0

comment:4 by warmerdam, 16 years ago

Description: modified (diff)

comment:5 by dron, 16 years ago

Russian documentation recoded and updated, but I am unsure about special Doxyfile for translations. Why do I need it?

in reply to:  5 ; comment:6 by cbalint, 16 years ago

Replying to dron:

Russian documentation recoded and updated, but I am unsure about special Doxyfile for translations. Why do I need it?

Dron, let me give you some reasons:

I am not a doxygen expert but i have some experience. That particular Doxyfile is needed for:

1) It contains 'trivial' config paramaters:

OUTPUT_LANGUAGE=Russian PROJECT_NAME=RU HTML_FOOTER=../gdal_foodter.html LATEX_OUTPUT=YES

*it is not possible to have a centralized Doxyfile and just refer to it, _must_ have one for

each subfolder where are .dox files, thats a requirement, and however you can have differnet settings per subfolder.

2) Its enough to run "doxygen" instead of "doxygen *.dox", and subfolder is generated acording with the config file, LATEX generatian can be enabled/disavled if broken on certain subfolders.

3) As final remark, I salute the HTML_FOOTER=../gdal_footer.html, wich are in all places fortunately, not only here, its trivial since it doesn't contain "Generated on $date" string, I might be paranoic but this is wonderfull for those distro wich are packaging multilib at high quality, but let me give the explanation: http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks (see Doxygen)

  • ATM site is under maintenance :D, please look a bit later.

However as final remark i noticed quite unupdate around doxy infrastructure, its broken for pdf generation mainly wich is extremly picky about, I like pdf's and salute the idea, and i can make little promise that in future i try to fix its generation. For now I use forced 'pdflatex -interactionmode nonstopmode' in Makefiles for my builsd and produce all pdf's too, as patch for not stop or bail out the compilation due on syntax errors and heavy warrnings.

Dron, what about Brazil one ? Can you please update it too to UTF-8 ?

in reply to:  6 ; comment:7 by dron, 16 years ago

Replying to cbalint:

1) It contains 'trivial' config paramaters:

OUTPUT_LANGUAGE=Russian PROJECT_NAME=RU HTML_FOOTER=../gdal_foodter.html LATEX_OUTPUT=YES

*it is not possible to have a centralized Doxyfile and just refer to it, _must_ have one for

each subfolder where are .dox files, thats a requirement, and however you can have differnet settings per subfolder.

No, it is possible. I can override those parameters when running doxygen, just like it is done now:

http://trac.osgeo.org/gdal/browser/trunk/gdal/GNUmakefile#L129

2) Its enough to run "doxygen" instead of "doxygen *.dox", and subfolder is generated acording with the config file, LATEX generatian can be enabled/disavled if broken on certain subfolders.

Instead of running doxygen manually it is much better to create a makefile with special targets for every particular doc format. It is possible to switch on/off LaTeX output generation, disable processing translated docs etc. Look how manual pages are being generated:

http://trac.osgeo.org/gdal/browser/trunk/gdal/GNUmakefile#L145

The same could be done for other documentation formats.

Actually this large unmaintainable configuration file scares me and don't like to have another one. I think it is much simpler to have a single place of doxygen configuration.

Dron, what about Brazil one ? Can you please update it too to UTF-8 ?

I better leave it for ilucena. I am a bit nervous to touch this stuff becouse I can't control correctness of the result.

Best regards,
Andrey

comment:8 by dron, 16 years ago

I order to get benefit of this fixes the doxygen on GDAL server should be upgraded (we need at least 1.5.2). The current one (1.5.1) is not UTF-8 friendly.

in reply to:  7 comment:9 by cbalint, 16 years ago

Andrey,

No, it is possible. I can override those parameters when running doxygen, just like it is done now:

Very nice. I like it much more how its done, i didnt thinked of using pipe.

Actually this large unmaintainable configuration file scares me and don't like to have another one. I think it is much simpler to have a single place of doxygen configuration.

True. Its far better the soultion mentioned, however only 2 params ar necessary.

I better leave it for ilucena. I am a bit nervous to touch this stuff becouse I can't control correctness of the result.

Understand. Howver after converting to UTF-8 (i used Brazillian instead of Portuguese),

produced result leaded to a viewable and corectly charactered Spanish language.

BR/PT is ISO-8859-1.

Best regards,
Andrey

Thank you Andrey !

in reply to:  8 ; comment:10 by cbalint, 16 years ago

I order to get benefit of this fixes the doxygen on GDAL server should be upgraded (we need at least 1.5.2). The current one (1.5.1) is not UTF-8 friendly.

Andrey,

I will test is ASAP, since FrankW will release very soon 1.5.2.

Allow me to bug you today if problems still arises.

/Cristian.

in reply to:  10 ; comment:11 by dron, 16 years ago

Replying to cbalint:

I will test is ASAP, since FrankW will release very soon 1.5.2.

Allow me to bug you today if problems still arises.

Slight misunderstanding here. I meant Doxygen v. 1.5.2, not GDAL. :-) Frank, could you update the doxygen on gdal.org?

in reply to:  11 comment:12 by cbalint, 16 years ago

Replying to dron:

Replying to cbalint:

I will test is ASAP, since FrankW will release very soon 1.5.2.

Allow me to bug you today if problems still arises.

Slight misunderstanding here. I meant Doxygen v. 1.5.2, not GDAL. :-)

:), however it is true that FrankW prepare gdal-1.5.2, so coincidence is welcome, I want to see how output is generated and there is no syntax error with actal pre 1.5.2RC.

Frank, could you update the doxygen on gdal.org?

comment:13 by dron, 16 years ago

I haven't touched the 1.5 branch. My changes applied to trunk only.

in reply to:  13 comment:14 by cbalint, 16 years ago

Replying to dron:

I haven't touched the 1.5 branch. My changes applied to trunk only.

Ahh. see.

FrankW can we have this done in gdal-1.5.2 too ? I come within 1 hour with test results over 1.5.2RC candidate.

Thaks, /Cristian.

comment:15 by warmerdam, 16 years ago

Cristian,

It is not our normal practice to do much work on the docs in the stable branch. So I'm not going to ask for this. But it's up to Andrey and/or Ivan.

comment:16 by dron, 16 years ago

Actually it is no problem to copy that 4 translated files from trunk to 1.5. I am just not sure that it is good time now, because 1.5.2 is in RC state.

comment:17 by ilucena, 16 years ago

I agree with Andrey and I am not able to access my own computer to do that right now.

comment:18 by ilucena, 16 years ago

I ran that script and the only changes was on http://trac.osgeo.org/gdal/browser/trunk/gdal/doc/br/gdal_tutorial_br.dox#L65

I prefer to do that fix by using regular html accents code "&ecirc;" to be compatible with the others accents on the same page.

comment:19 by dron, 16 years ago

Owner: changed from warmerdam to dron
Status: newassigned

comment:20 by dron, 16 years ago

Resolution: fixed
Status: assignedclosed

I've converted Russian documentation in 1.5 branch to UTF-8 (r14669). I am considering this ticket closed, but feel free to reopen it if something will be wrong with translated docs.

Note: See TracTickets for help on using tickets.