[Mono-bugs] [Bug 52289][Wis] New - Wrong Parent pointer in many CultureInfos

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 17 Dec 2003 09:10:11 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bruno@clisp.org.

http://bugzilla.ximian.com/show_bug.cgi?id=52289

--- shadow/52289	2003-12-17 09:10:11.000000000 -0500
+++ shadow/52289.tmp.12669	2003-12-17 09:10:11.000000000 -0500
@@ -0,0 +1,92 @@
+Bug#: 52289
+Product: Mono/Class Libraries
+Version: unspecified
+OS: SUSE 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bruno@clisp.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Wrong Parent pointer in many CultureInfos
+
+Description of Problem: 
+The Parent pointer of most CultureInfos is wrong: it always points to the 
+invariant culture. 
+ 
+Steps to reproduce the problem: 
+Install mono-0.28. 
+Store hello.cs (attached). 
+$ mcs hello.cs 
+$ mono hello.exe 
+ 
+ 
+Actual Results: 
+$ mono hello.exe 
+en-US --> iv --> iv --> iv --> iv 
+en --> iv --> iv --> iv --> iv 
+de-DE --> iv --> iv --> iv --> iv 
+de-AT --> iv --> iv --> iv --> iv 
+de --> iv --> iv --> iv --> iv 
+zh-CN --> iv --> iv --> iv --> iv 
+zh-TW --> iv --> iv --> iv --> iv 
+zh-CHS --> iv --> iv --> iv --> iv 
+zh-CHT --> iv --> iv --> iv --> iv 
+Cy-sr-SP --> iv --> iv --> iv --> iv 
+Lt-sr-SP --> iv --> iv --> iv --> iv 
+ 
+ 
+Expected Results: 
+$ mono hello.exe 
+en-US --> en --> iv --> null 
+en --> iv --> null 
+de-DE --> de --> iv --> null 
+de-AT --> de --> iv --> null 
+de --> iv --> null 
+zh-CN --> zh-CHS --> zh --> iv --> null 
+zh-TW --> zh-CHT --> zh --> iv --> null 
+zh-CHS --> zh --> iv --> null 
+zh-CHT --> zh --> iv --> null 
+Cy-sr-SP --> Cy-sr --> sr --> iv --> null 
+Lt-sr-SP --> Lt-sr --> sr --> iv --> null 
+ 
+The Windows results are these (not perfect, but acceptable): 
+en-US --> en -->  -->  -->  
+en -->  -->  -->  -->  
+de-DE --> de -->  -->  -->  
+de-AT --> de -->  -->  -->  
+de -->  -->  -->  -->  
+zh-CN --> zh-CHS -->  -->  -->  
+zh-TW --> zh-CHT -->  -->  -->  
+zh-CHS -->  -->  -->  -->  
+zh-CHT -->  -->  -->  -->  
+ 
+ 
+How often does this happen?  
+Reproducible. 
+ 
+Additional Information: 
+ 
+For GNU gettext, the Parent pointer in cultures is important so that 
+translators for, say, Austrian, need only translate those messages that have 
+a different translation than the German one, and can reuse the German 
+message translations as fallback. If "de-AT".Parent == "iv" this cannot 
+be achieved. 
+ 
+The MS documentation of CultureInfo.Parent says: 
+"A parent culture is a higher-level culture that encompasses only the set 
+ of information that is common among its children. For example, the parent 
+ culture of "en-US" is "en"; the parent culture of "en" is the invariant 
+ culture." 
+and: 
+"Some culture names have prefixes that specify the script; for example, 
+ "Cy-" specifies the Cyrillic script, "Lt-" specifies the Latin script." 
+and: 
+"Note that "zh-CHS" (Simplified Chinese) and "zh-CHT" (Traditional Chinese) 
+ are neutral cultures."