Issue 81588 - dc:language in office:meta (meta.xml) killed
Summary: dc:language in office:meta (meta.xml) killed
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Code
Component: code (show other issues)
Version: OOo 2.3 RC2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: stefan.baltzer
QA Contact: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-14 16:24 UTC by lendo
Modified: 2009-07-20 14:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description lendo 2007-09-14 16:24:14 UTC
OOO 2.3 deletes <dc:language></dc:language> in the office:meta element in the
meta.xml file of older (<= 2.2.1) OOo documents.

This element describes the language of the meta-data of the document (or I
thought so). Is this now done differently? Is dc:language no longer necessary?
Comment 1 Mathias_Bauer 2007-09-14 19:16:26 UTC
OOo never used that property, instead it used the language attribute from the
default style. This is a redundancy in the file format and the language property
is not necessary. So it might be possible that losing this unused property
stayed unnoticed. 

As writing this property is not mandatory (according to the ODF spec) I think it
is not even a bug that it is not present. But as it is perhaps used by others
and now perhaps missed I think that we should fix that.
Comment 2 lendo 2007-09-27 23:31:31 UTC
Thanks, Mathias.
Comment 3 Mathias_Bauer 2007-09-28 08:19:40 UTC
Thinking about this I discovered a problem that until now wasn't revealed
because - as I wrote - we never used that property.

In fact an ODF document does not have *one* document language, it has *three* of
them! The default style has a "western" language, an "asian" and a "CTL"
language. Which language indeed is used depends on other things like the used font.

So now I wonder which one would be the best choice for the dc:language. We
shouldn't copy blindly what was used before 2.3 but check whether this makes sense.
Comment 4 Mathias_Bauer 2007-10-25 14:40:46 UTC
IMHO dc:language shouldn't be any of the three languages.
So the question remains: what exactly should dc:language express? What do users
expect to get from it?
Comment 5 Mathias_Bauer 2007-10-25 14:50:49 UTC
Perhaps we should allow users to specify this attribute directly in the
properties dialog. If nothing is entered, no dc:language is written.
Comment 6 bulldozer 2007-10-29 16:33:09 UTC
While looking whether a bug of deleting elements in meta.xml was already
submitted I stumbled over this one. Perhaps it is not mandatory to write this
element but when it is there it is mandatory to leave it. If I have read the
spec correctly:

In addition to this, conforming applications should preserve meta information
and the content of styles. This means:
The various <style:*-properties> elements (see section 15) may have arbitrary
attributes attached and may have arbitrary element content. All attributes
attached to these elements and elements contained within these elements should
be preserved (see section 15.1.3);
elements contained within the <office:meta> element may have arbitrary element
content and should be preserved (see section 2.2.1).

(section 1.5, page 36)

Or do I see this wrongly ?


Comment 7 Mathias_Bauer 2007-10-29 17:32:31 UTC
No, you are right. Preserving the attribute is recommended and we should do it.
The question remains whether we should also use that property for new documents.
So if the submitter agreed on just preserving existing attributes we can go on.
If the request is to support it in all documents I still have to think about it. 

Just to give an outline, my current plan would be to take the locale of OOo to
find out whether it is in the "western", "asian" or "CTL" group and then take
the default language of this group as the document language. That should be
correct for most cases. For the remaining cases where this is a wrong guess I
think that we should provide means for changing that in the "document
properties" dialog (as this is the one we are using for editing meta data).
Comment 8 lendo 2007-10-29 20:55:44 UTC
Auto-detection of the installed locale of OOo sounds good. And - additionally -
a new field in the "document properties" to change the "default language" (or
whatever name it get) would be the best solution.
Comment 9 Mathias_Bauer 2007-11-01 09:01:20 UTC
So I will split up the task. For 2.4 and in this issue I will make sure that a
dc:language is preserved.

In a follow-up task we will implement the new treatment but probably that won't
be finished in the 2.4 time frame.
Comment 10 Mathias_Bauer 2007-12-15 13:13:13 UTC
fixed in CWS mba24issues01
Comment 11 Mathias_Bauer 2007-12-18 08:12:40 UTC
For testing take any document that contains a dc:language element in its
meta.xml. Save it again, the document still should contain that element.
Comment 12 stefan.baltzer 2007-12-20 14:28:15 UTC
Verified in CWS mba24issues01.
Comment 13 lendo 2008-02-14 21:12:07 UTC
Sorry for issue spam: is there an issue for the follow-up task for the
possibility to change the document language in the "document properties" dialog?
Comment 14 thorsten.ziehm 2009-07-20 14:53:45 UTC
This issue is closed automatically and wasn't rechecked in a current version of
OOo. The fixed issue should be integrated in OOo since more than half a year. If
you think this issue isn't fixed in a current version (OOo 3.1), please reopen
it and change the field 'Target Milestone' accordingly.

If you want to download a current version of OOo =>
http://download.openoffice.org/index.html
If you want to know more about the handling of fixed/verified issues =>
http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues