I'm watching the packages of all the methods with translations in it and I found some methods that don't belong to any package:
Yes. Someone understands me :)Thanks for rephrasing.- Bert -On 04.05.2010, at 07:11, Ricardo Moran wrote:Thank you for the correction of the code. I was missing the most important translations!Correct me if I'm wrong please, you are proposing:1) to change the TextDomainManager to link the domain with the package instead of the class category,2) to store this information in the method properties,3) and to make #translated aware of all this changes.Right?RichoOn Sat, May 1, 2010 at 7:16 PM, Bert Freudenberg <bert@freudenbergs.de> wrote:I think we do want to do something along those lines, yes.Your expression misses some phrases, in particular the Etoys tile inscriptions:
"Count tile phrases"domains := Dictionary new.GetTextExporter2 new appendVocabularies: domains.phrases := Set new.domains do: [:translations | phrases addAll: translations keys].phrases size"==> 748 phrases"These tile phrases should be a separate pot IMHO, because those are the most important ones to translate.Other than that, splitting by category seems reasonable. And since development is organized by packages now, maybe we should just have one po file per top-level category? Even if there is only 1 phrase in it?I'm sure Korakurider has thought about that. Let's hear him :)Here's my code to count phrases per package:=============="Count non-tile phrases per category"domains := Dictionary new.GetTextExporter2 newappendStringReceivers: #translated into: domains;appendStringReceivers: #translatedNoop into: domains.phrases := Dictionary new.domains do: [:translations |translations keysAndValuesDo: [:phrase :mrefs |mrefs do: [:mref |category := (SystemOrganization categoryOfElement: mref classSymbol)copyUpTo: $-.(phrases at: category ifAbsentPut: [Set new])add: phrase]]].categories := Bag new.phrases keysAndValuesDo: [:cat :strings |categories add: cat withOccurrences: strings size].categories sortedCounts==============There are 4251 non-tile phrases (sum of the below). Adding the 748 tile phrases and subtracting some duplicates this is in the ballpark of the 4412 phrases on pootle.1427 Morphic751 MorphicExtras506 Etoys262 System252 Connectors201 Tools182 Sound70 Movies67 ST8065 Protocols62 Multilingual60 Nebraska55 Sugar48 VideoForSqueak38 WS30 Graphics28 Network25 GStreamer24 Kernel20 Flash19 Files13 Compression11 Collections10 FSM8 Balloon7 BroomMorphs5 Monticello2 SMLoader1 DAVServerDirectory1 UserObjects1 TrueType
If we wanted to split Morphic further, these would be the numbers (but I don't think we should):569 Morphic-Kernel251 Morphic-Worlds161 Morphic-Mentoring135 Morphic-Basic100 Morphic-Games67 Morphic-Widgets48 Morphic-Experimental47 Morphic-Windows19 Morphic-Demo18 Morphic-Scripting Tiles13 Morphic-Components13 Morphic-Support12 Morphic-Text Support8 Morphic-TrueType7 Morphic-Menus7 Morphic-Pluggable Widgets6 Morphic-Books5 Morphic-PDA1 Morphic-PartsBinThere is a slight problem with extension methods (methods defined in *categories), #translated currently would look for those in the wrong package:=============="Count non-tile phrases that are in extension methods"domains := Dictionary new.GetTextExporter2 newappendStringReceivers: #translated into: domains;appendStringReceivers: #translatedNoop into: domains.extensionMethods := Set new.MCWorkingCopy allManagers do: [:wc |extensionMethods addAll: wc packageInfo extensionMethods].phrases := Dictionary new.domains do: [:translations |translations keysAndValuesDo: [:phrase :mrefs |mrefs do: [:mref |(extensionMethods includes: mref) ifTrue: [category := (mref category copyUpTo: $-) asLowercase.(phrases at: category ifAbsentPut: [Set new])add: phrase]]]].categories := Bag new.phrases keysAndValuesDo: [:cat :strings |categories add: cat withOccurrences: strings size].categories sortedCounts==============199 *etoys83 *morphicextras18 *connectors8 *morphic5 *sound1 *pangoWe need to make #translated deal with this. I can think of a simple but inefficient way to do it - maybe it wouldn't hurt that much?- Bert -
_______________________________________________
etoys-dev mailing list
etoys-dev@squeakland.org
http://lists.squeakland.org/mailman/listinfo/etoys-dev
_______________________________________________
etoys-dev mailing list
etoys-dev@squeakland.org
http://lists.squeakland.org/mailman/listinfo/etoys-dev