Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
Biz Modules provides professional business modules and solutions for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Language Packs ...  Module Localizer
Previous Previous
 
Next Next
New Post 1/12/2006 7:30 PM
User is offline Aricie
112 posts
www.aricie.com
9th Ranked






Module Localizer 

I've published a small utility that helps module developper and localizer building the Resx files. It does 2 things:

  • When "ShowMissingKeys" is enabled, a log admin.alert is generated for every missing key found when navigating the portal. My module processes those logs to build the keys and tries to guess the control texts from their Ids with a simple regex (take out the prefix, split the camel case)
  • Once the keys are done, the module can fill the missing translation by using a translating web service.

Of course, automatic translation is usually not that good, but it can perform tons of preprocessing that makes the resulting work much easier.

I did not spend too much time on that module, it's pretty dirty but it may be a good start to include new features in the core.

So if you want to have a look Vinç', the PA contains the source.


Jesse
www.aricie.com
www.aricie.net

 
New Post 1/13/2006 12:20 AM
User is offline Vicenç Masanas
1402 posts
www.disgrafic.com
6th Ranked








Re: Module Localizer 
Thanks for the offer, but I not very sure this is a good idea to add automatic translation to core.
While I can see the interest in the tool for module developers if it helps ease their task, I don't think this should be a built-in feature.

Disgrafic.com
 
New Post 1/13/2006 2:20 AM
User is offline Aricie
112 posts
www.aricie.com
9th Ranked






Re: Module Localizer 

Ok I see the point and for the automatic translation I agree DNN core can't really afford to rely on third party webservices, unless they're bullet proof, which isn't the case.

Maybe it is a little different with the first method, which extends the ShowMissingKey feature, and to my opinion give it some more sense, by providing an handling for the admin alerts. 

Building the resource keys seems to me as the most tedious task when localizing a module, and it feels a bit frustrating to be able to log all the missing keys but still have to add them one by one manually, which is also something you can't do online.


Jesse
www.aricie.com
www.aricie.net

 
New Post 1/13/2006 2:25 AM
User is offline Vicenç Masanas
1402 posts
www.disgrafic.com
6th Ranked








Re: Module Localizer 

We lately added this code for logging that missing keys:

If showMissingKeys Then

Dim objEventLog As New Services.Log.EventLog.EventLogController

objEventLog.AddLog("Key Missing for: ", name + " in " + ResourceFileRoot, objPortalSettings, Null.NullInteger, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT)

Return "RESX:" & name

End If

So the log is done, but the problem on adding them automatically is that you still need to translate them! And if they're added and not translated you will loose the notification it provides, so completely defeating the purpose of it.

But you're not right when you say this cannot be done online: go to the language editor and select the file you're translating that misses some keys. You'll get the option to add them.


Disgrafic.com
 
New Post 1/13/2006 4:04 AM
User is offline Aricie
112 posts
www.aricie.com
9th Ranked






Re: Module Localizer 

The code you give here is what my module bases on to write the keys.

I can see two things that bring the confusion there:

First you need to write the first key in the system locale reference file. This is what the module does with the first command and that you can't do online.

Then you can indeed add the missing keys in the other locales files, but this is by copying the nodes from the reference file to the localized one. I haven't seen any function in dnn that helps actually building the reference file, except for the logs. That's the primary purpose of my module. The english text it adds is inferred from the control name by playing with a regex, since most module makers use the same syntax: prefix for the control type (pl, txt, chk...) + camel case for the control name.

So when it analyses the log, the module will create the key (and the file if it does not exist) and the related text.

Of course one may whish to modify the initial texts, that can be done online with your editor, so I think it's still easier than building the xml from scratch.

Same for the translation: the call to the webservice does a bit what your "add missing key" does except that it it performs an automatic translation with the web service on the fly and it does it for the whole install or a single module. Correcting the biased translation is again easier than starting from scratch with the english version.

I'd say that with a regular module, the first option gets the correct english name for more than 50% of the resource keys ("plMyControl" usually gets an english "My Control" reference text).

That of course encourages to use processable control IDs such admin controls ones, which I think is also a good thing, since it normalizes the naming conventions. But even if you have other kind of Ids, and don't rely on the regex trick, it's still much easier to correct the keys than to write the XML from scratch. 

Then again the automatized translation results correct for about 50% of the keys -> this is very true for small texts where word by word translation is OK, and this is usually more than half of what you need to translate.

So you can except that half the whole localization job is all done automatically + the fact that the rest is just about correcting the translation instead of building them from scratch. I really think there is some gain of productivity there, thus my proposal to check if something can be added to the core.

Since most members were private in your classes I add to copy loads of your code back in the module. That's because I'm really basing on your code in the first place and only extending it, and that's what made me think you may want to have a look at the module.


Jesse
www.aricie.com
www.aricie.net

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Language Packs ...  Module Localizer
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


SINA101
WANT A SPECial sIte iN TAIWAN?
sina101.com
Web Development and Strategy Firm
The Risdall Interactive Agency s websites, strategies, branding, & promotion in digital space.
www.Risdall.net/
Windsor Management Group
Fund Accounting Software for K12 Education.
Infinitevisions.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP