Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#8233 - Use XML for language source files

Attached to Project: Rockbox
Opened by Jonas Häggqvist (rasher) - Tuesday, 27 November 2007, 00:15 GMT+2
Last edited by Jonas Häggqvist (rasher) - Sunday, 25 July 2010, 03:20 GMT+2
Task Type Patches
Category Build environment
Status Closed
Assigned To Jonas Häggqvist (rasher)
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This is the current status of my work to switch to using XML for the language source-files. I basically stopped working on it in the middle of it all, and I'm not even completely sure why, right now.

What I've done so far:
- Created a basic structure of the file format, and documented it with an XMLschema file
- Written a tiny script that validates languages against this schema
- Written a script to convert v2 languages to XML
- Started a rewritten ganlang that should end up as a drop-in replacement for the old one.

What's missing (all in genlang):
- Deciding how to put translator notes into the source file
- Add checks for differing <source> between English and the translation
- Add header/sourcefile generation
- Fix any braindead design decisions.

See my reasons for doing this here:
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2007-09/0090.shtml
   xml-language.diff (106.9 KiB)
 genlangxml        |  302 ++++++
 langv2toxml       |  130 ++
 language.xsd      |   54 +
 schemavalidate.pl |   11 
 XMLSchema.xsd     | 2534 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 3031 insertions(+)

This task depends upon

Closed by  Jonas Häggqvist (rasher)
Sunday, 25 July 2010, 03:20 GMT+2
Reason for closing:  Rejected
Additional comments about closing:  On second thought, let's not go to Camelot. It is a silly place.

I am older and wiser now, and clearly see the errors of my ways. I don't think this is such a great idea.
Comment by Jonas Häggqvist (rasher) - Saturday, 09 August 2008, 20:00 GMT+2
Here's an updated version that is almost able to build Rockbox properly using XML source languages - the binary languages will work, but they'll be missing some strings. The other functions (update, voice output) are not properly implemented yet.
   xml-language-v3.diff (112.2 KiB)
 tools/langtool      |  377 +++++++
 tools/voice.pl      |    4 
 tools/genlang       |    3 
 tools/langv2toxml   |  131 ++
 tools/language.xsd  |   54 +
 tools/XMLSchema.xsd | 2534 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 apps/Makefile       |    6 
 apps/lang/Makefile  |    4 
 8 files changed, 3105 insertions(+), 8 deletions(-)

Comment by Jonas Häggqvist (rasher) - Sunday, 10 August 2008, 03:20 GMT+2
This one actually builds identical binary language files.
   xml-language-v4.diff (2.8 KiB)
 tools/voice.pl     |    4 ++--
 apps/Makefile      |    6 +++---
 apps/lang/Makefile |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

Comment by Jonas Häggqvist (rasher) - Sunday, 14 December 2008, 23:01 GMT+2
That last patch is obviously incomplete. I'm afraid I've lost some work. Here's the latest I still have around. I'm not entirely sure what the status of this one is.
   xml-language-v5.diff (110.2 KiB)
 tools/langtool      |  377 +++++++
 tools/voice.pl      |    4 
 tools/genlang       |    3 
 tools/langv2toxml   |  131 ++
 tools/language.xsd  |   54 +
 tools/XMLSchema.xsd | 2534 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 3100 insertions(+), 3 deletions(-)

Loading...