extensions.st
changeset 18462 52edaebf4615
parent 18444 3ce22a7c79df
child 18523 c6718fc416d8
--- a/extensions.st	Fri Oct 12 12:12:26 2018 +0200
+++ b/extensions.st	Fri Oct 12 12:44:33 2018 +0200
@@ -1065,7 +1065,7 @@
             }.
 ! !
 
-!Filename methodsFor:'debugging'!
+!Filename methodsFor:'inspecting'!
 
 inspector2TabContentsView
     <inspector2Tab>      
@@ -2435,6 +2435,44 @@
     ^ self origin printString,'->',self corner printString
 ! !
 
+!ResourcePack methodsFor:'inspecting'!
+
+inspector2TabTranslationView
+    <inspector2Tab>      
+
+    "provide an additional tab, which presents the translations"
+
+    | tab fn lang|    
+
+    packsFileName isNil ifTrue:[^ nil].
+
+    lang := self at:'__language__' ifAbsent:[Smalltalk language].
+    (lang includes:$_) ifTrue:[ lang := lang upTo:$_ ].
+
+    fn := packsFileName asFilename.
+    fn baseName = 'resources.rs' ifTrue:[
+        fn := fn directory / (lang,'.rs').
+    ].    
+    fn exists ifFalse:[^ nil].
+    
+    ^ (tab := Tools::Inspector2Tab new)
+        label: 'Translations';
+        priority: 50;
+        applicationHolder: [   
+            | browser |
+
+            browser := Tools::InternationalLanguageTranslationEditor new.
+            browser readResourceFile:fn asLanguage:lang.
+            browser editedLanguage:lang.
+            browser
+        ];
+        yourself
+
+    "
+     View classResources inspect
+    "
+! !
+
 !RunArray methodsFor:'misc ui support'!
 
 inspectorClass