OMG

Comment 6 for bug 622718

Revision history for this message
Patryk Zawadzki (patrys) wrote : Re: [Bug 622718] Re: XML application problems

>>> * you go with Pascal/Java-style "CamelCase" where XML calls for "hyphenated-names" or classic "camelCasing"
> Didn't get this one.

<ApplicationName> versus recommended <application-name> or popular
<applicationName>

>>> * you've invented your own translation format ignoring the fact that intltool comes with out-of-the-box support for XML files
> Please explain this a bit. I am lost here.

GNOME has an infrastructure in place to support translatable XML. For
an example see "XML files" under
http://people.gnome.org/~malcolm/i18n/marking-strings.html

>>> * you reference and import "xsi" and "xsd" namespaces despite not using any of them
> Even though I worked a lot on XML, I have still not understood XML namespaces completely. On my day job, I use XML from XSD already provided by standardization teams inside the company.

Importing namespaces only makes sense if you actually use them.

>>> * you provide your own schema for no apparent reason, you never reference it
> Actually I did not create that schema. It is just part of the project so that people can know how to create the trophy files
> I actually created the Data Structures(Classes) and serialized it. It generated the trophy XML file, from that XML file, I created the XSD file for third-party use, not our side. I just added it to the project so that we don' lose it and so that we can keep track of it.

Using a serialization format as a standard is hardly ever a good idea.
You should start by designing an XML application and then implement it
in your language of choice. Serialized formats are only meant to be
used to transport portions of data between applications written in the
same language.

In other words it's like asking people to consume and produce Python
pickles -- it might save you a couple of lines in code but only by
adding more work for others.

We designed the gnome-achievements XML format (as opposed to dumping
whatever the language thought about an object) to be as friendly as
possible to both app programmers and translators. This means being
gettext-friendly, intltool-friendly and simple enough to be written by
hand.

>>> * title is not translatable
> I don't know, but we have discussed that Description is translatable. Probably

Probably?

>>> * the "friendly application name" is redundant as you can get a translated version from the referenced desktop file
> We wanted the ApplicationName to be just an identifier for an application and FriendlyApplicationName to be some friendly name
> e.g. "gedit" and "Gnome Text Editor"

As I said above -- you can get the title from the desktop file. Both
correct and translated to the current locale.

--
Patryk Zawadzki