浏览代码

Consiguration setting Local.Language added ("en by default); Changes for reading new setting; Corrections in russian translation; Menu made a bit (50%) wider to fit texts better

git-svn-id: https://svn-dept.inf.ethz.ch/svn/lecturers/a2/trunk@8841 8c9fc860-2736-0410-a75d-ab315db34111
infsvn.sage 6 年之前
父节点
当前提交
db33549f0b

+ 2 - 0
source/Configuration.XML

@@ -26,6 +26,8 @@ To update: Configuration.Init ~
 				<Setting name="GMTDiff" value="+1"/>
 				<Setting name="GMTDiff" value="+1"/>
 			</Section>
 			</Section>
 		</Section>
 		</Section>
+		<!-- ISO 936-1 language code -->
+		<Setting name="Language" value="en"/>
 	</Section>
 	</Section>
 
 
 <!-- File systems -->
 <!-- File systems -->

+ 14 - 1
source/Localization.Mod

@@ -1,5 +1,8 @@
 MODULE Localization; (** AUTHOR "staubesv"; PURPOSE "Localization interface"; *)
 MODULE Localization; (** AUTHOR "staubesv"; PURPOSE "Localization interface"; *)
 
 
+IMPORT
+	Configuration;
+
 TYPE
 TYPE
 	Language* = RECORD
 	Language* = RECORD
 		code* : ARRAY 3 OF CHAR; (* ISO 936-1 language code *)
 		code* : ARRAY 3 OF CHAR; (* ISO 936-1 language code *)
@@ -27,8 +30,18 @@ BEGIN {EXCLUSIVE}
 	preferenceList[0] := currentLanguage;
 	preferenceList[0] := currentLanguage;
 END SetLanguage;
 END SetLanguage;
 
 
+PROCEDURE GetDefaultLanguage;
+VAR
+	res: WORD;
+BEGIN
+	Configuration.Get("Local.Language", currentLanguage.code, res);
+	IF res # Configuration.Ok THEN
+		currentLanguage.code := "en"
+	END
+END GetDefaultLanguage;
+
 BEGIN
 BEGIN
-	currentLanguage.code := "en";
+	GetDefaultLanguage;
 	NEW(preferenceList, 1);
 	NEW(preferenceList, 1);
 	preferenceList[0] := currentLanguage;
 	preferenceList[0] := currentLanguage;
 END Localization.
 END Localization.

+ 4 - 4
source/MenuPage00.XML

@@ -7,7 +7,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 
@@ -47,7 +47,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 
@@ -87,7 +87,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 
@@ -129,7 +129,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 

+ 5 - 5
source/MenuPage10.XML

@@ -6,7 +6,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 
@@ -45,7 +45,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 
@@ -85,7 +85,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 
@@ -125,7 +125,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>
@@ -164,7 +164,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 

+ 4 - 4
source/MenuPage20.XML

@@ -3,7 +3,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>	<Bounds>
 			<Alignment>1</Alignment>	<Bounds>
-			 <Width>120</Width>	</Bounds>
+			 <Width>180</Width>	</Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -40,7 +40,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -79,7 +79,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -116,7 +116,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>

+ 5 - 5
source/MenuPage30.XML

@@ -3,7 +3,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width>	</Bounds>
+			<Bounds> <Width>180</Width>	</Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -40,7 +40,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -78,7 +78,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -117,7 +117,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 
@@ -159,7 +159,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 

+ 4 - 4
source/MenuPage40.XML

@@ -6,7 +6,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>
@@ -42,7 +42,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>
@@ -78,7 +78,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>
@@ -114,7 +114,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>

+ 4 - 4
source/MenuPage50.XML

@@ -6,7 +6,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>
@@ -42,7 +42,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>
@@ -78,7 +78,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>
@@ -114,7 +114,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 		<Standard:Button>
 		<Standard:Button>

+ 4 - 4
source/MenuPage60.XML

@@ -3,7 +3,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width>	</Bounds>
+			<Bounds> <Width>180</Width>	</Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -41,7 +41,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -79,7 +79,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -118,7 +118,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 

+ 4 - 4
source/MenuPage70.XML

@@ -3,7 +3,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width>	</Bounds>
+			<Bounds> <Width>180</Width>	</Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -41,7 +41,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -79,7 +79,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -118,7 +118,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 

+ 5 - 5
source/MenuPage80.XML

@@ -3,7 +3,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>	
 			<Alignment>1</Alignment>	
-			<Bounds> <Width>120</Width>	</Bounds>	
+			<Bounds> <Width>180</Width>	</Bounds>	
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -41,7 +41,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>	
+			<Bounds> <Width>180</Width> </Bounds>	
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -79,7 +79,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>	
+			<Bounds> <Width>180</Width> </Bounds>	
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -118,7 +118,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>	
 			<Bounds>	
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>	
 			</Bounds>	
 		</Properties>
 		</Properties>
 
 
@@ -158,7 +158,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>	
 			<Bounds>	
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>	
 			</Bounds>	
 		</Properties>
 		</Properties>
 
 

+ 4 - 4
source/MenuPage90.XML

@@ -3,7 +3,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width>	</Bounds>
+			<Bounds> <Width>180</Width>	</Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -41,7 +41,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -79,7 +79,7 @@
 	<Standard:Panel>
 	<Standard:Panel>
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
-			<Bounds> <Width>120</Width> </Bounds>
+			<Bounds> <Width>180</Width> </Bounds>
 		</Properties>
 		</Properties>
 
 
 		<Standard:Button>
 		<Standard:Button>
@@ -118,7 +118,7 @@
 		<Properties>
 		<Properties>
 			<Alignment>1</Alignment>
 			<Alignment>1</Alignment>
 			<Bounds>
 			<Bounds>
-				<Width>120</Width>
+				<Width>180</Width>
 			</Bounds>
 			</Bounds>
 		</Properties>
 		</Properties>
 
 

二进制
source/StartMenu.rep