language update comparison is exact in GenericSkeletonWriter
Original issue 344 created by and...@spartansoftwareinc.com on 2013-06-15T03:08:47.000Z:
GenericSkeletonWriter has logic to update the language property to the target language. For example, the XML Stream filter updates the xml:lang property. It only does this if the current value of the property is the source language. That check requires an exact locale string match.
There is a TODO in the code asking whether it should be region-insensitive. I think it should be. I can't think of any reason why, say, an xml:lang of "en-us" should not be updated if the document was filtered as "en" (or vice-versa). I think this is what most people would expet.
I changed the code to use LocaleId.sameLanguageAs.
Comments (3)
-
Account Deleted -
Account Deleted Comment 2. originally posted by @ysavourel on 2013-06-16T05:40:06.000Z:
The change looks OK to me.
-
Account Deleted - changed status to resolved
Comment 3. originally posted by @ysavourel on 2013-06-17T17:30:15.000Z:
I've committed Andrew's patch.
https://code.google.com/p/okapi/source/detail?r=fd35ee6f55e2fb5c45cc5f0693af9fad264c8c29&name=dev
- Log in to comment
Comment 1. originally posted by and...@spartansoftwareinc.com on 2013-06-15T03:09:57.000Z:
Commit attached, including test cases. (There was no test for language update before, as far as I can tell.)